/* ============================================================
   SolidPhysics Virtual Lab — Cinematic Welcome
   Nature 论文风格 · 科研可视化启动动画
   ============================================================ */

/* ---------- 全屏 Three.js 画布 ---------- */
.cinematic-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #000;
    overflow: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.cinematic-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#cinematic-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* ---------- 标题 UI 叠加层 ---------- */
.cinematic-ui {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.cinematic-ui.visible {
    opacity: 1;
}

.cinematic-ui .ui-inner {
    pointer-events: auto;
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

/* "晶格导演的电子双态秀" */
.cinematic-title-cn {
    font-size: 44px;
    font-weight: 800;
    background: linear-gradient(135deg, #f0f4ff 0%, #60a5fa 40%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 6px;
    margin-bottom: 16px;
    line-height: 1.3;
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.15));
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.1)); }
    100% { filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.25)); }
}

/* "Solid Physics Virtual Lab" */
.cinematic-title-en {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 装饰分隔线 */
.cinematic-divider {
    width: 80px;
    height: 1.5px;
    margin: 0 auto 20px;
    background: linear-gradient(90deg, transparent, #3b82f6, #8b5cf6, transparent);
    border-radius: 1px;
}

/* 副标题 — 视频名称 */
.cinematic-sub {
    font-size: 16px;
    color: #94a3b8;
    letter-spacing: 2px;
    font-weight: 300;
    margin-bottom: 36px;
    line-height: 1.6;
}

/* 副标题的小字装饰 */
.cinematic-sub .highlight {
    color: #60a5fa;
    font-weight: 400;
}

.cinematic-sub em {
    font-style: normal;
    color: #60a5fa;
}

/* "进入微观世界" 按钮 */
.cinematic-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 48px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 3px;
    color: #f0f4ff;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 4px 24px rgba(59, 130, 246, 0.3),
        0 0 60px rgba(59, 130, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    animation: btnPulse 2.5s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 4px 24px rgba(59, 130, 246, 0.3), 0 0 60px rgba(59, 130, 246, 0.08); }
    50% { box-shadow: 0 4px 32px rgba(59, 130, 246, 0.45), 0 0 80px rgba(99, 102, 241, 0.15); }
}

.cinematic-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 999px;
}

.cinematic-btn span { position: relative; z-index: 1; }
.cinematic-btn .arrow { position: relative; z-index: 1; transition: transform 0.3s ease; font-size: 18px; }

.cinematic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(59, 130, 246, 0.4), 0 0 80px rgba(99, 102, 241, 0.15);
    animation: none;
}

.cinematic-btn:hover::before { opacity: 1; }
.cinematic-btn:hover .arrow { transform: translateX(5px); }
.cinematic-btn:active { transform: translateY(0); }

/* 跳过按钮 */
.cinematic-skip {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 50;
    padding: 8px 22px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(100, 160, 255, 0.25);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.cinematic-skip:hover {
    color: #f0f4ff;
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(100, 160, 255, 0.5);
    box-shadow: 0 2px 20px rgba(59, 130, 246, 0.15);
}


/* 右下角版本号 */
.cinematic-version {
    position: absolute;
    bottom: 24px;
    right: 32px;
    z-index: 10;
    font-size: 11px;
    color: rgba(100, 116, 139, 0.25);
    letter-spacing: 1px;
    pointer-events: none;
}

/* 底部场景进度指示 */
.cinematic-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    height: 2px;
    background: rgba(255, 255, 255, 0.03);
}

.cinematic-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s linear;
}

/* ========== 模式选择界面 ========== */
.mode-select-overlay {
    position: fixed; inset: 0; z-index: 1500;
    display: none; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at 50% 30%, #0a1628 0%, #050510 100%);
}
.mode-select-overlay.active { display: flex; }

.mode-select-cards {
    display: flex; gap: 32px; flex-wrap: wrap; justify-content: center; padding: 40px;
}

.mode-card {
    width: 260px; height: 280px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 16px; text-align: center;
    background: rgba(10, 20, 40, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 32px 24px;
}
.mode-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 60px rgba(59, 130, 246, 0.06);
}
.mode-card:active { transform: translateY(-2px) scale(0.98); }

.mode-card-icon { font-size: 40px; }
.mode-card h2 { font-size: 20px; font-weight: 700; color: #e8ecf4; letter-spacing: 1px; margin: 0; }
.mode-card p { font-size: 13px; color: #7a8aa5; line-height: 1.5; margin: 0; }

@media (max-width: 600px) {
    .mode-select-cards { flex-direction: column; align-items: center; padding: 20px; }
    .mode-card { width: 100%; max-width: 280px; height: 200px; }
}
/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .cinematic-title-cn {
        font-size: 28px;
        letter-spacing: 3px;
    }
    .cinematic-title-en {
        font-size: 11px;
        letter-spacing: 3px;
    }
    .cinematic-sub {
        font-size: 13px;
        letter-spacing: 1px;
    }
    .cinematic-btn {
        padding: 12px 34px;
        font-size: 14px;
    }
    .cinematic-ui .ui-inner {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .cinematic-title-cn {
        font-size: 22px;
        letter-spacing: 2px;
    }
    .cinematic-sub {
        font-size: 12px;
    }
}
