/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e74c3c;
    --secondary-color: #f39c12;
    --bg-color: #1a1a2e;
    --text-color: #eee;
    --accent-pink: #ff6b9d;
    --accent-gold: #ffd700;
}

body {
    font-family: 'Noto Serif SC', serif;
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.8;
}

/* ==================== 可爱动画背景 ==================== */
.cute-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-cute {
    position: absolute;
    bottom: -50px;
    animation: floatUpCute linear forwards;
    filter: drop-shadow(0 0 5px rgba(255, 107, 157, 0.3));
}

@keyframes floatUpCute {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-110vh) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: sparkleAnim 2s ease-out forwards;
    box-shadow: 0 0 10px white, 0 0 20px var(--accent-pink);
}

@keyframes sparkleAnim {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* ==================== 开场动画 ==================== */
.intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 1s ease, visibility 1s ease;
}

.intro.hidden {
    opacity: 0;
    visibility: hidden;
}

.intro-content {
    text-align: center;
    animation: fadeInUp 1.5s ease;
}

.intro-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 3rem;
    color: var(--accent-pink);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 107, 157, 0.5);
}

.intro-subtitle {
    font-size: 4rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.intro-date {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 3rem;
}

.start-btn {
    background: linear-gradient(45deg, var(--accent-pink), var(--primary-color));
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Noto Serif SC', serif;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.4);
}

.start-btn .heart {
    animation: heartbeat 1s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 音频控制 ==================== */
.audio-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 10px;
}

.audio-control.hidden {
    display: none;
}

.audio-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent-pink);
    background: rgba(255, 107, 157, 0.2);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.audio-btn:hover {
    background: rgba(255, 107, 157, 0.4);
}

.audio-btn.playing {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(255, 107, 157, 0); }
}

/* ==================== 主时间轴 ==================== */
.timeline {
    padding: 5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.timeline.hidden {
    display: none;
}

/* 时间轴中心线 */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, 
        transparent, 
        var(--accent-pink) 5%, 
        var(--accent-pink) 95%, 
        transparent);
}

/* 时间节点 */
.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    text-align: right;
    padding-right: calc(50% + 40px);
}

.timeline-item:nth-child(even) {
    text-align: left;
    padding-left: calc(50% + 40px);
}

/* 时间点标记 */
.timeline-item::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background: var(--accent-pink);
    border-radius: 50%;
    border: 4px solid var(--bg-color);
    box-shadow: 0 0 15px var(--accent-pink);
}

.timeline-item:nth-child(odd)::before {
    right: calc(50% - 10px);
}

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

/* 年份标签 */
.timeline-year {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* 标题 */
.timeline-title {
    font-size: 1.5rem;
    color: var(--accent-pink);
    margin-bottom: 1rem;
}

/* 内容 */
.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 157, 0.2);
}

.timeline-text {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #ccc;
}

/* ==================== 图片和切换按钮 ==================== */
.timeline-images {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-image {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, filter 0.3s;
}

.timeline-image:hover {
    transform: scale(1.02);
}

/* 图片切换按钮组 */
.image-toggle-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.image-toggle-btn {
    padding: 6px 12px;
    border: 1px solid rgba(255, 107, 157, 0.5);
    border-radius: 20px;
    background: rgba(255, 107, 157, 0.1);
    color: #ccc;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.image-toggle-btn:hover:not(.disabled) {
    background: rgba(255, 107, 157, 0.3);
    color: white;
}

.image-toggle-btn.active {
    background: linear-gradient(135deg, var(--accent-pink) 0%, #c44569 100%);
    color: white;
    border-color: var(--accent-pink);
}

.image-toggle-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 特殊节点 - 孩子 */
.timeline-item.kids .timeline-content {
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.1), rgba(255, 218, 185, 0.1));
    border-color: rgba(255, 182, 193, 0.3);
}

/* ==================== 歌曲播放器 ==================== */
.song-player {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.15) 0%, rgba(255, 215, 0, 0.1) 100%);
    border: 1px solid rgba(255, 107, 157, 0.3);
    border-radius: 15px;
    padding: 15px 20px;
    margin-top: 1.5rem;
}

