/* ============================================================
   国庆庆祝页面 · 全局样式
   主题色：中国红 #c1272d / 国旗红 #e60012 / 金黄 #f7c800
   ============================================================ */
:root {
    --red: #c1272d;
    --red-deep: #8f1d22;
    --red-flag: #e60012;
    --gold: #f7c800;
    --gold-light: #ffdf6b;
    --ink: #2b2b2b;
    --paper: #fffaf0;
    --muted: #8a7a63;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ---------- 烟花画布 ---------- */
#fireworks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---------- 顶部导航 ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(139, 28, 33, 0.92);
    backdrop-filter: blur(6px);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.navbar-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 18px;
}

.nav-links a {
    color: #ffe9e9;
    text-decoration: none;
    margin-left: 22px;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--gold);
}

/* ---------- 主视觉 ---------- */
.hero {
    position: relative;
    z-index: 1;
    min-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background:
        radial-gradient(circle at 15% 20%, rgba(247, 200, 0, 0.18), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(230, 0, 18, 0.18), transparent 45%),
        linear-gradient(180deg, #fffdf6 0%, #fff6e6 100%);
}

.badge {
    display: inline-block;
    background: var(--red);
    color: #fff;
    font-size: 14px;
    padding: 8px 18px;
    border-radius: 999px;
    letter-spacing: 2px;
    margin-bottom: 18px;
    box-shadow: 0 4px 14px rgba(193, 39, 45, 0.35);
}

.hero-title {
    font-size: clamp(34px, 7vw, 72px);
    font-weight: 800;
    letter-spacing: 6px;
    color: var(--red-deep);
}

.hero-title .accent {
    color: var(--gold);
    text-shadow: 0 0 8px rgba(247, 200, 0, 0.6);
}

.hero-sub {
    margin-top: 16px;
    font-size: clamp(14px, 2.4vw, 19px);
    color: #6b4f33;
    max-width: 560px;
}

/* ---------- 倒计时 ---------- */
.countdown {
    margin-top: 36px;
}

.cd-title {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.cd-grid {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cd-cell {
    background: var(--red);
    color: #fff;
    border-radius: 14px;
    padding: 14px 20px;
    min-width: 78px;
    box-shadow: 0 6px 18px rgba(193, 39, 45, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cd-num {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.cd-label {
    font-size: 12px;
    color: #ffd9d9;
    margin-top: 2px;
}

.scroll-hint {
    position: absolute;
    bottom: 18px;
    font-size: 13px;
    color: var(--muted);
    animation: bob 1.6s ease-in-out infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* ---------- 通用区块 ---------- */
.section {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    padding: 70px 20px;
}

.section-alt {
    background: linear-gradient(180deg, #fdeee9, #fff4ef);
    border-radius: 24px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.section-head {
    text-align: center;
    margin-bottom: 40px;
}

.section-head h2 {
    font-size: clamp(24px, 4vw, 34px);
    color: var(--red-deep);
    letter-spacing: 3px;
}

.section-sub {
    color: var(--muted);
    margin-top: 8px;
    font-size: 14px;
}

/* ---------- 时间轴 ---------- */
.timeline {
    position: relative;
    margin: 0 auto;
    max-width: 700px;
    padding-left: 30px;
    border-left: 3px solid var(--red);
}

.tl-item {
    position: relative;
    padding: 18px 0 18px 30px;
    display: grid;
    grid-template-columns: 90px 1fr;
    column-gap: 18px;
}

.tl-dot {
    position: absolute;
    left: -38px;
    top: 28px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gold);
    border: 3px solid var(--red);
    box-shadow: 0 0 0 4px #fff0e6;
}

.tl-year {
    font-size: 22px;
    font-weight: 800;
    color: var(--red);
    align-self: start;
}

.tl-text h4 {
    font-size: 17px;
    color: var(--ink);
}

.tl-text p {
    font-size: 14px;
    color: #5c5c5c;
    margin-top: 4px;
}

/* ---------- 祝福墙 ---------- */
.wish-wall {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    max-height: 720px;
    overflow-y: auto;
    padding-right: 8px;
}

.wish-wall::-webkit-scrollbar {
    width: 6px;
}

.wish-wall::-webkit-scrollbar-thumb {
    background: rgba(193, 39, 45, 0.3);
    border-radius: 3px;
}

.wish-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 4px 16px rgba(193, 39, 45, 0.08);
    border-left: 4px solid var(--gold);
    transition: transform 0.25s;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
}

.wish-card:hover {
    transform: translateY(-4px);
}

.wish-text {
    font-size: 14px;
    color: #333;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.6;
}

.wish-from {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
    text-align: right;
}

/* ---------- 留言表单 ---------- */
.wish-form {
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 26px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.06);
}

.form-row {
    margin-bottom: 16px;
}

.wish-form input,
.wish-form textarea {
    width: 100%;
    border: 1.5px solid #e2d7c8;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    background: #fffdf8;
    outline: none;
    transition: border-color 0.2s;
}

.wish-form input:focus,
.wish-form textarea:focus {
    border-color: var(--red);
}

.wish-form textarea {
    resize: vertical;
}

#wish-name {
    box-sizing: border-box;
}

.btn {
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.btn:hover {
    background: var(--red-deep);
    transform: translateY(-2px);
}

.form-tip {
    margin-left: 14px;
    font-size: 13px;
    color: var(--red);
}

/* ---------- 页脚 ---------- */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 30px 20px;
    background: var(--red-deep);
    color: #ffe3e3;
    font-size: 13px;
}

.footer-sub {
    margin-top: 6px;
    color: #f3c0c0;
    font-size: 12px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
    body {
        font-size: 16px;
    }
    .navbar-inner {
        padding: 12px 16px;
    }
    .nav-links a {
        margin-left: 12px;
        font-size: 13px;
    }
    .hero {
        min-height: 80vh;
    }
    .tl-item {
        grid-template-columns: 70px 1fr;
        padding-left: 18px;
    }
    .cd-cell {
        min-width: 62px;
        padding: 10px 12px;
    }
    .cd-num {
        font-size: 26px;
    }
    .wish-form input,
    .wish-form textarea {
        font-size: 16px;
    }
    .wish-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .wish-card {
        padding: 14px;
    }
    .wish-text {
        font-size: 13px;
    }
}


/* ===== 音乐开关按钮 ===== */
#music-toggle {
    position: fixed;
    top: 12.5vh;
    right: 20px;
    z-index: 9999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(193, 39, 45, 0.95);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(193, 39, 45, 0.5);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

#music-toggle:hover {
    background: rgba(193, 39, 45, 1);
    transform: scale(1.1);
}

#music-toggle.playing {
    animation: music-spin 3s linear infinite;
}

@keyframes music-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#music-toggle.paused {
    background: rgba(120, 120, 120, 0.8);
    animation: none;
}

@media (max-width: 640px) {
    #music-toggle {
        top: 70px;
        right: 12px;
        width: 44px;
        height: 44px;
        font-size: 18px;
        z-index: 99999;
        -webkit-tap-highlight-color: transparent;
    }
}


/* ===== 进入引导遮罩 ===== */
#entry-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#entry-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.entry-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b0000 0%, #c1272d 30%, #de2910 60%, #c1272d 100%);
}

