/* ============================================================ */
/* 公共基础.css - 公共基础样式 */
/* ============================================================ */

/* ===== 统一 CSS 变量（所有页面共用） ===== */
:root {
    --primary: #3366ff;
    --primary-dark: #1a4bcc;
    --primary-light: #6699ff;
    --secondary: #764ba2;
    --bg-body: #0a0c0f;
    --bg-card: rgba(28, 28, 30, 0.6);
    --bg-navbar: rgba(10, 12, 15, 0.8);
    --text-primary: #f2f2f7;
    --text-secondary: #aeaeb2;
    --text-muted: #636366;
    --border-light: rgba(255, 255, 255, 0.06);
    --radius: 20px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --radius-pill: 50px;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #1a1c20; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 12px 24px;
    border-radius: 60px;
    color: white;
    border-left: 4px solid #33ff66;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 14px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-left-color: #f44336; }

/* ===== 光效控制区域 ===== */
.glow-toggle-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 12, 15, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 12px 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.toggle-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
    user-select: none;
}
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}
.toggle-switch .toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.toggle-switch input[type="checkbox"] { display: none; }
.toggle-switch input[type="checkbox"]:checked + .toggle-slider { transform: translateX(20px); }
.toggle-switch:has(input:checked) { background: var(--primary); }
.glow-type-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.glow-type-btn:hover { background: rgba(51, 102, 255, 0.3); border-color: var(--primary); }

/* ===== 光效元素 ===== */
#glow {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 999998 !important;
    mix-blend-mode: soft-light;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#glow.active { opacity: 1; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .glow-toggle-container {
        top: 75px;
        right: 10px;
        transform: scale(0.85);
    }
}

/* ===== 无障碍：聚焦轮廓 ===== */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================================ */
/* ★ 入场动画快速衔接：用户一交互就瞬间补完（不是跳过，是加速衔接） */
/* ============================================================ */
html.anim-rush #mainHeader,
html.anim-rush .hero,
html.anim-rush #navbar,
html.anim-rush .h-screen,
html.anim-rush #fixedProgress,
html.anim-rush #screenshots,
html.anim-rush #contact,
html.anim-rush footer,
html.anim-rush .content,
html.anim-rush .glow-toggle-container,
html.anim-rush .player-mini-btn,
html.anim-rush .player-reset-btn,
html.anim-rush .next-page-btn,
html.anim-rush .bottom-next-btn,
html.anim-rush .prev-page-btn,
html.anim-rush .mobile-prev-page-btn {
    animation-delay: 0s !important;
    animation-duration: 0.15s !important;
}