/* ========================================
   洋洋的小世界 — 情侣纪念站
   主题色: 暖橙 + 米白 + 玫瑰金
   ======================================== */

:root {
    --primary: #e8a87c;
    --primary-dark: #c38d70;
    --secondary: #f4d3a7;
    --rose: #d77a61;
    --rose-light: #f5b7a1;
    --bg: #fdf6ec;
    --bg-warm: #fff9f0;
    --text: #4a3a2e;
    --text-soft: #7a6a5e;
    --text-light: #a89a8e;
    --shadow: 0 10px 40px rgba(215, 122, 97, 0.12);
    --shadow-hover: 0 20px 60px rgba(215, 122, 97, 0.2);
    --radius: 20px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    overflow-x: hidden;
}

/* ===== 浮动爱心背景 ===== */
.hearts-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.heart {
    position: absolute;
    color: var(--rose-light);
    opacity: 0.3;
    animation: float-up linear infinite;
    font-size: 20px;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(253, 246, 236, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 18px 0;
    border-bottom: 1px solid rgba(232, 168, 124, 0.15);
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--rose);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    font-size: 1.6rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.15); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 6px 0;
}

.nav-links a:hover {
    color: var(--rose);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--rose);
    transition: var(--transition);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ===== 主容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 1;
}

/* ===== Hero 首页 ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 60px;
    position: relative;
}

.hero-content {
    max-width: 800px;
    animation: fade-in-up 1s ease-out;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-pretitle {
    color: var(--primary);
    font-size: 1.1rem;
    letter-spacing: 4px;
    margin-bottom: 20px;
    font-weight: 500;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--text);
    margin-bottom: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.hero-title .accent {
    color: var(--rose);
    position: relative;
    display: inline-block;
}

.hero-title .accent::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    height: 12px;
    background: var(--secondary);
    opacity: 0.5;
    z-index: -1;
    border-radius: 4px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-soft);
    margin-bottom: 50px;
    line-height: 1.8;
}

.hero-date {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: white;
    border-radius: 50px;
    box-shadow: var(--shadow);
    color: var(--text-soft);
    font-size: 0.95rem;
    margin-bottom: 40px;
}

.hero-date .divider {
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

/* ===== 倒计时 ===== */
.countdown {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.countdown-item {
    background: white;
    border-radius: var(--radius);
    padding: 20px 24px;
    min-width: 90px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.countdown-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.countdown-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--rose);
    line-height: 1;
}

.countdown-label {
    font-size: 0.85rem;
    color: var(--text-soft);
    margin-top: 6px;
    letter-spacing: 1px;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--rose) 0%, var(--primary) 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    color: var(--rose);
    border: 2px solid var(--rose);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--rose);
    color: white;
}

/* ===== 章节通用 ===== */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-pretitle {
    color: var(--primary);
    font-size: 0.95rem;
    letter-spacing: 3px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--text);
    font-weight: 800;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-soft);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== 故事卡片 ===== */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.story-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.story-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.story-card:hover .story-card-image {
    transform: scale(1.05);
}

.story-card-content {
    padding: 24px;
}

.story-card-date {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.story-card-title {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 10px;
    font-weight: 700;
}

.story-card-desc {
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== 时间线 ===== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--primary), var(--rose), var(--primary), transparent);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    margin-bottom: 40px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border: 4px solid var(--rose);
    border-radius: 50%;
    top: 30px;
    z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -9px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -9px;
}

.timeline-content {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}

.timeline-date {
    color: var(--rose);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 8px;
    font-weight: 700;
}

.timeline-text {
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== 相册瀑布流 ===== */
.gallery {
    columns: 3;
    column-gap: 20px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    padding: 30px 20px 18px;
    font-size: 0.9rem;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

/* ===== 留言墙 / 信件 ===== */
.letter {
    background: white;
    border-radius: var(--radius);
    padding: 60px 50px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    line-height: 2;
    font-size: 1.1rem;
    color: var(--text-soft);
    border: 1px solid rgba(232, 168, 124, 0.2);
}

.letter::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 30px;
    font-size: 8rem;
    color: var(--primary);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.letter p {
    margin-bottom: 20px;
}

.letter p:last-child {
    text-align: right;
    margin-top: 40px;
    color: var(--rose);
    font-style: italic;
    font-size: 1.2rem;
}

/* ===== 音乐播放器 ===== */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 16px;
    left: auto;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 10px 14px;
    box-shadow: 0 10px 40px rgba(215, 122, 97, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 280px;
    width: max-content;
    border: 1px solid rgba(232, 168, 124, 0.2);
    box-sizing: border-box;
    overflow: hidden;
}

.music-player.expanded {
    border-radius: 24px;
    padding: 16px 20px;
    max-width: 340px;
    width: 320px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    right: 12px;
    bottom: 16px;
}

.player-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose) 0%, var(--primary) 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(215, 122, 97, 0.3);
}

