/* ===================================
   老婆 37 岁生日网页 - 主样式表
   风格：温馨浪漫粉色系
   =================================== */

/* --- 全局变量 --- */
:root {
    --primary-color: #ff6b9d;
    --secondary-color: #ffa8c5;
    --accent-color: #ff8fab;
    --bg-gradient-start: #fff0f5;
    --bg-gradient-end: #ffe4e9;
    --text-primary: #4a4a4a;
    --text-secondary: #6b6b6b;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(255, 107, 157, 0.2);
    --shadow-hover: 0 8px 30px rgba(255, 107, 157, 0.3);
}

/* --- 基础重置 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- 通用样式 --- */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(255, 107, 157, 0.3);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- 音乐控制按钮 --- */
.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.music-btn.playing {
    animation: pulse 1.5s infinite;
}

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

/* --- Hero 区域 --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #ff6b9d 0%, #ffa8c5 100%);
    overflow: hidden;
}

.hero-content {
    text-align: center;
    color: var(--white);
    z-index: 10;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1.5s ease;
}

.hero-subtitle {
    font-size: 2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1.5s ease 0.3s both;
}

.hero-date {
    font-size: 1.3rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    border-radius: 50px;
    display: inline-block;
    animation: fadeInUp 1.5s ease 0.6s both;
}

.scroll-hint {
    margin-top: 3rem;
    animation: bounce 2s infinite;
}

.scroll-hint span {
    font-size: 1.2rem;
    opacity: 0.8;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

/* --- 漂浮爱心 --- */
.floating-hearts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.heart {
    position: absolute;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.6);
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    from {
        transform: translateY(100vh) rotate(0deg);
        opacity: 1;
    }
    to {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* --- 时间线模块 --- */
.timeline-section {
    background: var(--white);
    border-radius: 20px;
    margin: 3rem auto;
    box-shadow: var(--shadow);
}

.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin: 3rem 0;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

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

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
    transform: translateX(50px);
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.timeline-dot::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 107, 157, 0.2);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
}

.timeline-content {
    flex: 1;
    padding: 1.5rem;
    background: var(--bg-gradient-start);
    border-radius: 15px;
    margin: 0 2rem;
    box-shadow: var(--shadow);
}

.timeline-date {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.timeline-desc {
    color: var(--text-secondary);
}

/* --- 照片墙 --- */
.gallery-section {
    background: var(--white);
    border-radius: 20px;
    margin: 3rem auto;
    box-shadow: var(--shadow);
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 1;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: var(--white);
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .caption {
    transform: translateY(0);
}

/* --- 30 个理由 --- */
.reasons-section {
    background: var(--white);
    border-radius: 20px;
    margin: 3rem auto;
    box-shadow: var(--shadow);
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 2rem;
}

.reason-card {
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

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

.reason-number {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: bold;
}

.reason-text {
    margin-top: 0.5rem;
    color: var(--text-primary);
}

/* --- 情书模块 --- */
.letter-section {
    background: var(--white);
    border-radius: 20px;
    margin: 3rem auto;
    box-shadow: var(--shadow);
    padding: 4rem 3rem;
}

.letter-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-gradient-start);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: inset 0 0 20px rgba(255, 107, 157, 0.1);
    line-height: 2;
    font-size: 1.1rem;
}

/* --- 祝福模块 --- */
.wishes-section {
    background: var(--white);
    border-radius: 20px;
    margin: 3rem auto;
    box-shadow: var(--shadow);
}

.wishes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 2rem;
    justify-content: center;
}

.wish-card {
    background: var(--bg-gradient-start);
    border-radius: 15px;
    padding: 1.5rem;
    max-width: 300px;
    box-shadow: var(--shadow);
}

.wish-from {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.wish-text {
    color: var(--text-secondary);
}

/* --- 未来期许 --- */
.future-section {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 20px;
    margin: 3rem auto;
    color: var(--white);
    text-align: center;
    box-shadow: var(--shadow);
}

.future-content {
    padding: 3rem;
}

.future-text {
    font-size: 1.5rem;
    margin: 1rem 0;
}

.future-promise {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
}

/* --- 页脚 --- */
.footer {
    text-align: center;
    padding: 3rem;
    background: var(--primary-color);
    color: var(--white);
}

.footer-date {
    margin-top: 0.5rem;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* --- 移动端适配 --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .timeline-item {
        flex-direction: column !important;
        text-align: center;
    }
    
    .timeline-line {
        left: 20px;
    }
    
    .timeline-dot {
        margin-left: 10px;
    }
    
    .timeline-content {
        margin: 1rem 0 1rem 3rem;
    }
    
    .reasons-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .letter-content {
        padding: 1.5rem;
    }
}
