/* --- 全局基础 --- */
:root {
    --bg-color: #FFF9F0;
    --pink: #FFB7B2;
    --red: #FF6F61;
    --cream: #FFF2CC;
}

body {
    /* 动态暖色渐变背景 */
    background: linear-gradient(-45deg, #FFF9F0, #FFF0F5, #FDF5E6, #FFEFD5);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    
    font-family: 'Lato', sans-serif;
    margin: 0;
    overflow: hidden;
    color: #444;
}

/* 背景流动的动画定义 */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.full-screen-center {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease, transform 1s ease;
    z-index: 10;
}

.hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important; /* 彻底隐藏不占位 */
}

/* --- 第一幕：文字排版 --- */
.intro-content { text-align: center; }
.main-title { font-family: 'Playfair Display', serif; color: var(--red); font-size: 2.5rem; margin-bottom: 20px; }
.sub-text { color: #555; font-size: 1.2rem; margin: 10px 0; }

/* 通用按钮样式 */
.action-btn {
    margin-top: 30px;
    padding: 12px 35px;
    background: var(--red);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 111, 97, 0.4);
    transition: transform 0.2s;
}
.action-btn:hover { transform: scale(1.05); }

/* --- 第二幕：流动相册与蛋糕 --- */
.memory-container {
    position: relative;
    width: 100%;
    height: 60vh; /* 占据屏幕上半部分 */
    display: flex;
    justify-content: center;
    align-items: flex-end; /* 让蛋糕在底部 */
    overflow: hidden;
}

/* 跑马灯轨道 */
.marquee-wrapper {
    position: absolute;
    bottom: 180px; /* 在蛋糕上方 */
    width: 100%;
    height: 250px;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); /* 两侧渐隐效果 */
}

.marquee-track {
    display: flex;
    gap: 20px;
    width: max-content; /* 宽度由内容撑开 */
    animation: scroll 80s linear infinite; /* 20秒滚动一圈，可调整速度 */
}

.marquee-track img {
    height: 220px; /* 照片高度 */
    width: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 3px solid white;
}

/* 滚动动画关键帧 */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* 移动一半（因为我们要复制一份照片做无缝连接） */
}

/* 纯CSS蛋糕 */
.cake-base { position: relative; width: 200px; height: 150px; }
.layer { position: absolute; left: 0; right: 0; margin: auto; border-radius: 10px; }
.layer-bottom { bottom: 0; width: 200px; height: 60px; background: #EAB8B2; }
.layer-middle { bottom: 60px; width: 180px; height: 50px; background: #F4D0C9; }
.layer-top { bottom: 110px; width: 160px; height: 40px; background: #FFEDDA; border-radius: 20px 20px 0 0; }

/* 蜡烛 */
.candle {
    position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%);
    width: 10px; height: 30px; background: #FF6F61; z-index: 5;
}
.flame {
    position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
    width: 10px; height: 15px; background: #FFD700;
    border-radius: 50% 50% 20% 20%;
    animation: flicker 1s infinite alternate;
    box-shadow: 0 0 10px #FFD700;
}
@keyframes flicker { from { opacity: 1; } to { opacity: 0.8; transform: translateX(-50%) scale(1.1); } }

/* 底部按钮区 */
.stage-footer {
    text-align: center; margin-top: 20px; z-index: 20;
}
.special-btn { background: #2A9D8F; }

/* --- 第三幕：信纸 --- */
.letter-paper {
    width: 80%; max-width: 600px;
    background: #fff;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 5px;
    position: relative;
    /* 模拟信纸横线 */
    background-image: repeating-linear-gradient(#fff 0px, #fff 29px, #eee 30px);
}
.letter-content { font-size: 1.1rem; line-height: 30px; color: #444; font-family: 'Great Vibes', cursive, sans-serif; }

/* 漂浮装饰物的样式 */
.floating-item {
    position: absolute;
    bottom: -100px; /* 从屏幕下方升起 */
    font-size: 24px;
    opacity: 0.6;
    animation: floatUp linear infinite;
    z-index: -1; /* 保证在文字和照片后面，不挡视线 */
    user-select: none; /* 不可选中 */
}

/* 漂浮动画：上升 + 左右轻微摇摆 */
@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-120vh) rotate(360deg); /* 飘到屏幕上方外面 */
        opacity: 0;
    }
}