.player-btn:hover {
    transform: scale(1.08);
}

.player-btn.small {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

.player-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    padding: 0 4px;
}
.player-info:hover .player-title {
    color: var(--rose);
}

.player-title {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.player-artist {
    color: var(--text-soft);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.player-progress {
    width: 100%;
    height: 4px;
    background: rgba(232, 168, 124, 0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.player-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--rose) 0%, var(--primary) 100%);
    border-radius: 2px;
    width: 0%;
    transition: width 0.2s linear;
}

.player-time {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--text-soft);
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
    text-align: center;
}

.player-time .player-time-current {
    text-align: left;
    color: var(--rose);
    font-weight: 600;
}

.player-time .player-time-total {
    text-align: right;
}

.player-playlist {
    max-height: 200px;
    overflow-y: auto;
    border-top: 1px solid rgba(232, 168, 124, 0.15);
    padding-top: 8px;
    margin-top: 4px;
}

.player-playlist-item {
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-soft);
    transition: var(--transition);
}

.player-playlist-item:hover {
    background: rgba(232, 168, 124, 0.1);
    color: var(--text);
}

.player-playlist-item.active {
    background: rgba(215, 122, 97, 0.15);
    color: var(--rose);
    font-weight: 600;
}

.player-playlist-item .item-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.player-playlist-item .item-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-expand-btn {
    background: none;
    border: none;
    color: var(--rose);
    cursor: pointer;
    padding: 4px;
    font-size: 1.15rem;
    transition: var(--transition);
    flex-shrink: 0;
    line-height: 1;
    animation: heart-beat 1.6s ease-in-out infinite;
}

.player-expand-btn:hover {
    color: var(--rose);
    transform: scale(1.25);
}

@keyframes heart-beat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.05); }
}

@media (max-width: 600px) {
    .music-player {
        bottom: 12px;
        right: 12px;
        left: auto;
        max-width: 220px;
        width: max-content;
    }
    .music-player.expanded {
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }
}

/* 等待用户首次交互的提示气泡 */
.player-waiting-hint {
    flex-basis: 100%;
    background: linear-gradient(135deg, var(--rose) 0%, var(--primary) 100%);
    color: white;
    text-align: center;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.78rem;
    margin-top: 6px;
    animation: hint-pulse 1.6s ease-in-out infinite;
    box-shadow: 0 4px 12px rgba(215, 122, 97, 0.3);
}
@keyframes hint-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.04); opacity: 0.92; }
}

/* ===== 主题切换器 ===== */
.theme-switcher {
    position: fixed;
    top: 110px;
    right: 20px;
    z-index: 998;
}

.theme-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--rose);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}
.theme-toggle:hover {
    transform: scale(1.12) rotate(20deg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.theme-panel {
    position: absolute;
    top: 60px;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.18);
    min-width: 200px;
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
    transform-origin: top right;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(232, 168, 124, 0.2);
}
.theme-switcher.open .theme-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.theme-panel-title {
    padding: 6px 12px 10px;
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(232, 168, 124, 0.15);
    margin-bottom: 6px;
}

.theme-option {
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    color: var(--text);
    font-size: 0.92rem;
}

.theme-option:hover {
    background: var(--bg-warm);
    transform: translateX(2px);
}

.theme-option.active {
    background: var(--bg-warm);
    color: var(--rose);
    font-weight: 600;
}

.theme-emoji {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.theme-name {
    flex: 1;
}

@media (max-width: 600px) {
    .theme-switcher {
        top: 96px;
        right: 12px;
    }
    .theme-toggle {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    .theme-panel {
        min-width: 170px;
    }
}

/* ===== 飘落花瓣（已禁用，保留供未来启用） =====
.petal-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.petal {
    position: absolute;
    top: -40px;
    pointer-events: none;
    will-change: transform;
    animation: petal-fall linear infinite;
    user-select: none;
}
@keyframes petal-fall {
    0% {
        transform: translate(0, 0) rotate(var(--rotate-start, 0deg));
        opacity: 0;
    }
    8% { opacity: 1; }
    92% { opacity: 1; }
    100% {
        transform: translate(var(--sway, 0), 110vh) rotate(var(--rotate-end, 360deg));
        opacity: 0;
    }
}
===== */

/* ===== 主题切换模块 ===== */
.theme-section {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 50%, var(--bg) 100%);
    position: relative;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
}

.theme-card {
    background: white;
    border: 3px solid transparent;
    border-radius: 18px;
    padding: 24px 16px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.theme-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rose), var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.theme-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.12);
    border-color: var(--rose-light);
}