.song-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.song-icon {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

.song-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.song-singer {
    font-size: 0.9rem;
    color: #888;
}

.song-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.song-play-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--accent-pink);
    background: rgba(255, 107, 157, 0.2);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.song-play-btn:hover {
    background: rgba(255, 107, 157, 0.4);
    transform: scale(1.05);
}

.song-progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.song-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.song-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-pink) 0%, var(--accent-gold) 100%);
    border-radius: 4px;
    transition: width 0.1s;
}

.song-time {
    font-size: 0.75rem;
    color: #888;
    text-align: right;
}

.song-quote {
    margin-top: 12px;
    font-style: italic;
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.6;
    border-left: 3px solid var(--accent-pink);
    padding-left: 12px;
}

/* ==================== 动画播放器 ==================== */
.animation-player {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 15px;
    overflow: hidden;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.animation-player .timeline-video {
    display: block;
    width: 100%;
    border-radius: 0;
}

.animation-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
}

.animation-play-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(147, 51, 234, 0.5);
    background: rgba(147, 51, 234, 0.2);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.animation-play-btn:hover {
    background: rgba(147, 51, 234, 0.4);
    transform: scale(1.05);
}

.animation-progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.animation-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.animation-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #9333ea 0%, #3b82f6 100%);
    border-radius: 4px;
    transition: width 0.1s linear;
}

.animation-time {
    font-size: 0.75rem;
    color: #999;
}

.animation-sound-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(147, 51, 234, 0.3);
    background: rgba(147, 51, 234, 0.1);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.animation-sound-btn:hover {
    background: rgba(147, 51, 234, 0.3);
}

/* ==================== 旁白按钮 ==================== */
.narration-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 107, 157, 0.2);
    border: 1px solid var(--accent-pink);
    border-radius: 20px;
    color: var(--accent-pink);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.narration-btn:hover {
    background: rgba(255, 107, 157, 0.4);
}

/* ==================== 结尾 ==================== */
.ending {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    text-align: center;
    position: relative;
    z-index: 10;
}

.ending.hidden {
    display: none;
}

.ending-content {
    animation: fadeInUp 1.5s ease;
}

.ending h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 2rem;
}

.ending-quote {
    font-size: 1.5rem;
    color: var(--accent-pink);
    margin-bottom: 3rem;
    font-style: italic;
}

.ending-signature {
    color: #888;
    margin-bottom: 2rem;
}

.ending-signature p {
    margin: 0.5rem 0;
}

.ending-hearts span {
    font-size: 2rem;
    margin: 0 0.5rem;
    animation: heartbeat 1s infinite;
}

.ending-hearts span:nth-child(2) {
    animation-delay: 0.3s;
}

.ending-hearts span:nth-child(3) {
    animation-delay: 0.6s;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .intro-title {
        font-size: 2rem;
    }
    
    .intro-subtitle {
        font-size: 2.5rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        text-align: left !important;
        padding-left: 50px !important;
        padding-right: 0 !important;
    }
    
    .timeline-item::before {
        left: 10px !important;
        right: auto !important;
    }
    
    .timeline-year {
        font-size: 2rem;
    }
    
    .ending h2 {
        font-size: 2rem;
    }
    
    .song-controls {
        flex-wrap: wrap;
    }
    
    .song-progress-container {
        width: 100%;
    }
    
    .audio-control {
        top: 10px;
        right: 10px;
    }
    
    .audio-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* 世界大事 */
.world-events {
    display: inline-flex;
    gap: 4px;
    margin-left: 10px;
    vertical-align: middle;
}

.world-event {
    font-size: 0.9em;
    cursor: help;
    opacity: 0.7;
    transition: all 0.3s ease;
    filter: grayscale(30%);
}

.world-event:hover {
    opacity: 1;
    transform: scale(1.3);
    filter: grayscale(0%);
}

/* 年份行调整 */
.timeline-year {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(to top, #1a0a0a, transparent);
}

.footer-text {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8em;
    color: #ff6b9d;
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
    animation: footerPulse 2s ease-in-out infinite;
}

@keyframes footerPulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* 天空背景动画 */
.sky-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(to top, 
        #87CEEB 0%,      /* 地面蓝天 */
        #87CEEB 30%,
        #4A90D9 50%,
        #1a1a4a 80%,
        #000011 100%     /* 太空 */
    );
}

/* 太阳 */
.sun {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #FFD700, #FFA500);
    border-radius: 50%;
    box-shadow: 0 0 60px #FFD700, 0 0 100px #FFA500;
    animation: sunMove 60s linear infinite;
}

@keyframes sunMove {
    0% { top: 20%; left: -10%; }
    100% { top: 20%; left: 110%; }
}

/* 月亮 */
.moon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #FFFFEE, #DDD);
    border-radius: 50%;
    box-shadow: 0 0 30px #FFFFEE;
    animation: moonMove 80s linear infinite;
    display: none;
}

