/* === 加载动画容器 === */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0a14;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loadingOverlay.hidden {
    opacity: 0;
    visibility: hidden;
}

/* 添加这个容器来垂直排列内容 */
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
}

.loading-logo {
    width: 650px;
    max-width: 80%;
    position: relative;
    animation: logoPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.5));
}

.loading-text {
    color: #00ffff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    opacity: 0.8;
    animation: textFade 2s ease-in-out infinite;
    margin-top: 10px;
}

/* 进度条容器 */
.loading-progress-container {
    width: 300px;
    height: 8px;
    background-color: rgba(0, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 15px;
    position: relative;
}

.loading-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #0088ff);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 进度条发光效果 */
.loading-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 1.5s ease-in-out infinite;
}

@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.5));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px rgba(0, 255, 255, 0.8));
    }
}

@keyframes textFade {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* 进度百分比文本 */
.loading-percentage {
    color: #00ffff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    margin-top: 8px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* 加载状态指示器 */
.loading-status {
    color: rgba(0, 255, 255, 0.7);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    margin-top: 10px;
    min-height: 20px;
}

/* === 动画特效容器 === */
.animation-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* 数字流容器 */
.digital-stream-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease;
}

.digital-stream-container.active {
    opacity: 1;
}

.digital-stream {
    position: absolute;
    color: #00ffff;
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    opacity: 0.7;
    text-shadow: 0 0 5px #00ffff;
    white-space: nowrap;
}

/* 矩阵雨容器 */
.matrix-rain-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    opacity: 0;
    transition: opacity 1s ease;
}

.matrix-rain-container.active {
    opacity: 1;
}

.matrix-column {
    position: absolute;
    top: -100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.matrix-char {
    color: rgba(0, 255, 0, 0.8);
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    opacity: 0;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.8);
    margin: 2px 0;
}

/* 电路板光效容器 */
.circuit-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    opacity: 0;
    transition: opacity 1s ease;
}

.circuit-container.active {
    opacity: 1;
}

.circuit-path {
    fill: none;
    stroke-width: 2;
    stroke: rgba(0, 255, 255, 0.3);
    stroke-dasharray: 10, 10;
}

.circuit-glow {
    fill: none;
    stroke-width: 3;
    stroke: #00ffff;
    filter: url(#glow);
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.circuit-node {
    fill: #00ffff;
    filter: url(#glow);
    opacity: 0;
}

/* 动画类 */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes digitalStream {
    0% {
        transform: translateX(100vw);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes matrixRain {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(100vh);
    }
}

@keyframes circuitPulse {
    0% {
        opacity: 0.5;
        r: 3;
    }

    50% {
        opacity: 1;
        r: 5;
    }

    100% {
        opacity: 0.5;
        r: 3;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .loading-logo {
        width: 400px;
        max-width: 80%;
    }

    .loading-text {
        font-size: 1rem;
    }

    .loading-progress-container {
        width: 250px;
    }

    .loading-content {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .loading-logo {
        width: 300px;
        max-width: 85%;
    }

    .loading-text {
        font-size: 0.9rem;
    }

    .loading-progress-container {
        width: 200px;
    }

    .loading-percentage {
        font-size: 0.9rem;
    }

    .loading-content {
        gap: 10px;
    }
}

@media (max-width: 360px) {
    .loading-logo {
        width: 250px;
        max-width: 90%;
    }

    .loading-text {
        font-size: 0.8rem;
    }

    .loading-progress-container {
        width: 180px;
    }

    .loading-percentage {
        font-size: 0.8rem;
    }
}