.theme-card:hover::before {
    opacity: 1;
}

.theme-card.active {
    border-color: var(--rose);
    background: linear-gradient(180deg, white 0%, var(--bg-warm) 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(215, 122, 97, 0.25);
}

.theme-card.active::before {
    opacity: 1;
}

.theme-card.active::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--rose);
    color: white;
    border-radius: 50%;
    line-height: 24px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.theme-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--rose) 0%, var(--primary) 100%);
    color: white;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.theme-card-emoji {
    font-size: 2.6rem;
    margin-bottom: 8px;
    line-height: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-card:hover .theme-card-emoji,
.theme-card.active .theme-card-emoji {
    transform: scale(1.15) rotate(-8deg);
}

.theme-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.theme-card-desc {
    font-size: 0.78rem;
    color: var(--text-soft);
    margin-bottom: 12px;
    line-height: 1.4;
}

.theme-card-swatches {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.theme-card-swatches span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.theme-card:hover .theme-card-swatches span {
    transform: scale(1.15);
}

.theme-hint {
    text-align: center;
    color: var(--text-soft);
    font-size: 0.88rem;
    margin-top: 30px;
    opacity: 0.85;
}

@media (max-width: 980px) {
    .theme-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .theme-card:last-child {
        grid-column: span 3;
        max-width: 240px;
        margin: 0 auto;
    }
}
@media (max-width: 600px) {
    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .theme-card:last-child {
        grid-column: span 2;
        max-width: 220px;
    }
    .theme-card-emoji {
        font-size: 2.2rem;
    }
}

/* ===== 管理页面 ===== */
.admin-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 120px 20px 60px;
    position: relative;
    z-index: 1;
}

.admin-login {
    background: white;
    border-radius: var(--radius);
    padding: 50px 40px;
    box-shadow: var(--shadow);
    max-width: 400px;
    margin: 80px auto;
    text-align: center;
}

.admin-login h2 {
    color: var(--rose);
    margin-bottom: 10px;
}

.admin-login input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(232, 168, 124, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 16px;
    transition: var(--transition);
    background: var(--bg-warm);
}

.admin-login input:focus {
    outline: none;
    border-color: var(--rose);
    background: white;
}

.admin-panel {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.admin-panel h2 {
    color: var(--rose);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-zone {
    border: 2px dashed rgba(232, 168, 124, 0.5);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    transition: var(--transition);
    cursor: pointer;
    background: var(--bg-warm);
}

.upload-zone:hover, .upload-zone.dragging {
    border-color: var(--rose);
    background: rgba(215, 122, 97, 0.05);
}

.upload-zone-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.upload-zone-text {
    color: var(--text-soft);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.upload-zone-hint {
    color: var(--text-light);
    font-size: 0.8rem;
}

.upload-zone input[type="file"] {
    display: none;
}

.upload-progress {
    margin-top: 16px;
    background: rgba(232, 168, 124, 0.1);
    border-radius: 8px;
    overflow: hidden;
    height: 8px;
    display: none;
}

.upload-progress.active {
    display: block;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--rose) 0%, var(--primary) 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.music-list {
    list-style: none;
}

.music-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(232, 168, 124, 0.15);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: var(--transition);
    background: var(--bg-warm);
}

.music-item:hover {
    border-color: rgba(232, 168, 124, 0.4);
    transform: translateX(4px);
}

.music-item-info {
    flex: 1;
    min-width: 0;
}

.music-item-name {
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-item-meta {
    color: var(--text-light);
    font-size: 0.8rem;
}

.music-item-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 1px solid rgba(232, 168, 124, 0.3);
    color: var(--text-soft);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon:hover {
    border-color: var(--rose);
    color: var(--rose);
}

.btn-icon.danger:hover {
    background: var(--rose);
    color: white;
    border-color: var(--rose);
}

.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: white;
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--rose);
    color: var(--text);
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 320px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left-color: #4caf50;
}

.toast.error {
    border-left-color: #f44336;
}

/* ===== 页脚 ===== */
.footer {
    background: linear-gradient(135deg, #4a3a2e 0%, #6b5547 100%);
    color: rgba(255, 255, 255, 0.85);
    padding: 60px 0 30px;
    text-align: center;
    margin-top: 100px;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--secondary);
}

.footer-sub {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.footer-divider {
    width: 60px;
    height: 2px;
    background: var(--rose);
    margin: 30px auto;
    border-radius: 2px;
}

.footer-emojis {
    text-align: center;
    margin: 24px 0 6px;
    font-size: 0;
}
.footer-emoji {
    display: inline-block;
    font-size: 1.6rem;
    margin: 0 10px;
    animation: footer-emoji-bounce 1.8s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    cursor: default;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.footer-emoji:hover {
    transform: scale(1.4) translateY(-4px) rotate(-8deg);
}
@keyframes footer-emoji-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.08); }
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-links {
        gap: 16px;
    }
    
    .nav-links a {
        font-size: 0.85rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .countdown {
        gap: 10px;
    }
    
    .countdown-item {
        padding: 14px 18px;
        min-width: 70px;
    }
    
    .countdown-num {
        font-size: 1.6rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .letter {
        padding: 40px 24px;
        font-size: 1rem;
    }
    
    .gallery {
        columns: 2;
        column-gap: 12px;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 70px;
        padding-right: 0;
    }
    
    .timeline-item .timeline-dot {
        left: 21px !important;
        right: auto !important;
    }
}

@media (max-width: 480px) {
    .gallery {
        columns: 1;
    }
    
    .container {
        padding: 0 16px;
    }
}

/* ===== 密码门禁 ===== */
.site-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gate-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gate-bg-1, #fdf6ec) 0%, var(--gate-bg-2, #fff9f0) 40%, var(--gate-bg-3, #fce4d4) 100%);
    transition: background 0.8s ease;
}

.gate-card {
    position: relative;
    z-index: 1;
    background: white;
    border-radius: 28px;
    padding: 56px 48px 48px;
    max-width: 420px;
    width: calc(100% - 48px);
    text-align: center;
    box-shadow: 0 20px 80px rgba(215, 122, 97, 0.2), 0 4px 20px rgba(0,0,0,0.06);
    animation: gate-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes gate-in {
    from { opacity: 0; transform: scale(0.85) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.gate-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: heartbeat 1.5s ease-in-out infinite;
    display: block;
}

.gate-title {
    font-size: 1.8rem;
    color: var(--text);
    font-weight: 800;
    margin-bottom: 10px;
}

.gate-subtitle {
    color: var(--text-soft);
    font-size: 1rem;
    margin-bottom: 32px;
    line-height: 1.7;
}

.gate-hint {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 4px;
}

.gate-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gate-form input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(232, 168, 124, 0.3);
    border-radius: 14px;
    font-size: 1rem;
    background: var(--bg-warm);
    color: var(--text);
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.gate-form input:focus {
    outline: none;
    border-color: var(--rose);
    background: white;
    box-shadow: 0 0 0 4px rgba(215, 122, 97, 0.1);
}

.gate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--rose) 0%, var(--primary) 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(215, 122, 97, 0.35);
}

.gate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(215, 122, 97, 0.45);
}

.gate-error {
    margin-top: 12px;
    color: #e53935;
    font-size: 0.9rem;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

@media (max-width: 480px) {
    .gate-card {
        padding: 44px 32px 36px;
    }
    .gate-title {
        font-size: 1.5rem;
    }
}

/* ===== 签名小青龙 ===== */
.letter-sign {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.sign-dragon {
    height: 1.6em;
    width: auto;
    vertical-align: middle;
    animation: dragon-bounce 2.4s ease-in-out infinite;
}
@keyframes dragon-bounce {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-4px) rotate(2deg); }
}

/* ===== 小青龙四宫格绘本 ===== */
.dragon-story {
    background: linear-gradient(180deg, #fdf6ec 0%, #f5e6d8 50%, #fdf6ec 100%);
    position: relative;
    overflow: hidden;
    padding: 70px 0 80px;
}

.dragon-story::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(116, 199, 162, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(215, 122, 97, 0.1) 0%, transparent 30%);
    pointer-events: none;
}

/* 绘本封面区 */
.storybook-cover {
    max-width: 760px;
    margin: 0 auto 50px;
    text-align: center;
    background: linear-gradient(135deg, #fff9e6 0%, #fce4d4 100%);
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow:
        0 4px 20px rgba(215, 122, 97, 0.15),
        inset 0 0 0 2px rgba(255, 255, 255, 0.6);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease;
}
.storybook-cover.visible {
    opacity: 1;
    transform: translateY(0);
}
.storybook-cover::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px dashed rgba(215, 122, 97, 0.3);
    border-radius: 10px;
    pointer-events: none;
}
.storybook-title {
    font-size: 1.6rem;
    color: var(--rose);
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: 2px;
}
.storybook-sub {
    color: var(--text-soft);
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
}
.storybook-tag {
    display: inline-block;
    background: white;
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 4宫格主容器 - 居中 + 缩小 */
.storyboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    max-width: 620px;
    margin: 0 auto;
    position: relative;
}

.story-cell {
    background: #fffdf8;
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 6px 24px rgba(215, 122, 97, 0.12),
        0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
    border: 2px solid #fff;
    position: relative;
}

.story-cell.visible {
    opacity: 1;
    transform: translateY(0);
}

.story-cell:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 16px 40px rgba(215, 122, 97, 0.22);
}