@keyframes moonMove {
    0% { top: 15%; left: -10%; }
    100% { top: 15%; left: 110%; }
}

/* 云朵 */
.cloud {
    position: absolute;
    background: white;
    border-radius: 50px;
    opacity: 0.9;
    animation: cloudFloat 30s linear infinite;
}

.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}

.cloud-1 { width: 100px; height: 40px; top: 10%; }
.cloud-1::before { width: 50px; height: 50px; top: -25px; left: 15px; }
.cloud-1::after { width: 35px; height: 35px; top: -15px; left: 50px; }

.cloud-2 { width: 80px; height: 30px; top: 20%; animation-duration: 40s; animation-delay: -10s; }
.cloud-2::before { width: 40px; height: 40px; top: -20px; left: 10px; }
.cloud-2::after { width: 25px; height: 25px; top: -10px; left: 40px; }

.cloud-3 { width: 120px; height: 45px; top: 8%; animation-duration: 50s; animation-delay: -20s; }
.cloud-3::before { width: 60px; height: 60px; top: -30px; left: 20px; }
.cloud-3::after { width: 40px; height: 40px; top: -20px; left: 65px; }

@keyframes cloudFloat {
    0% { left: -150px; }
    100% { left: 100%; }
}

/* 小鸟 */
.bird {
    position: absolute;
    font-size: 20px;
    animation: birdFly 20s linear infinite;
    opacity: 0.8;
}

.bird:nth-child(1) { top: 25%; animation-duration: 25s; animation-delay: 0s; }
.bird:nth-child(2) { top: 30%; animation-duration: 30s; animation-delay: -8s; }
.bird:nth-child(3) { top: 22%; animation-duration: 22s; animation-delay: -15s; }

@keyframes birdFly {
    0% { left: -50px; transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-20px) rotate(-5deg); }
    100% { left: 110%; transform: translateY(0) rotate(0deg); }
}

/* 星星 */
.stars {
    position: absolute;
    top: 60%;
    width: 100%;
    height: 40%;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* 流星 */
.shooting-star {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, white, transparent);
    animation: shooting 3s ease-in-out infinite;
    opacity: 0;
}

@keyframes shooting {
    0% { opacity: 0; transform: translateX(0); }
    10% { opacity: 1; }
    30% { opacity: 0; transform: translateX(300px) translateY(100px); }
    100% { opacity: 0; }
}

/* 调整页面内容 */
body {
    position: relative;
    z-index: 1;
}

