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

:root {
    --primary: #ff6b9d;
    --primary-dark: #ff4757;
    --secondary: #c44569;
    --accent: #f8b500;
    --light: #fff5f7;
    --dark: #2d3436;
    --gradient-1: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    --gradient-2: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    --gradient-3: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --shadow: 0 10px 30px rgba(255, 107, 157, 0.2);
    --shadow-hover: 0 20px 40px rgba(255, 107, 157, 0.3);
}

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

/* 飘落的爱心动画 */
#hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.heart-float {
    position: absolute;
    font-size: 20px;
    animation: heartFall linear forwards;
    opacity: 0.6;
}

@keyframes heartFall {
    0% {
        transform: translateY(-10vh) rotate(0deg) scale(1);
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(110vh) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 10px 5%;
    background: rgba(255, 255, 255, 0.98);
}

.nav-logo {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s;
}

.nav-menu a:hover {
    color: var(--primary);
}

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

/* 主页横幅 */
.hero {
    min-height: 100vh;
    background: var(--gradient-3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--gradient-1);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--gradient-2);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    bottom: -100px;
    left: -100px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 4rem;
    margin-bottom: 20px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.heartbeat {
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

.hero-subtitle {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 30px;
}

.hero-text {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
    color: #666;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow);
}

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

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    color: var(--primary);
    font-size: 0.9rem;
}

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

/* 通用区域样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
}

.section-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.8rem;
    text-align: center;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 60px;
}

/* 故事区域 */
.stories {
    background: white;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.story-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 107, 157, 0.1);
    position: relative;
    overflow: hidden;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

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

.story-card:hover::before {
    transform: scaleX(1);
}

.story-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.story-title {
    font-size: 1.4rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.story-date {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.story-content {
    color: #555;
    line-height: 1.9;
    margin-bottom: 20px;
}

.story-tag {
    display: inline-block;
    background: var(--gradient-2);
    color: var(--secondary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* 时光相册 */
.gallery {
    background: var(--gradient-3);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
}

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

.gallery-placeholder {
    height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 3rem;
}

.gallery-placeholder span {
    font-size: 4rem;
    margin-bottom: 10px;
}

.gallery-placeholder p {
    font-size: 1.1rem;
    font-weight: 600;
}

.gallery-placeholder.spring { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.gallery-placeholder.summer { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.gallery-placeholder.autumn { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.gallery-placeholder.winter { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }
.gallery-placeholder.travel { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.gallery-placeholder.future { background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%); }

.gallery-note {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    color: #666;
}

/* 爱的承诺 */
.promises {
    background: white;
}

.promises-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.promise-card {
    background: var(--light);
    border-radius: 20px;
    padding: 35px;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
}

.promise-card:hover {
    background: var(--gradient-2);
    transform: translateY(-8px);
}

.promise-number {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.promise-card h3 {
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.promise-card p {
    color: #666;
    line-height: 1.8;
}

/* 时间线 */
.timeline {
    background: var(--gradient-3);
}

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

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--gradient-1);
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: 50%;
    position: relative;
    margin-bottom: 50px;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 50%;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--gradient-1);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 4px var(--primary);
    z-index: 1;
}

.timeline-dot-future {
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 4px var(--primary); }
    50% { box-shadow: 0 0 0 10px rgba(255, 107, 157, 0.4); }
}

.timeline-date {
    position: absolute;
    left: calc(50% + 40px);
    font-weight: bold;
    color: var(--primary);
    background: white;
    padding: 5px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.timeline-item:nth-child(even) .timeline-date {
    left: auto;
    right: calc(50% + 40px);
}

.timeline-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    max-width: 320px;
    margin-right: 30px;
    transition: all 0.4s ease;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: 0;
    margin-left: 30px;
}

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

.timeline-content h4 {
    color: var(--secondary);
    margin-bottom: 10px;
}

.timeline-content p {
    color: #666;
    line-height: 1.7;
}

/* 情诗区域 */
.poem-section {
    background: white;
}

.poem-card {
    max-width: 600px;
    margin: 0 auto 40px;
    background: var(--gradient-2);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
}

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

.poem-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem;
    color: var(--secondary);
    margin-bottom: 25px;
}

.poem-content p {
    font-size: 1.2rem;
    line-height: 2.2;
    color: #555;
    margin-bottom: 8px;
}

.poem-author {
    margin-top: 25px;
    color: #888;
    font-style: italic;
}

/* 底部 */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    text-align: center;
    margin-bottom: 40px;
}

.footer-content h3 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.footer-quote {
    font-size: 1.1rem;
    font-style: italic;
    color: #ccc;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 2;
}

.footer-date {
    color: #999;
    margin-bottom: 20px;
}

.footer-heart {
    font-size: 1.5rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    font-size: 0.9rem;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* 滚动动画 */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fadeInUp.delay-1 { animation-delay: 0.2s; opacity: 0; }
.animate-fadeInUp.delay-2 { animation-delay: 0.4s; opacity: 0; }
.animate-fadeInUp.delay-3 { animation-delay: 0.6s; opacity: 0; }

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

.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-container::before {
        left: 20px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(even) {
        padding-left: 60px;
        padding-right: 0;
        justify-content: flex-start;
    }
    
    .timeline-dot {
        left: 20px;
    }
    
    .timeline-date,
    .timeline-item:nth-child(even) .timeline-date {
        position: relative;
        left: 0;
        right: 0;
        display: inline-block;
        margin-bottom: 10px;
    }
    
    .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .promises-container {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}