.story-cell:nth-child(1) { transition-delay: 0.05s; }
.story-cell:nth-child(2) { transition-delay: 0.15s; }
.story-cell:nth-child(3) { transition-delay: 0.25s; }
.story-cell:nth-child(4) { transition-delay: 0.35s; }

.story-frame {
    background: linear-gradient(135deg, #f0faf4 0%, #e2f5e8 100%);
    padding: 14px 14px 10px;
    text-align: center;
    position: relative;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-bottom: 1px dashed rgba(116, 199, 162, 0.3);
}

/* 绘本风的方框边框 */
.story-frame::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    pointer-events: none;
}

.story-dragon {
    width: 110px;
    height: 110px;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    display: block;
    margin: 0 auto;
}

.story-cell:hover .story-dragon {
    transform: scale(1.08) rotate(-2deg);
}

.story-cell[data-step="1"] .story-dragon { animation: dragon-wiggle 3s ease-in-out infinite; }
.story-cell[data-step="2"] .story-dragon { animation: dragon-cool 3.5s ease-in-out infinite; }
.story-cell[data-step="3"] .story-dragon { animation: dragon-sleep 4s ease-in-out infinite; }
.story-cell[data-step="4"] .story-dragon { animation: dragon-hero 2.5s ease-in-out infinite; }