.timeline {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

/* 增强渐变背景 */
.sky-background {
    background: linear-gradient(to bottom, 
        #000033 0%,      /* 深太空 */
        #000066 15%,
        #1a1a4a 30%,
        #4A90D9 50%,     /* 蓝天 */
        #87CEEB 60%,
        #87CEEB 75%,
        #98D8AA 85%,     /* 草地 */
        #228B22 100%     /* 地面 */
    ) !important;
}

/* 更清晰的字体 - 根据背景调整 */
.intro-title,
.intro-subtitle,
.intro-date {
    color: #fff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
}

.timeline-year {
    color: #fff !important;
}

.timeline-event {
    color: #333 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid #4A90D9 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
}

.timeline-event p,
.timeline-event .event-content {
    color: #333 !important;
}

.world-event {
    color: #555 !important;
}

.ending h2,
.ending-quote,
.ending-signature p {
    color: #333 !important;
}

.footer-text {
    color: #ff6b9d !important;
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

/* 童年元素 - 风筝 */
.childhood-element {
    position: absolute;
    font-size: 24px;
    animation: childhoodFloat 4s ease-in-out infinite;
}

.kite { top: -30px; right: 10px; }
.plane { top: -25px; left: 10px; font-size: 20px; }
.drone { top: -28px; right: 30px; font-size: 18px; }
.bird { top: -20px; left: 30px; }

@keyframes childhoodFloat {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

/* 太空元素 - 宇航员火箭 */
.space-element {
    position: absolute;
    font-size: 28px;
    animation: spaceFloat 5s ease-in-out infinite;
}

.astronaut { top: -35px; right: 15px; }
.rocket { top: -30px; left: 10px; }
.satellite { top: -25px; right: 40px; font-size: 22px; }
 UFO { top: -28px; left: 30px; font-size: 24px; }

@keyframes spaceFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(10deg); }
}

/* 结尾更亮 */
.ending-content {
    background: rgba(255,255,255,0.9) !important;
    padding: 40px !important;
    border-radius: 20px !important;
}

/* 年份标签 - 天空背景适配 */
.timeline-year {
    background: linear-gradient(135deg, #4A90D9, #87CEEB) !important;
    color: white !important;
    padding: 10px 25px !important;
    border-radius: 25px !important;
    display: inline-block !important;
    box-shadow: 0 4px 15px rgba(74, 144, 217, 0.4) !important;
    text-shadow: none !important;
}

/* 恢复部分默认文字颜色为黑色 (确保清晰度) */
.song-name, .song-quote, .timeline-title {
    color: #333 !important;
}

/* 1. 旁白文字 (故事正文) - 粉色 */
.timeline-text {
    color: #e84393 !important; /* 玫瑰粉 */
    font-weight: 500;
}

/* 2. 图片切换按钮 (原图/新海诚/宫崎骏/动画) - 红色 */
.image-toggle-btn {
    color: #c0392b !important; /* 宝石红 */
    border: 1px solid #c0392b !important;
    background: transparent !important;
}
.image-toggle-btn:hover {
    background: rgba(192, 57, 43, 0.1) !important;
}
.image-toggle-btn.active {
    background: #c0392b !important;
    color: white !important;
}

/* 3. 结尾部分 - 温馨暖色 */
.ending h2 {
    color: #e17055 !important; /* 珊瑚橙 */
    text-shadow: 1px 1px 0px rgba(255,255,255,0.5);
}
.ending-quote {
    color: #d63031 !important; /* 胭脂红 */
}
.ending-signature p {
    color: #e84393 !important; /* 玫瑰粉 */
}

/* 4. 页脚 - 红色 */
.footer-text {
    color: #ff4757 !important; /* 鲜红 */
    text-shadow: 0 0 8px rgba(255, 56, 56, 0.3) !important;
    font-weight: bold;
}

/* 保持 Intro 白色 */
.intro-title, .intro-subtitle, .intro-date {
    color: #fff !important;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* 保持年份标签白字 */
.timeline-year {
    color: #fff !important;
}

/* ==================== 视觉演变系统 ==================== */

/* 1. 全局段落排版优化 - 让文字像诗一样 */
.timeline-text {
    white-space: pre-line; /* 保留换行 */
    line-height: 2.2 !important; /* 增加行高，更优雅 */
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    padding: 10px 0;
    font-family: 'Noto Serif SC', serif; /* 基础字体：衬线体更具文学感 */
}

/* 2. 阶段一：青涩可爱风 (童年 childhood) */
.timeline-item.childhood .timeline-content {
    background: rgba(255, 240, 245, 0.95) !important; /* 浅粉白背景 */
    border: 2px solid #ff9ff3 !important; /* 糖果粉边框 */
    border-radius: 25px !important; /* 更圆润的角 */
    box-shadow: 0 10px 25px rgba(255, 159, 243, 0.3) !important;
}

.timeline-item.childhood .timeline-title {
    color: #ef5777 !important; /* 可爱红 */
    font-family: 'Ma Shan Zheng', cursive !important; /* 书法/手写体 */
}

.timeline-item.childhood .timeline-text {
    color: #5758BB !important; /* 活泼的蓝紫色文字 */
}

.timeline-item.childhood::before {
    background: #ef5777 !important; /* 节点颜色 */
    box-shadow: 0 0 15px #ef5777 !important;
}

/* 3. 阶段二：青春成长与异地 (growth, distance) */
.timeline-item.growth .timeline-content,
.timeline-item.distance .timeline-content {
    background: rgba(240, 248, 255, 0.95) !important; /* 浅蓝白 */
    border: 2px solid #54a0ff !important; /* 清澈蓝 */
    border-radius: 15px !important; /* 稍微方一点 */
}

.timeline-item.growth .timeline-title,
.timeline-item.distance .timeline-title {
    color: #2e86de !important;
}

.timeline-item.growth .timeline-text,
.timeline-item.distance .timeline-text {
    color: #2c3e50 !important; /* 深蓝灰，略带忧郁/沉稳 */
}

/* 4. 阶段三：婚礼 (wedding) */
.timeline-item.wedding .timeline-content {
    background: rgba(255, 250, 240, 0.95) !important; /* 象牙白 */
    border: 3px solid #e74c3c !important; /* 正红 */
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4) !important;
}

.timeline-item.wedding .timeline-title {
    color: #c0392b !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-item.wedding .timeline-text {
    color: #8e44ad !important; /* 紫色，浪漫 */
    font-weight: bold;
}

/* 5. 阶段四：温馨家庭风 (married, kids, present) */
.timeline-item.married .timeline-content,
.timeline-item.kids .timeline-content,
.timeline-item.present .timeline-content {
    background: rgba(255, 248, 235, 0.98) !important; /* 暖杏色背景 */
    border: 2px solid #e67e22 !important; /* 温暖橙 */
    box-shadow: 0 10px 25px rgba(230, 126, 34, 0.3) !important;
    border-radius: 12px; /* 稳重 */
}

.timeline-item.married .timeline-title,
.timeline-item.kids .timeline-title,
.timeline-item.present .timeline-title {
    color: #d35400 !important; /* 南瓜橙 */
    font-family: 'Noto Serif SC', serif !important; /* 回归稳重衬线体 */
}

.timeline-item.married .timeline-text,
.timeline-item.kids .timeline-text,
.timeline-item.present .timeline-text {
    color: #5d4037 !important; /* 咖啡色/大地色，极具温暖感 */
    font-weight: 500;
}

/* 6. 结尾部分强化温馨感 */
.ending-content {
    background: linear-gradient(135deg, #fff5e6 0%, #fff0f5 100%) !important;
    border: 4px solid #ffccbc !important; /* 浅肉色边框 */
    box-shadow: 0 20px 60px rgba(255, 107, 107, 0.4) !important;
}

.ending h2 {
    color: #bf360c !important; /* 深红橙 */
    letter-spacing: 0.1em;
}

.ending-quote {
    color: #d84315 !important;
    font-family: 'Ma Shan Zheng', cursive; /* 最后的誓言用手写体 */
}

/* 覆盖之前的通用颜色设置，确保分阶段颜色生效 */
/* 移除通用 .timeline-text 颜色强制 */
.timeline-text {
    color: inherit; 
}

/* ==================== 最终色彩方案修正 (2026-02-12) ==================== */

/* 1. 命中注定的相遇 (童年) - 橙色 */
.timeline-item.childhood .timeline-content {
    border-color: #ff9f43 !important;
    background: rgba(255, 248, 240, 0.95) !important;
    box-shadow: 0 10px 25px rgba(255, 159, 67, 0.2) !important;
}
.timeline-item.childhood .timeline-title { color: #e67e22 !important; }
.timeline-item.childhood .timeline-text { color: #d35400 !important; }
.timeline-item.childhood::before { background: #ff9f43 !important; box-shadow: 0 0 15px #ff9f43 !important; }

/* 2. 成长的岁月 (成长/异地) - 紫色 */
.timeline-item.growth .timeline-content,
.timeline-item.distance .timeline-content {
    border-color: #9b59b6 !important;
    background: rgba(245, 240, 255, 0.95) !important;
    box-shadow: 0 10px 25px rgba(155, 89, 182, 0.2) !important;
}
.timeline-item.growth .timeline-title,
.timeline-item.distance .timeline-title { color: #8e44ad !important; }
.timeline-item.growth .timeline-text,
.timeline-item.distance .timeline-text { color: #5e3370 !important; }
.timeline-item.growth::before,
.timeline-item.distance::before { background: #9b59b6 !important; box-shadow: 0 0 15px #9b59b6 !important; }

/* 3. 新婚的甜蜜 (婚礼/已婚) - 玫瑰色 */
.timeline-item.wedding .timeline-content,
.timeline-item.married .timeline-content {
    border-color: #e84393 !important;
    background: rgba(255, 240, 245, 0.95) !important;
    box-shadow: 0 10px 25px rgba(232, 67, 147, 0.2) !important;
}
.timeline-item.wedding .timeline-title,
.timeline-item.married .timeline-title { color: #d63031 !important; } /* 深玫瑰红 */
.timeline-item.wedding .timeline-text,
.timeline-item.married .timeline-text { color: #c44569 !important; }
.timeline-item.wedding::before,
.timeline-item.married::before { background: #e84393 !important; box-shadow: 0 0 15px #e84393 !important; }

/* 4. 为了更好的未来 (现在/孩子) - 金色 */
.timeline-item.kids .timeline-content,
.timeline-item.present .timeline-content {
    border-color: #f1c40f !important;
    background: rgba(255, 252, 235, 0.95) !important;
    box-shadow: 0 10px 25px rgba(241, 196, 15, 0.3) !important;
}
.timeline-item.kids .timeline-title,
.timeline-item.present .timeline-title { color: #f39c12 !important; }
.timeline-item.kids .timeline-text,
.timeline-item.present .timeline-text { color: #b7791f !important; }
.timeline-item.kids::before,
.timeline-item.present::before { background: #f1c40f !important; box-shadow: 0 0 15px #f1c40f !important; }

/* 5. 永远在一起 (结尾) - 亮红色 */
.ending-content {
    border-color: #ff0000 !important;
    background: rgba(255, 245, 245, 0.95) !important;
    box-shadow: 0 20px 60px rgba(255, 0, 0, 0.3) !important;
}
.ending h2 { color: #ff0000 !important; }
.ending-quote { color: #ff3333 !important; }
.ending-signature p { color: #ff4d4d !important; }

/* ==================== Flash 风格动画增强 ==================== */

/* 飞机 - 平滑飞行轨迹 */
.plane {
    font-size: 30px !important;
    top: 15% !important;
    animation: planeFlash 15s linear infinite !important;
    z-index: 0;
}

@keyframes planeFlash {
    0% { left: -10%; transform: translateY(0) rotate(5deg); }
    25% { transform: translateY(-30px) rotate(10deg); }
    50% { transform: translateY(0) rotate(5deg); }
    75% { transform: translateY(30px) rotate(0deg); }
    100% { left: 110%; transform: translateY(0) rotate(5deg); }
}

/* 宇航员 - 失重漂浮 */
.astronaut {
    font-size: 40px !important;
    right: 10% !important;
    top: 20% !important;
    animation: astroFlash 8s ease-in-out infinite alternate !important;
}

@keyframes astroFlash {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    100% { transform: translateY(-50px) rotate(20deg) scale(1.1); }
}

/* 地球 - 3D旋转飘荡效果 */
.earth {
    position: fixed; /* 固定在背景 */
    bottom: 10%;
    right: 5%;
    font-size: 100px;
    opacity: 0.8;
    z-index: -1;
    animation: earthFloat 20s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 20px rgba(74, 144, 217, 0.6));
}

@keyframes earthFloat {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-40px) rotate(10deg); }
}

/* 覆盖之前的简单浮动 */
.childhood-element, .space-element {
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important; /* 更平滑的 Flash 质感 */
}

/* ==================== 标题文字颜色修正 (2026-02-12 V2) ==================== */

/* 重置卡片背景为统一的干净样式，避免颜色过多杂乱 */
.timeline-item .timeline-content {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1) !important;
}

/* 1. 命中注定的相遇 - 橙色文字 */
.timeline-item.childhood .timeline-title {
    color: #ff9f43 !important; /* 橙色 */
    text-shadow: 0 0 10px rgba(255, 159, 67, 0.3);
}
/* 对应节点颜色也配套 */
.timeline-item.childhood::before { background: #ff9f43 !important; box-shadow: 0 0 15px #ff9f43 !important; }


/* 2. 成长的岁月 - 紫色文字 */
.timeline-item.growth .timeline-title,
.timeline-item.distance .timeline-title {
    color: #9b59b6 !important; /* 紫色 */
    text-shadow: 0 0 10px rgba(155, 89, 182, 0.3);
}
.timeline-item.growth::before,
.timeline-item.distance::before { background: #9b59b6 !important; box-shadow: 0 0 15px #9b59b6 !important; }


/* 3. 新婚的甜蜜 - 玫瑰色文字 */
.timeline-item.wedding .timeline-title,
.timeline-item.married .timeline-title {
    color: #e84393 !important; /* 玫瑰色 */
    text-shadow: 0 0 10px rgba(232, 67, 147, 0.3);
}
.timeline-item.wedding::before,
.timeline-item.married::before { background: #e84393 !important; box-shadow: 0 0 15px #e84393 !important; }


/* 4. 为了更好的未来 - 金色文字 */
.timeline-item.kids .timeline-title,
.timeline-item.present .timeline-title {
    color: #f1c40f !important; /* 金色 */
    text-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}
.timeline-item.kids::before,
.timeline-item.present::before { background: #f1c40f !important; box-shadow: 0 0 15px #f1c40f !important; }


/* 5. 永远在一起 (结尾标题) - 亮红色文字 */
.ending h2 {
    color: #ff0000 !important; /* 亮红色 */
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
}
/* 结尾边框也配红色 */
.ending-content {
    border-color: #ff0000 !important;
}

/* 恢复正文颜色为深灰/黑色，保持阅读舒适度 */
.timeline-text {
    color: #333 !important;
}

/* 已移除旧的年份布局代码，使用下方的 Flex 方案 */

/* 再次修正年份布局 - 使用 Flex 保持单行，并控制对齐 */
.timeline-year {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 15px !important;
    width: 100% !important; /* 占满宽度，强制卡片换行 */
}

/* 偶数项(左侧)靠左对齐 */
.timeline-item:nth-child(even) .timeline-year {
    justify-content: flex-start !important;
}

/* 奇数项(右侧)靠右对齐 */
.timeline-item:nth-child(odd) .timeline-year {
    justify-content: flex-end !important;
}

/* 确保内容卡片清除浮动，另起一行 */
.timeline-content {
    clear: both !important;
    display: block !important;
    width: 100% !important;
}

/* 移除居中布局样式 (恢复左右交错) */

/* ==================== 最终布局修正 (2026-02-12 V4) ==================== */

/* 强制 "2026 & 未来" (present) 和 "永远在一起" (ending) 居中显示 */

.timeline-item.ending {
    width: 100% !important;
    padding: 0 !important;
    text-align: center !important;
    margin-bottom: 6rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    clear: both !important;
}

/* 居中连接点 */
.timeline-item.present::before,
.timeline-item.ending::before {
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    top: -15px !important;
    width: 25px !important;
    height: 25px !important;
    border-width: 4px !important;
}

/* 居中年份标签 */
.timeline-item.present .timeline-year,
.timeline-item.ending .timeline-year {
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 20px !important;
    width: 100% !important;
}

/* 居中内容卡片 */
.timeline-item.present .timeline-content,
.timeline-item.ending .timeline-content {
    max-width: 800px !important;
    width: 90% !important;
    margin: 0 auto !important;
    text-align: center !important;
}

/* 居中图片 */
.timeline-item.present .image-container,
.timeline-item.ending .image-container {
    align-items: center !important;
}

/* 放大标题 */
.timeline-item.present .timeline-title,
.timeline-item.ending .timeline-title {
    font-size: 2rem !important;
    margin-top: 10px !important;
}