.entry-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,222,0,0.1) 0%, transparent 50%);
    animation: entry-glow 4s ease-in-out infinite;
}

@keyframes entry-glow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.entry-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding: 40px 30px;
    max-width: 500px;
}

.entry-flag {
    margin-bottom: 30px;
    display: inline-block;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
    animation: flag-wave 3s ease-in-out infinite;
}

@keyframes flag-wave {
    0%, 100% { transform: rotate(-3deg) scale(1); }
    50% { transform: rotate(3deg) scale(1.05); }
}

.entry-flag svg {
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.entry-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 16px;
    text-shadow: 0 2px 15px rgba(0,0,0,0.4);
    letter-spacing: 3px;
    line-height: 1.4;
}

.entry-subtitle {
    font-size: 20px;
    letter-spacing: 8px;
    margin-bottom: 12px;
    color: #ffde00;
    font-weight: 300;
}

.entry-tip {
    font-size: 15px;
    opacity: 0.85;
    margin-bottom: 35px;
    letter-spacing: 4px;
}

#entry-btn {
    background: linear-gradient(135deg, #ffde00 0%, #ffb700 100%);
    color: #8b0000;
    border: none;
    padding: 16px 50px;
    font-size: 17px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(255, 222, 0, 0.4);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    letter-spacing: 2px;
}

#entry-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 35px rgba(255, 222, 0, 0.6);
}

#entry-btn:active {
    transform: translateY(0) scale(0.98);
}

.entry-btn-music {
    font-size: 12px;
    opacity: 0.8;
    font-weight: normal;
    letter-spacing: 1px;
}

@media (max-width: 640px) {
    .entry-title {
        font-size: 22px;
        letter-spacing: 2px;
    }
    .entry-subtitle {
        font-size: 16px;
        letter-spacing: 6px;
    }
    .entry-tip {
        font-size: 13px;
        letter-spacing: 3px;
    }
    #entry-btn {
        padding: 14px 40px;
        font-size: 15px;
    }
    .entry-flag svg {
        width: 80px;
        height: 53px;
    }
}

/* ===== 音乐开关按钮 ===== */
#music-toggle {
    position: fixed;
    top: 12.5vh;
    right: 20px;
    z-index: 9999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(193, 39, 45, 0.95);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(193, 39, 45, 0.5);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

#music-toggle:hover {
    background: rgba(193, 39, 45, 1);
    transform: scale(1.1);
}

#music-toggle.playing {
    animation: music-spin 3s linear infinite;
}

@keyframes music-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#music-toggle.paused {
    background: rgba(120, 120, 120, 0.8);
    animation: none;
}

@media (max-width: 640px) {
    #music-toggle {
        top: 70px;
        right: 12px;
        width: 44px;
        height: 44px;
        font-size: 18px;
        z-index: 99999;
        -webkit-tap-highlight-color: transparent;
    }
}


/* ===== 进入引导遮罩 ===== */
#entry-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #c1272d 0%, #8b0000 50%, #c1272d 100%);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s, visibility 0.6s;
}

#entry-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.entry-content {
    text-align: center;
    color: #fff;
    padding: 40px;
}

.entry-flag {
    font-size: 80px;
    margin-bottom: 20px;
    animation: flag-wave 2s ease-in-out infinite;
}

@keyframes flag-wave {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.entry-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    letter-spacing: 2px;
}

.entry-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 30px;
}

#entry-btn {
    background: #f7c800;
    color: #c1272d;
    border: none;
    padding: 14px 50px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(247, 200, 0, 0.4);
}

#entry-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(247, 200, 0, 0.6);
}

#entry-btn:active {
    transform: scale(0.98);
}

@media (max-width: 640px) {
    .entry-flag {
        font-size: 60px;
    }
    .entry-title {
        font-size: 22px;
    }
    .entry-subtitle {
        font-size: 14px;
    }
    #entry-btn {
        padding: 12px 40px;
        font-size: 16px;
    }
}