@keyframes dragon-wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}
@keyframes dragon-cool {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1.03); }
}
@keyframes dragon-sleep {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-2px) scale(0.98); }
}
@keyframes dragon-hero {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.story-bubble {
    background: white;
    border-radius: 14px;
    padding: 4px 12px;
    margin-top: 8px;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 500;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: inline-block;
}

.story-bubble::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
}

.story-caption {
    padding: 14px 18px 18px;
    text-align: center;
}

.story-num {
    display: inline-block;
    background: linear-gradient(135deg, var(--rose) 0%, var(--primary) 100%);
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    text-align: center;
    line-height: 26px;
    font-weight: 700;
    font-size: 0.78rem;
    margin-bottom: 6px;
}

.story-caption h3 {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.story-caption p {
    color: var(--text-soft);
    font-size: 0.8rem;
    line-height: 1.6;
    margin: 0;
}

.story-divider {
    text-align: center;
    margin: 40px 0 12px;
    font-size: 1.4rem;
    color: var(--rose);
    animation: heartbeat 1.5s ease-in-out infinite;
}

.story-ending {
    text-align: center;
    color: var(--text-soft);
    font-size: 0.9rem;
    font-style: italic;
    margin: 0 auto;
    letter-spacing: 1px;
    max-width: 500px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.7s ease;
}
.story-ending.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .storyboard {
        grid-template-columns: 1fr;
        gap: 18px;
        max-width: 320px;
    }
    .story-dragon {
        width: 110px;
        height: 110px;
    }
    .storybook-cover {
        padding: 22px 20px;
    }
    .storybook-title {
        font-size: 1.3rem;
    }
}
