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

:root {
    --rose: #ffb7c5;
    --rose-dark: #e68a9f;
    --cream: #fff8f5;
    --text: #4a3f3f;
    --text-light: #8a7a7a;
    --shadow: rgba(74, 63, 63, 0.08);
}

html {
    scroll-behavior: smooth;
}

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

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

.heart-float {
    position: absolute;
    color: var(--rose);
    opacity: 0.5;
    animation: floatUp linear infinite;
    font-size: 1.2rem;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #fff0f3 0%, #fff8f5 50%, #ffeef2 100%);
    z-index: 1;
}

.hero-content {
    padding: 2rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    letter-spacing: 0.3em;
    margin-bottom: 0.5rem;
}

.title {
    font-size: clamp(4rem, 15vw, 10rem);
    font-weight: 700;
    background: linear-gradient(45deg, var(--rose-dark), var(--rose));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin: 0.5rem 0;
}

.domain {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: var(--text-light);
    letter-spacing: 0.2em;
    margin: 1.5rem 0 2.5rem;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    background: linear-gradient(135deg, var(--rose), var(--rose-dark));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1rem;
    letter-spacing: 0.1em;
    box-shadow: 0 8px 24px rgba(255, 183, 197, 0.4);
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(255, 183, 197, 0.5);
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--rose-dark);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* 通用容器 */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 6rem 0;
    position: relative;
    z-index: 1;
}

section h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 3rem;
    color: var(--text);
}

/* 信纸 */
.letter {
    background: white;
}

.envelope {
    background: linear-gradient(135deg, #fff5f7, #fff);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px var(--shadow);
    border: 1px solid rgba(255, 183, 197, 0.3);
}

.paper h2 {
    text-align: left;
    margin-bottom: 2rem;
    font-size: 1.6rem;
}

.paper p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--text);
}

.signature {
    text-align: right;
    color: var(--rose-dark) !important;
    font-style: italic;
}

/* 回忆卡片 */
.moments {
    background: var(--cream);
}

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

.card {
    background: white;
    border-radius: 16px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    box-shadow: 0 8px 30px var(--shadow);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
}

.placeholder {
    border: 2px dashed var(--rose);
    color: var(--text-light);
    font-size: 0.95rem;
}

.photo-card {
    flex-direction: column;
    padding: 0.8rem;
    overflow: hidden;
}

.photo-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 旧浏览器兜底 */
@supports not (aspect-ratio: 1 / 1) {
    .photo-wrap {
        padding-top: 100%;
    }
    .photo-wrap img {
        position: absolute;
        top: 0;
        left: 0;
    }
}

.photo-card p {
    margin-top: 0.8rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 倒计时 */
.countdown {
    background: white;
    text-align: center;
}

.timer {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.timer div {
    background: linear-gradient(135deg, #fff5f7, #fff);
    border: 1px solid rgba(255, 183, 197, 0.4);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    min-width: 90px;
}

.timer span {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--rose-dark);
    line-height: 1;
}

.timer small {
    font-size: 0.85rem;
    color: var(--text-light);
}

.hint {
    margin-top: 2rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--cream);
    color: var(--text-light);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

footer .heart {
    color: var(--rose-dark);
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.2); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
}

/* 响应式 */
@media (max-width: 640px) {
    .subtitle {
        font-size: 1rem;
        letter-spacing: 0.2em;
    }

    .envelope {
        padding: 2rem 1.5rem;
    }

    .timer div {
        padding: 1.2rem 1.5rem;
        min-width: 70px;
    }

    .timer span {
        font-size: 2rem;
    }

    section {
        padding: 4rem 0;
    }
}
