/**
 * 新星云 - Three.js 云服务粒子加载动画样式
 * 白色简洁风格，品牌蓝色系点缀
 */

/* ==================== 加载页面容器 ==================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    background: #ffffff !important;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ==================== Three.js Canvas 容器 ==================== */
#loading-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#loading-canvas-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* ==================== 加载信息区域 ==================== */
.loading-info {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 80px;
    width: 100%;
}

/* ==================== 加载文字 ==================== */
.loading-text {
    font-size: 12px;
    color: #94a3b8;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 400;
}

/* ==================== 进度条区域 ==================== */
.loading-progress-container {
    width: 200px;
    height: 2px;
    background: rgba(203, 213, 225, 0.5);
    border-radius: 1px;
    overflow: hidden;
    margin-bottom: 15px;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0058FF 0%, #3b82f6 100%);
    border-radius: 1px;
    width: 0%;
    transition: width 0.3s ease;
}

/* ==================== 主要内容区域 ==================== */
#main-content {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#main-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
    .loading-info {
        padding-bottom: 50px;
    }

    .loading-text {
        font-size: 11px;
        letter-spacing: 3px;
    }

    .loading-progress-container {
        width: 140px;
        height: 2px;
    }
}

@media (max-width: 480px) {
    .loading-info {
        padding-bottom: 40px;
    }

    .loading-text {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .loading-progress-container {
        width: 120px;
    }
}

/* ==================== 3D Cube Styles (Brand Cube) ==================== */
.cube-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 30px;
    perspective: 400px;
}

.cube {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: jump-rotate 1.5s infinite ease-in-out;
}

.face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0066ff, #00b4ff);
    opacity: 0.9;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.face.front {
    transform: translateZ(30px);
}

.face.back {
    transform: rotateY(180deg) translateZ(30px);
}

.face.right {
    transform: rotateY(90deg) translateZ(30px);
}

.face.left {
    transform: rotateY(-90deg) translateZ(30px);
}

.face.top {
    transform: rotateX(90deg) translateZ(30px);
    background: #0044aa;
}

.face.bottom {
    transform: rotateX(-90deg) translateZ(30px);
    background: #0044aa;
}

.shadow {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%) rotateX(90deg);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2), transparent 70%);
    border-radius: 50%;
    animation: shadow-scale 1.5s infinite ease-in-out;
}

@keyframes jump-rotate {
    0% {
        transform: translateY(0) rotateX(0) rotateY(0);
    }

    25% {
        transform: translateY(-40px) rotateX(-90deg) rotateY(90deg);
    }

    50% {
        transform: translateY(0) rotateX(-180deg) rotateY(180deg);
    }

    75% {
        transform: translateY(-40px) rotateX(-270deg) rotateY(270deg);
    }

    100% {
        transform: translateY(0) rotateX(-360deg) rotateY(360deg);
    }
}

@keyframes shadow-scale {

    0%,
    50%,
    100% {
        transform: translateX(-50%) rotateX(90deg) scale(1);
        opacity: 0.2;
    }

    25%,
    75% {
        transform: translateX(-50%) rotateX(90deg) scale(0.6);
        opacity: 0.1;
    }
}

@keyframes text-pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* ==================== Percentage Style ==================== */
.loading-percentage {
    font-family: monospace;
    color: #94a3b8;
    font-size: 14px;
    margin-top: 10px;
    font-weight: 500;
}

/* ==================== Status Style ==================== */
#loading-status {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #0066ff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: text-pulse 1.5s infinite ease-in-out;
    margin-bottom: 20px;
    text-align: center;
}