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

body {
    font-family: 'Georgia', 'Songti SC', 'SimSun', serif;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
}

/* 动态渐变背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
        rgba(255, 182, 193, 0.3) 0%,
        rgba(255, 218, 224, 0.3) 25%,
        rgba(255, 240, 245, 0.3) 50%,
        rgba(255, 218, 224, 0.3) 75%,
        rgba(255, 182, 193, 0.3) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none; /* Firefox */
    position: relative;
    z-index: 1;
}

.container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.content {
    max-width: 800px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 1s ease-out;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 增强的淡入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* 页面切换淡入淡出效果 */
.page {
    opacity: 1;
    transition: opacity 0.8s ease-in-out;
}

/* 封面页样式 */
.cover-page .content {
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 240, 245, 0.98));
}

.title {
    font-size: 3.5em;
    color: #d63384;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.5em;
    color: #e685b5;
    margin-bottom: 30px;
    font-style: italic;
}

.heart {
    font-size: 5em;
    margin: 40px 0;
    animation: heartbeat 1.5s ease-in-out infinite;
}

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

.date {
    font-size: 1.3em;
    color: #666;
    margin-top: 30px;
}

.scroll-hint {
    margin-top: 50px;
    text-align: center;
}

.scroll-arrow {
    display: inline-block;
    font-size: 2.5em;
    color: #d63384;
    animation: bounce 1.5s ease-in-out infinite;
    opacity: 0.7;
}

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

/* 文字样式 */
.greeting {
    font-size: 1.5em;
    color: #d63384;
    margin-bottom: 30px;
    font-weight: bold;
}

.paragraph {
    font-size: 1.2em;
    line-height: 2;
    color: #333;
    margin-bottom: 25px;
    text-align: justify;
    text-indent: 2em;
}

/* 引用页样式 */
.quote-page .content {
    background: linear-gradient(135deg, rgba(255, 240, 245, 0.98), rgba(255, 255, 255, 0.98));
}

.quote {
    font-size: 1.4em;
    line-height: 2;
    color: #d63384;
    font-style: italic;
    text-align: center;
    padding: 40px;
    border-left: 5px solid #e685b5;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.quote p {
    margin: 10px 0;
}

/* 结尾页样式 */
.ending-page .content {
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 240, 245, 0.98), rgba(255, 255, 255, 0.98));
}

.final-wish {
    font-size: 1.4em;
    color: #d63384;
    font-weight: bold;
    margin-bottom: 50px;
    text-indent: 0;
}

.signature {
    font-size: 1.3em;
    color: #666;
    line-height: 2;
    margin-top: 50px;
    font-style: italic;
}

/* 音乐控制按钮 */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-control:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(214, 51, 132, 0.3);
}

.music-control.playing .music-icon {
    animation: pulse 1s ease-in-out infinite;
}

.music-icon {
    font-size: 24px;
}

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

/* 照片墙样式 */
.photo-wall {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 40px;
    padding: 20px;
}

.photo-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(214, 51, 132, 0.3);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.1);
}

/* 页面指示器 */
.page-indicator {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(214, 51, 132, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: rgba(214, 51, 132, 0.6);
    transform: scale(1.2);
}

.dot.active {
    background: #d63384;
    transform: scale(1.3);
}

/* 飘落元素样式 */
.floating-element {
    position: fixed;
    top: -50px;
    pointer-events: none;
    z-index: 9999;
    animation: float-down 6s linear forwards;
}

@keyframes float-down {
    0% {
        opacity: 1;
        top: -50px;
    }
    100% {
        opacity: 0.8;
        top: 100vh;
    }
}

/* 打字机效果 */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}



/* 响应式设计 */
@media (max-width: 768px) {
    .content {
        padding: 40px 30px;
    }

    .title {
        font-size: 2.5em;
    }

    .subtitle {
        font-size: 1.2em;
    }

    .paragraph {
        font-size: 1.1em;
    }

    .quote {
        font-size: 1.2em;
        padding: 30px 20px;
    }

    .page-indicator {
        right: 15px;
    }
}

