/* ==========================================================================
   1. 全局 CSS 变量定义（深邃太空色板与玻璃拟态参数）
   ========================================================================== */
:root {
    /* 背景色调：深紫、午夜蓝、深空黑 */
    --bg-black: #040208;
    --bg-midnight: #0a0618;
    --bg-deep-purple: #160b2e;

    /* 粒子与点缀发光色：星光金、微光紫、星云粉白 */
    --star-gold: #ffd984;
    --star-gold-glow: rgba(255, 217, 132, 0.45);
    --nebula-pink: #ffacc7;
    --nebula-purple: #b388ff;
    --starlight-white: #f8f5ff;

    /* 文本颜色 */
    --text-primary: #f5f0ff;
    --text-secondary: rgba(230, 220, 255, 0.72);
    --text-muted: rgba(200, 185, 235, 0.45);

    /* 现代玻璃拟态 (Glassmorphism) 参数 */
    --glass-bg: rgba(18, 11, 36, 0.42);
    --glass-bg-hover: rgba(26, 16, 52, 0.55);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-highlight: rgba(255, 217, 132, 0.25);
    --glass-blur: blur(16px);

    /* 字体家族 */
    --font-display: 'Cinzel', 'Noto Serif SC', serif;
    --font-serif: 'Noto Serif SC', 'Songti SC', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ==========================================================================
   2. 基础重置与全局滚动设置
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-black);
    color: var(--text-primary);
    font-family: var(--font-serif);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 自定义极简深空滚动条 */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-black);
}
::-webkit-scrollbar-thumb {
    background: rgba(179, 136, 255, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--star-gold);
}

/* ==========================================================================
   3. 背景星空 Canvas 层
   ========================================================================== */
#cosmos-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none; /* 确保不阻挡页面按钮点击 */
}

/* ==========================================================================
   4. 顶部极简玻璃导航栏
   ========================================================================== */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(8, 4, 18, 0.35);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.4s ease;
}

.glass-nav.scrolled {
    background: rgba(8, 4, 18, 0.72);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--starlight-white);
    text-decoration: none;
    letter-spacing: 0.15em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 0 12px var(--star-gold-glow);
}

.logo-star {
    color: var(--star-gold);
    animation: pulse-star 3s infinite ease-in-out;
}

.nav-links {
    display: flex;
    gap: 2.2rem;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    position: relative;
    padding: 0.3rem 0;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--star-gold), transparent);
    transition: width 0.35s ease, left 0.35s ease;
}

.nav-item:hover,
.nav-item.active {
    color: var(--star-gold);
    text-shadow: 0 0 10px var(--star-gold-glow);
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
    left: 0;
}

/* 音乐控制按钮 */
.music-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 217, 132, 0.3);
    color: var(--starlight-white);
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.35s ease;
    box-shadow: 0 0 15px rgba(179, 136, 255, 0.15);
}

.music-btn:hover {
    background: rgba(255, 217, 132, 0.15);
    border-color: var(--star-gold);
    box-shadow: 0 0 20px var(--star-gold-glow);
    transform: translateY(-1px);
}

.music-icon {
    display: inline-block;
    font-size: 1rem;
    color: var(--star-gold);
}

/* 音乐播放状态下的旋转与呼吸发光 */
.music-btn.playing {
    background: rgba(255, 217, 132, 0.18);
    border-color: var(--star-gold);
    box-shadow: 0 0 22px var(--star-gold-glow);
}

.music-btn.playing .music-icon {
    animation: spin-music 4s linear infinite;
}

/* ==========================================================================
   5. 首屏 Hero 区域
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 1.5rem 3rem;
    position: relative;
}

.hero-content {
    max-width: 780px;
    z-index: 2;
    /* 轻微悬浮呼吸感 */
    animation: float-slow 6s ease-in-out infinite;
}

.hero-coordinate {
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.35em;
    color: var(--star-gold);
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    opacity: 0.9;
    text-shadow: 0 0 12px var(--star-gold-glow);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    margin-bottom: 1.6rem;
    background: linear-gradient(135deg, #ffffff 0%, #ffe6b3 45%, #ffb8d1 80%, #d4b8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 28px rgba(255, 217, 132, 0.32));
    animation: title-breathe 5s ease-in-out infinite;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: 0.12em;
    line-height: 2;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85), 0 0 24px rgba(179, 136, 255, 0.35);
}

/* 向下滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    gap: 0.6rem;
    transition: color 0.3s ease;
}

.scroll-indicator:hover {
    color: var(--star-gold);
}

.scroll-text {
    font-size: 0.78rem;
    letter-spacing: 0.25em;
    opacity: 0.8;
}

.scroll-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-arrow span {
    display: block;
    width: 10px;
    height: 10px;
    border-bottom: 1.5px solid var(--star-gold);
    border-right: 1.5px solid var(--star-gold);
    transform: rotate(45deg);
    margin: -3px;
    animation: arrow-wave 2s infinite;
}

.scroll-arrow span:nth-child(2) {
    animation-delay: 0.25s;
}

/* ==========================================================================
   6. 预留模块容器与玻璃拟态卡片 (.glass-card)
   ========================================================================== */
