/* loading.css - 启动页与进度条样式 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
    transform: none !important;
    -webkit-transform: none !important;
    zoom: 1 !important;
}

.loading-content {
    text-align: center;
    animation: fadeIn 0.5s ease-in;
    max-width: 90vw;
    padding: 0 5vw;
}

.loading-logo {
    width: 33vw;
    height: 33vw;
    max-width: 400px;
    max-height: 400px;
    margin-bottom: 3vh;
    animation: pulse 2s infinite;
}

.loading-title {
    font-size: 4vw;
    color: #333;
    margin-bottom: 2vh;
    font-weight: 300;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.loading-indicator {
    width: 8vw;
    height: 8vw;
    max-width: 80px;
    max-height: 80px;
    border: 0.5vw solid #f3f3f3;
    border-top: 0.5vw solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2vh auto;
}

.progress-wrapper {
    width: 60vw;
    max-width: 600px;
    margin: 2vh auto 0;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.progress-container {
    position: relative;
    width: 100%;
    height: 1.5vh;
    min-height: 8px;
    max-height: 16px;
    border-radius: 999px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.progress-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transition: width 0.2s ease-out;
}

.progress-text {
    margin-top: 1vh;
    font-size: 3vw;
    color: #666666;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* 暗黑模式支持（loading 相关） */
@media (prefers-color-scheme: dark) {
    .loading-screen {
        background-color: #1a1a1a;
    }

    .loading-title {
        color: #ffffff;
    }

    .loading-indicator {
        border-color: #444;
        border-top-color: #3498db;
    }

    .progress-container {
        background-color: #2a2a2a;
    }

    .progress-text {
        color: #bbbbbb;
    }
}

/* 移动端适配（loading） */
@media (max-width: 768px) {
    .loading-logo {
        width: 40vw;
        height: 40vw;
        max-width: 300px;
        max-height: 300px;
    }

    .loading-title {
        font-size: 5vw;
    }

    .loading-indicator {
        width: 10vw;
        height: 10vw;
        border-width: 0.6vw;
    }

    .progress-wrapper {
        width: 70vw;
    }

    .progress-text {
        font-size: 4vw;
    }
}