.module-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 1.5rem;
    max-width: 1120px;
    margin: 0 auto;
}

.glass-card {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3.5rem 2.5rem;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 25px rgba(255, 255, 255, 0.03);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

/* 卡片顶部微妙的星光高光边缘 */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
}

.glass-card:hover {
    border-color: rgba(255, 217, 132, 0.28);
    box-shadow: 
        0 24px 60px rgba(0, 0, 0, 0.6),
        0 0 35px rgba(179, 136, 255, 0.12),
        inset 0 0 30px rgba(255, 217, 132, 0.04);
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.28em;
    color: var(--nebula-pink);
    margin-bottom: 0.6rem;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 500;
    color: var(--starlight-white);
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
    text-shadow: 0 0 18px rgba(255, 217, 132, 0.25);
}

.section-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* 占位容器样式（后续开发具体模块时可直接替换内部内容） */
.placeholder-box {
    min-height: 260px;
    border: 1px dashed rgba(255, 217, 132, 0.22);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 6, 24, 0.3);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.92rem;
    letter-spacing: 0.08em;
}

/* ==========================================================================
   7. 页尾区域 (#footer)
   ========================================================================== */
.glass-footer {
    margin-top: 4rem;
    padding: 3.5rem 1.5rem;
    background: rgba(6, 3, 14, 0.65);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-content {
    max-width: 720px;
    margin: 0 auto;
}

.footer-divider {
    color: var(--star-gold);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    animation: pulse-star 3s infinite ease-in-out;
}

.footer-quote {
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
    margin-bottom: 1.2rem;
    font-style: italic;
}

.footer-copyright {
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
}

/* ==========================================================================
   8. 呼吸光效与关键帧动画
   ========================================================================== */
@keyframes pulse-star {
    0%, 100% {
        opacity: 0.65;
        transform: scale(0.95);
        text-shadow: 0 0 8px var(--star-gold);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
        text-shadow: 0 0 18px var(--star-gold), 0 0 30px var(--nebula-pink);
    }
}

@keyframes title-breathe {
    0%, 100% {
        filter: drop-shadow(0 0 22px rgba(255, 217, 132, 0.28));
    }
    50% {
        filter: drop-shadow(0 0 38px rgba(255, 172, 199, 0.55));
    }
}

@keyframes float-slow {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes arrow-wave {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-5px, -5px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) translate(5px, 5px);
    }
}

@keyframes spin-music {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   9. 移动端响应式适配
   ========================================================================== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.8rem 1.2rem;
    }
    .nav-links {
        display: none; /* 移动端保持极简，仅保留品牌名与音乐开关 */
    }
    .glass-card {
        padding: 2.2rem 1.4rem;
        border-radius: 18px;
    }
    .module-section {
        padding: 3.5rem 1rem;
        min-height: auto;
    }
}
/* ==========================================================================
   计时器模块专属样式 (#timer)
   ========================================================================== */
.timer-card {
    text-align: center;
    max-width: 860px;
    margin: 0 auto;
}

.timer-hero {
    margin-bottom: 2.2rem;
}

.days-badge {
    display: inline-block;
    padding: 0.28rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 217, 132, 0.12);
    border: 1px solid rgba(255, 217, 132, 0.35);
    color: var(--star-gold);
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    margin-bottom: 0.8rem;
}

.days-count-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.6rem;
}

.big-number {
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 11vw, 7.5rem);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, #fff7d6 0%, #ffd984 45%, #ffacc7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 24px rgba(255, 217, 132, 0.4));
    animation: title-breathe 4s ease-in-out infinite;
}

.days-unit {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--nebula-pink);
    letter-spacing: 0.15em;
    font-weight: 700;
}

.days-meta {
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    margin-top: 0.4rem;
}

/* 倒计时方块网格 */
.time-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.time-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 1rem 1.4rem;
    min-width: 95px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.time-box:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 217, 132, 0.4);
}

.time-val {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--starlight-white);
    text-shadow: 0 0 12px var(--star-gold-glow);
}

.time-label {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    margin-top: 0.2rem;
}

.time-divider {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--star-gold);
    opacity: 0.6;
    animation: pulse-star 2s infinite ease-in-out;
}

/* 宇宙浪漫数据指标 */
.cosmic-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(179, 136, 255, 0.18);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.stat-icon {
    font-size: 1.8rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--star-gold);
    letter-spacing: 0.04em;
    margin-top: 0.2rem;
}

/* 里程碑进度条 */
.milestone-box {
    background: rgba(10, 6, 24, 0.45);
    border: 1px solid rgba(255, 172, 199, 0.2);
    border-radius: 14px;
    padding: 1.1rem 1.4rem;
    text-align: left;
}

.milestone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#milestone-title {
    color: var(--starlight-white);
    font-weight: 500;
}

#milestone-countdown {
    color: var(--nebula-pink);
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--nebula-purple), var(--nebula-pink), var(--star-gold));
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(255, 217, 132, 0.5);
    transition: width 1s ease;
}

@media (max-width: 600px) {
    .time-divider {
        display: none;
    }
    .time-box {
        min-width: 72px;
        padding: 0.8rem 0.9rem;
    }
    .time-val {
        font-size: 1.6rem;
    }
}