/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 页面容器 */
.page {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    transition: all 0.8s ease-in-out;
    z-index: 1;
}

.page.hidden {
    opacity: 0;
    transform: translateY(100vh);
    pointer-events: none;
}

.page.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* 内容容器 */
.start-container,
.content-container {
    text-align: center;
    padding: 20px;
    max-width: 90%;
    animation: fadeInUp 1s ease-out;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* 蛋糕页面特殊布局 */
#cakePage .content-container {
    justify-content: center;
    padding: 40px 20px;
    gap: 20px;
}

/* 蛋糕预览容器样式 */
.cake-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 350px;
    margin: 0 auto;
}

.mini-cake {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: float 3s ease-in-out infinite;
}

.mini-cake-body {
    font-size: 4rem;
    margin-bottom: -10px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.mini-candles {
    font-size: 1.2rem;
    animation: twinkle 2s ease-in-out infinite;
}

.cake-preview-text {
    font-size: 1.1rem;
    color: #2c2c2c;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.open-cake-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
    position: relative;
    overflow: hidden;
}

.open-cake-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.6);
}

.open-cake-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.3rem;
    animation: bounce 2s infinite;
}

.btn-text {
    font-family: inherit;
}

.btn-sparkle {
    font-size: 1rem;
    animation: sparkle 1.5s infinite;
}

.cake-hint {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    font-style: italic;
    opacity: 0.8;
}

/* 蛋糕模态框样式 */
.cake-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cake-modal.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
}

.cake-modal.show {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    width: 90vw;
    max-width: 500px;
    max-height: 90vh;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: visible;
    animation: modalSlideIn 0.4s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-title {
    font-size: 1.3rem;
    color: #2c2c2c;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.modal-close {
    width: 35px;
    height: 35px;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #333;
    transform: scale(1.1);
}

/* 模态框内的蛋糕场景 */
.modal-content .cake-scene {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-height: 400px;
    justify-content: center;
    position: relative;
    overflow: visible;
}

/* 麦克风状态指示器 */
.microphone-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
    color: #2c2c2c;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.microphone-status.active {
    opacity: 1;
}

.mic-icon {
    font-size: 1.1rem;
    animation: pulse 2s infinite;
    transition: transform 0.3s ease;
}

.mic-text {
    font-weight: 500;
    transition: color 0.3s ease;
}

/* 麦克风状态特定样式 */
.microphone-status.initializing .mic-icon {
    animation: spin 1s linear infinite;
}

.microphone-status.connecting .mic-icon {
    animation: bounce 1s ease-in-out infinite;
}

.microphone-status.ready .mic-icon {
    animation: glow 1.5s ease-in-out infinite;
    color: #4CAF50;
}

.microphone-status.ready .mic-text {
    color: #4CAF50;
    font-weight: 600;
}

.microphone-status.error .mic-icon {
    animation: shake 0.5s ease-in-out;
    color: #f44336;
}

.microphone-status.error .mic-text {
    color: #f44336;
}

/* 启动页样式 */
.main-title {
    font-size: 2.5rem;
    color: #ff6b9d;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: pulse 2s infinite;
}

.subtitle {
    font-size: 1.2rem;
    color: #2c2c2c;
    margin-bottom: 30px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.heart-animation {
    font-size: 3rem;
    animation: heartbeat 1.5s infinite;
    margin: 20px 0;
}

.tip {
    font-size: 1rem;
    color: #2c2c2c;
    margin-bottom: 40px;
    padding: 15px;
    background: rgba(255,255,255,0.4);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* 按钮样式 */
.start-btn,
.next-btn,
.fireworks-btn {
    background: linear-gradient(45deg, #ff6b9d, #ff8fab);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255,107,157,0.3);
    margin-top: 30px;
    flex-shrink: 0;
    font-family: inherit;
}

/* 蛋糕页面按钮特殊样式 */
#cakePage .next-btn {
    margin-top: 20px;
    margin-bottom: 20px;
}

.start-btn:hover,
.next-btn:hover,
.fireworks-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,157,0.4);
}

/* 问候页样式 */
.greeting-title {
    font-size: 2.2rem;
    color: #ff6b9d;
    margin-bottom: 15px;
    animation: slideInLeft 0.8s ease-out;
}

.greeting-text {
    font-size: 1.3rem;
    color: #2c2c2c;
    margin-bottom: 10px;
    animation: slideInRight 0.8s ease-out;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* 回忆页样式 - 优化紧凑布局 */
.memory-title {
    font-size: 1.6rem;
    color: #ff6b9d;
    margin-bottom: 8px;
    animation: fadeInDown 0.8s ease-out;
    line-height: 1.2;
}

.photo-container {
    margin: 15px 0;
    animation: zoomIn 1s ease-out;
}

.memory-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    animation: photoRotate 3s infinite linear;
}

.memory-text {
    font-size: 1rem;
    color: #2c2c2c;
    margin-bottom: 5px;
    animation: fadeInUp 0.8s ease-out;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-weight: 500;
    line-height: 1.3;
}

/* 告白页样式 */
.confession-title {
    font-size: 2.2rem;
    color: #ff6b9d;
    margin-bottom: 20px;
    animation: typewriter 2s steps(10) infinite;
}

.confession-text {
    font-size: 1.3rem;
    color: #2c2c2c;
    margin-bottom: 10px;
    animation: fadeInUp 0.8s ease-out;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* 蛋糕页样式 */
.cake-title {
    font-size: 1.8rem;
    color: #ff6b9d;
    margin-bottom: 15px;
    animation: bounce 1s infinite;
    text-shadow: 2px 2px 4px rgba(255,107,157,0.3);
    line-height: 1.2;
}

.cake-scene {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    perspective: 1000px;
    min-height: 350px;
    justify-content: center;
}

.cake-shadow {
    width: 180px;
    height: 15px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.2) 0%, transparent 70%);
    border-radius: 50%;
    position: absolute;
    bottom: -5px;
    z-index: 0;
    animation: shadowPulse 2s infinite ease-in-out;
}

.cake-container {
    position: relative;
    z-index: 1;
    margin: 10px 0;
}

.birthday-cake {
    position: relative;
    animation: cakeAppear 2s ease-out;
    transform-style: preserve-3d;
    max-width: 280px;
    margin: 0 auto;
    transform: scale(1.2);
}

/* 蛋糕层级样式 */
.cake-bottom-layer {
    position: relative;
    z-index: 1;
}

.cake-base {
    width: 180px;
    height: 50px;
    background: linear-gradient(45deg, #8B4513, #A0522D);
    border-radius: 10px;
    position: relative;
    box-shadow:
        0 4px 8px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(255,255,255,0.1);
    margin: 0 auto;
}

.cake-base::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 5px;
    right: 5px;
    height: 4px;
    background: linear-gradient(90deg, #DEB887, #F4A460);
    border-radius: 2px;
}

.cake-plate {
    width: 200px;
    height: 8px;
    background: linear-gradient(45deg, #E6E6FA, #D8BFD8);
    border-radius: 50%;
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.cake-middle-layer {
    position: relative;
    z-index: 2;
    margin-top: -5px;
}

.frosting-middle {
    width: 160px;
    height: 45px;
    background: linear-gradient(45deg, #FFB6C1, #FFC0CB);
    border-radius: 8px;
    position: relative;
    margin: 0 auto;
    box-shadow:
        0 3px 6px rgba(0,0,0,0.15),
        inset 0 1px 3px rgba(255,255,255,0.2);
}

.frosting-middle::before,
.frosting-middle::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #FFB6C1;
    border-radius: 50%;
    top: -6px;
}

.frosting-middle::before { left: 20px; }
.frosting-middle::after { right: 20px; }

.cake-pattern {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        #FF69B4 0px,
        #FF69B4 10px,
        transparent 10px,
        transparent 20px
    );
}

.cake-top-layer {
    position: relative;
    z-index: 3;
    margin-top: -5px;
}

.frosting-top {
    width: 140px;
    height: 40px;
    background: linear-gradient(45deg, #FFE4E1, #FFF0F5);
    border-radius: 6px;
    position: relative;
    margin: 0 auto;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.1),
        inset 0 1px 2px rgba(255,255,255,0.3);
}

.cake-decoration {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 4;
}

.cherry, .strawberry, .flower {
    font-size: 1.2rem;
    animation: decorationFloat 3s infinite ease-in-out;
}

.cherry { animation-delay: 0s; }
.strawberry { animation-delay: 1s; }
.flower { animation-delay: 2s; }

/* 蜡烛组样式 */
.candles-group {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 200px;
}

.candle {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.candle:hover {
    transform: scale(1.1);
}

.candle-stick {
    width: 7px;
    height: 28px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-radius: 3px;
    position: relative;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.2),
        inset 1px 0 2px rgba(255,255,255,0.3);
}

.candle-stick::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 4px;
    background: #333;
    border-radius: 50%;
}

.flame {
    width: 14px;
    height: 18px;
    background: radial-gradient(
        ellipse at center bottom,
        #FFD700 0%,
        #FF8C00 30%,
        #FF4500 60%,
        #DC143C 90%
    );
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: flameIgnite 0.5s ease-out forwards;
    box-shadow:
        0 0 12px rgba(255,165,0,0.6),
        0 0 20px rgba(255,69,0,0.4),
        0 0 30px rgba(255,69,0,0.2);
}

.candle-glow {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: radial-gradient(
        circle,
        rgba(255,215,0,0.3) 0%,
        rgba(255,140,0,0.2) 40%,
        transparent 70%
    );
    border-radius: 50%;
    opacity: 0;
    animation: glowPulse 2s infinite ease-in-out;
}

/* 火焰动画 - 每个蜡烛延迟点燃 */
.flame-1 { animation-delay: 0.5s; }
.flame-2 { animation-delay: 1s; }
.flame-3 { animation-delay: 1.5s; }
.flame-4 { animation-delay: 2s; }
.flame-5 { animation-delay: 2.5s; }
.flame-6 { animation-delay: 3s; }
.flame-7 { animation-delay: 3.5s; }
.flame-8 { animation-delay: 4s; }

.candle-1 .candle-glow { animation-delay: 1s; }
.candle-2 .candle-glow { animation-delay: 1.5s; }
.candle-3 .candle-glow { animation-delay: 2s; }
.candle-4 .candle-glow { animation-delay: 2.5s; }
.candle-5 .candle-glow { animation-delay: 3s; }
.candle-6 .candle-glow { animation-delay: 3.5s; }
.candle-7 .candle-glow { animation-delay: 4s; }
.candle-8 .candle-glow { animation-delay: 4.5s; }

/* 点燃后的火焰摇摆 */
.flame.lit {
    opacity: 1;
    animation: flameFlicker 1.5s infinite ease-in-out;
}

.candle-glow.lit {
    opacity: 1;
    animation: glowPulse 2s infinite ease-in-out;
}

/* 生日文字 */
.birthday-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Brush Script MT', cursive;
    font-size: 1rem;
    color: #FF69B4;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    opacity: 0;
    animation: textAppear 1s ease-out 3s forwards;
}

/* 许愿提示 */
.wish-prompt {
    margin-top: 20px;
    text-align: center;
    padding: 0 20px;
}

.cake-text {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 8px;
    animation: fadeInUp 0.8s ease-out 3.5s both;
    line-height: 1.4;
}

.wish-instruction {
    font-size: 0.9rem;
    color: #f92f72;
    animation: pulse 2s infinite;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 4s both;
    line-height: 1.3;
}

/* 祝福页样式 */
.wish-title {
    font-size: 2.5rem;
    color: #ff6b9d;
    margin-bottom: 20px;
    animation: rainbow 3s infinite;
}

.wish-text {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 10px;
    animation: fadeInUp 0.8s ease-out;
}

/* 音乐控制按钮 */
.music-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.music-toggle:hover {
    background: rgba(255,255,255,1);
    transform: scale(1.1);
}

/* 气球装饰 */
.balloons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.balloon {
    position: absolute;
    font-size: 2rem;
    animation: float 6s infinite ease-in-out;
}

.balloon-1 { top: 10%; left: 10%; animation-delay: 0s; color: #ff6b9d; }
.balloon-2 { top: 20%; right: 15%; animation-delay: 1s; color: #4ecdc4; }
.balloon-3 { top: 60%; left: 5%; animation-delay: 2s; color: #45b7d1; }
.balloon-4 { top: 70%; right: 10%; animation-delay: 3s; color: #f9ca24; }
.balloon-5 { top: 40%; right: 5%; animation-delay: 4s; color: #6c5ce7; }

/* 烟花画布 */
#fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    display: none;
}

/* 动画定义 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

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

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

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

@keyframes zoomIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes photoRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes cakeAppear {
    0% {
        transform: scale(0) translateY(50px) rotateY(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(0.8) translateY(-10px) rotateY(90deg);
        opacity: 0.7;
    }
    100% {
        transform: scale(1) translateY(0) rotateY(0deg);
        opacity: 1;
    }
}

@keyframes flameIgnite {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.2);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

@keyframes flameFlicker {
    0%, 100% {
        transform: translateX(-50%) scale(1) rotate(-2deg);
        filter: hue-rotate(0deg);
    }
    25% {
        transform: translateX(-50%) scale(1.1) rotate(1deg);
        filter: hue-rotate(10deg);
    }
    50% {
        transform: translateX(-50%) scale(0.9) rotate(-1deg);
        filter: hue-rotate(-5deg);
    }
    75% {
        transform: translateX(-50%) scale(1.05) rotate(2deg);
        filter: hue-rotate(5deg);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.2);
    }
}

@keyframes shadowPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

@keyframes decorationFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-5px) rotate(5deg);
    }
}

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

@keyframes flameExtinguish {
    0% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateX(-50%) scale(0.5);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) scale(0);
    }
}

@keyframes glowFadeOut {
    0% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) scale(0);
    }
}

@keyframes wishFloat {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) translateY(-10px);
    }
    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(-30px);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-50px);
    }
}

/* 增强版许愿文字动画 */
@keyframes wishFloatEnhanced {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.8);
    }
    15% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1.05);
    }
    20% {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    85% {
        opacity: 1;
        transform: translateX(-50%) translateY(-10px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px) scale(0.9);
    }
}

@keyframes finalWishAppear {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.5);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* 增强版最终许愿动画 */
@keyframes finalWishAppearEnhanced {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(30px) scale(0.8);
    }
    30% {
        opacity: 0.8;
        transform: translateX(-50%) translateY(-5px) scale(1.05);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes rainbow {
    0% { color: #ff6b9d; }
    25% { color: #4ecdc4; }
    50% { color: #45b7d1; }
    75% { color: #f9ca24; }
    100% { color: #ff6b9d; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes typewriter {
    0%, 100% { border-right: 2px solid transparent; }
    50% { border-right: 2px solid #ff6b9d; }
}

/* 新增动画关键帧 */
@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: rotate(0deg); }
    50% { opacity: 0.5; transform: rotate(180deg); }
}

/* 麦克风状态动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes glow {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 5px currentColor;
    }
    50% {
        transform: scale(1.1);
        text-shadow: 0 0 15px currentColor, 0 0 25px currentColor;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 火焰自然摇摆动画 - 增强版 */
@keyframes flameNaturalFlicker {
    0%, 100% {
        transform: translateX(-50%) scale(1) rotate(-1deg);
        filter: hue-rotate(0deg) brightness(1);
    }
    25% {
        transform: translateX(-50%) scale(1.05) rotate(1deg);
        filter: hue-rotate(5deg) brightness(1.1);
    }
    50% {
        transform: translateX(-50%) scale(0.95) rotate(-0.5deg);
        filter: hue-rotate(-3deg) brightness(0.9);
    }
    75% {
        transform: translateX(-50%) scale(1.02) rotate(0.8deg);
        filter: hue-rotate(8deg) brightness(1.05);
    }
}

/* 火焰吹气反应动画 */
@keyframes flameBlowReaction {
    0% {
        transform: translateX(-50%) scale(1) rotate(0deg);
    }
    50% {
        transform: translateX(-50%) scale(0.7) rotate(15deg);
    }
    100% {
        transform: translateX(-50%) scale(0.9) rotate(8deg);
    }
}

/* 模态框内许愿文字样式 */
.wish-message-float {
    pointer-events: none;
    z-index: 10;
}

.wish-content {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 200px;
    min-width: 120px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.wish-content .wish-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.wish-content .wish-text {
    font-size: 0.8rem;
    color: white;
    font-weight: 600;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 最终许愿完成消息 */
.final-wish-message {
    pointer-events: all;
    z-index: 1001;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.final-wish-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 240, 245, 0.98));
    padding: 25px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    max-width: 280px;
    width: 90vw;
}

.final-wish-content h3 {
    font-size: 1.2rem;
    color: #ff6b9d;
    margin-bottom: 12px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    line-height: 1.3;
}

.final-wish-content p {
    font-size: 0.9rem;
    color: #2c2c2c;
    margin-bottom: 8px;
    line-height: 1.4;
}

.close-modal-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.close-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.6);
}

/* 响应式设计 - 优化移动端布局 */
@media (max-width: 480px) {
    .main-title { font-size: 2rem; }
    .greeting-title { font-size: 1.8rem; }
    .memory-title {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }
    .confession-title { font-size: 1.8rem; }
    .cake-title {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }
    .wish-title { font-size: 2rem; }

    .photo-container {
        margin: 10px 0;
    }

    .memory-photo {
        width: 150px;
        height: 150px;
        border: 3px solid #fff;
    }

    .memory-text {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }

    .cake-scene {
        margin: 15px 0;
        min-height: 280px;
    }

    #cakePage .content-container {
        padding: 30px 20px;
        gap: 15px;
    }

    .birthday-cake {
        max-width: 240px;
        transform: scale(1.0);
    }

    .cake-base {
        width: 150px;
        height: 42px;
    }

    .frosting-middle {
        width: 130px;
        height: 38px;
    }

    .frosting-top {
        width: 110px;
        height: 32px;
    }

    .candles-group {
        gap: 6px;
        top: -35px;
        max-width: 160px;
    }

    .candle-stick {
        width: 6px;
        height: 24px;
    }

    .flame {
        width: 12px;
        height: 15px;
        top: -18px;
    }

    .cake-text {
        font-size: 1rem;
        padding: 0 15px;
    }

    .wish-instruction {
        font-size: 0.85rem;
        padding: 0 15px;
    }

    .wish-prompt {
        margin-top: 15px;
        padding: 0 15px;
    }

    .start-btn,
    .next-btn,
    .fireworks-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }

    /* 移动端模态框优化 */
    .modal-content {
        width: 95vw;
        max-height: 85vh;
        border-radius: 15px;
    }

    .modal-header {
        padding: 15px 20px 10px;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .modal-close {
        width: 30px;
        height: 30px;
        font-size: 1.3rem;
    }

    .cake-preview-container {
        padding: 20px;
        max-width: 300px;
    }

    .open-cake-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }

    /* 移动端最终消息优化 */
    .final-wish-content {
        padding: 20px 15px;
        max-width: 260px;
        width: 85vw;
    }

    .final-wish-content h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .final-wish-content p {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .close-modal-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .final-wish-message p:first-child {
        font-size: 1.3rem !important;
    }

    .final-wish-message p:last-child {
        font-size: 1rem !important;
    }
}

@media (max-width: 360px) {
    .cake-title {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .birthday-cake {
        max-width: 200px;
        transform: scale(0.85);
    }

    .cake-scene {
        min-height: 240px;
        margin: 10px 0;
    }

    #cakePage .content-container {
        padding: 25px 15px;
        gap: 12px;
    }

    .cake-text {
        font-size: 0.9rem;
    }

    .wish-instruction {
        font-size: 0.8rem;
    }

    .cake-base {
        width: 130px;
        height: 38px;
    }

    .frosting-middle {
        width: 110px;
        height: 32px;
    }

    .frosting-top {
        width: 90px;
        height: 28px;
    }

    .candles-group {
        gap: 5px;
        top: -30px;
        max-width: 140px;
    }

    .candle-stick {
        width: 5px;
        height: 20px;
    }

    .flame {
        width: 10px;
        height: 12px;
        top: -15px;
    }

    /* 小屏幕许愿文字优化 - 旧样式已删除 */

    .final-wish-message {
        padding: 18px 20px !important;
        max-width: 90% !important;
    }

    .final-wish-message p:first-child {
        font-size: 1.2rem !important;
        margin-bottom: 12px !important;
    }

    .final-wish-message p:last-child {
        font-size: 0.95rem !important;
    }
}

/* 增强内容样式 */

/* 问候页面增强样式 */
.anniversary-info {
    margin-bottom: 30px;
    text-align: center;
}

.days-count {
    font-size: 1.4rem;
    color: #ff6b9d;
    margin-bottom: 10px;
    font-weight: 600;
}

.days-count .highlight {
    font-size: 2rem;
    font-weight: bold;
    color: #ff1744;
    text-shadow: 0 0 10px rgba(255, 23, 68, 0.3);
}

.special-day {
    font-size: 1.2rem;
    color: #fb4457;
    margin-bottom: 20px;
}

.birthday-greeting {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.main-greeting {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #753434;
    text-align: center;
}

.love-message {
    margin-top: 30px;
    text-align: center;
}

.love-message p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #ef395b;
}

.highlight-text {
    font-size: 1.4rem !important;
    color: #ff6b9d !important;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.4);
}

/* 回忆页面增强样式 - 紧凑布局 */
.memory-header {
    text-align: center;
    margin-bottom: 15px;
    margin-top: 15px;
}

.memory-header h2 {
    font-size: 1.6rem;
    color: #ff6b9d;
    margin-bottom: 8px;
    text-shadow: 0 0 15px rgba(255, 107, 157, 0.3);
    line-height: 1.2;
}

.memory-subtitle {
    font-size: 1rem;
    color: #2c2c2c;
    margin-bottom: 15px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-weight: 600;
    line-height: 1.3;
}

.memory-timeline {
    max-height: 400px;
    overflow-y: auto;
    padding: 0 10px;
}

.memory-item {
    display: flex;
    margin-bottom: 25px;
    opacity: 0;
    animation: slideInLeft 0.8s ease-out forwards;
}

.memory-date {
    min-width: 80px;
    font-size: 0.9rem;
    color: #ff8a95;
    font-weight: 600;
    padding-top: 5px;
}

.memory-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-left: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 157, 0.2);
}

.memory-title {
    font-size: 1.2rem;
    color: #ff6b9d;
    margin-bottom: 8px;
    font-weight: 600;
}

.memory-description {
    font-size: 1rem;
    line-height: 1.5;
    color: #2c2c2c;
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.memory-emotion {
    font-size: 0.9rem;
    color: #ff6b9d;
    font-style: italic;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.memory-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    background: rgba(255, 107, 157, 0.2);
    color: #ff6b9d;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 107, 157, 0.3);
}

/* 告白页面增强样式 */
.confession-header {
    text-align: center;
    margin-bottom: 25px;
}

.confession-header h2 {
    font-size: 2rem;
    color: #ff6b9d;
    text-shadow: 0 0 15px rgba(255, 107, 157, 0.3);
}

.confession-main {
    margin: 30px 0;
    padding: 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 157, 0.2);
}

.deep-confession {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #753434;
    text-align: center;
    margin: 0;
}

.confession-promise {
    margin: 25px 0;
    text-align: center;
}

.promise-text {
    font-size: 1.1rem;
    color: #fc4466;
    margin-bottom: 10px;
}

.highlight-promise {
    font-size: 1.3rem;
    color: #ff6b9d;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.4);
    margin-top: 15px;
}

.birthday-special {
    text-align: center;
    margin-top: 25px;
}

.special-text {
    font-size: 1.2rem;
    color: #ff8a95;
    font-weight: 600;
}

/* 许愿页面增强样式 */
.wish-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.candle:hover .wish-tooltip {
    opacity: 1;
}

.wish-icon {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.wish-theme {
    font-weight: bold;
    color: #ff6b9d;
    margin-bottom: 5px;
}

.wish-content {
    font-size: 0.75rem;
    line-height: 1.3;
}

/* 旧的许愿弹窗样式已删除，统一使用飘浮文字系统 */

/* 烟花页面增强样式 */
.enhanced-blessing {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
    animation: fadeInUp 1s ease-out;
}

.fireworks-blessing {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid rgba(255, 107, 157, 0.3);
    box-shadow: 0 15px 35px rgba(255, 107, 157, 0.2);
}

.fireworks-blessing h2 {
    font-size: 2.2rem;
    color: #ff6b9d;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 107, 157, 0.4);
}

.blessing-text {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #fff;
    margin-bottom: 25px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.final-message {
    margin-top: 25px;
}

.love-declaration {
    font-size: 1.5rem;
    color: #ff1744;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(255, 23, 68, 0.4);
}

.birthday-wish {
    font-size: 1.2rem;
    color: #ff8a95;
    font-weight: 600;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .memory-timeline {
        max-height: 300px;
    }

    .memory-item {
        flex-direction: column;
    }

    .memory-date {
        min-width: auto;
        margin-bottom: 10px;
        text-align: center;
    }

    .memory-card {
        margin-left: 0;
    }

    .days-count {
        font-size: 1.2rem;
    }

    .days-count .highlight {
        font-size: 1.6rem;
    }

    .main-greeting {
        font-size: 1.1rem;
    }

    .deep-confession {
        font-size: 1rem;
    }

    .fireworks-blessing {
        padding: 20px;
        margin: 0 10px;
    }

    .fireworks-blessing h2 {
        font-size: 1.8rem;
    }

    .blessing-text {
        font-size: 1.1rem;
    }

    /* 旧的许愿弹窗样式已删除 */
}

/* 分页回忆展示样式 */
.memory-pagination-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.memory-card-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.memory-card-single {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 107, 157, 0.2);
    box-shadow: 0 8px 32px rgba(255, 107, 157, 0.15);
    width: 100%;
    max-width: 500px;
    opacity: 0;
}

/* 带背景照片的回忆卡片 */
.memory-card-with-background {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* 回忆卡片遮罩层 */
.memory-card-overlay {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 11%) 0%,
        rgba(255, 240, 245, 50%) 50%,
        rgba(255, 255, 255, 11%) 100%);
    border-radius: 15px;
    padding: 14px;
    width: 90%;
    backdrop-filter: blur(0px);
    border: 1px solid rgba(255, 107, 157, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.memory-date-large {
    font-size: 1.1rem;
    color: #ff6b9d;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 15px;
    display: inline-block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.memory-card-main {
    text-align: left;
}

.memory-title-large {
    font-size: 1.3rem;
    color: #ff6b9d;
    margin-bottom: 10px;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.memory-description-large {
    font-size: 1.05rem;
    line-height: 1.5;
    color: #2c2c2c;
    margin-bottom: 12px;
    text-align: justify;
    background: rgba(255, 255, 255, 0.3);
    padding: 12px;
    border-radius: 12px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.memory-emotion-large {
    font-size: 0.95rem;
    color: #ff6b9d;
    font-style: italic;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 600;
    background: rgba(255, 107, 157, 0.1);
    padding: 8px;
    border-radius: 10px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.memory-tags-large {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.tag-large {
    background: rgba(255, 107, 157, 0.2);
    color: #ff6b9d;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 107, 157, 0.3);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.memory-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
}

.memory-nav-btn {
    background: linear-gradient(45deg, #ff6b9d, #ff8fab);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    min-width: 120px;
}

.memory-nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.memory-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.memory-progress {
    font-size: 1rem;
    color: #ff6b9d;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 157, 0.2);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    min-width: 80px;
    text-align: center;
}

/* 回忆卡片动画 */
@keyframes memoryCardFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 响应式设计 - 分页回忆 */
@media (max-width: 768px) {
    .memory-card-single {
        padding: 20px;
        margin: 0 10px;
    }

    .memory-card-with-background {
        min-height: 350px;
    }

    .memory-card-overlay {
        width: 95%;
        padding: 15px;
    }

    .memory-title-large {
        font-size: 1.2rem;
    }

    .memory-description-large {
        font-size: 1rem;
        padding: 12px;
    }

    .memory-navigation {
        flex-direction: row;
        gap: 8px;
        margin-top: 15px;
        justify-content: space-between;
        align-items: center;
    }

    .memory-nav-btn {
        flex: 0 0 auto;
        min-width: 90px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .memory-progress {
        flex: 0 0 auto;
        font-size: 0.9rem;
        font-weight: 600;
        color: #ff6b9d;
        background: rgba(255, 255, 255, 0.8);
        padding: 4px 12px;
        border-radius: 15px;
        border: 1px solid rgba(255, 107, 157, 0.2);
    }
}

@media (max-width: 480px) {
    .memory-card-single {
        padding: 15px;
        margin: 0 5px;
    }

    .memory-card-with-background {
        min-height: 280px;
    }

    .memory-card-overlay {
        width: 98%;
        padding: 10px;
    }

    .memory-title-large {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .memory-description-large {
        font-size: 0.95rem;
        padding: 10px;
        margin-bottom: 10px;
        line-height: 1.4;
    }

    .memory-date-large {
        font-size: 1rem;
    }

    .memory-emotion-large {
        font-size: 0.9rem;
        margin-bottom: 6px;
        padding: 6px;
    }

    /* 移动端回忆页面头部优化 */
    .memory-header {
        margin-bottom: 10px;
        margin-top: 10px;
    }

    .memory-header h2 {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }

    .memory-subtitle {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    /* 超小屏幕导航按钮优化 */
    .memory-navigation {
        gap: 6px;
        margin-top: 12px;
    }

    .memory-nav-btn {
        min-width: 80px;
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .memory-progress {
        font-size: 0.85rem;
        padding: 3px 10px;
    }
}

/* 优化的许愿文字动画效果 */
@keyframes wishFloatFromBottom {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0) scale(0.8);
    }
    15% {
        opacity: 1;
        transform: translateX(-50%) translateY(-20px) scale(1);
    }
    85% {
        opacity: 1;
        transform: translateX(-50%) translateY(-120px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-150px) scale(0.9);
    }
}

@keyframes wishFadeOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) scale(0.8);
    }
}

/* 许愿文字样式优化 */
.wish-message-float {
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
    letter-spacing: 1px;
    max-width: 280px;
    word-wrap: break-word;
}

/* 移动端响应式优化 */
@media (max-width: 768px) {
    .wish-message-float {
        font-size: 1.1rem !important;
        max-width: 240px;
        padding: 10px 16px !important;
    }

    @keyframes wishFloatFromBottom {
        0% {
            opacity: 0;
            transform: translateX(-50%) translateY(0) scale(0.8);
        }
        15% {
            opacity: 1;
            transform: translateX(-50%) translateY(-15px) scale(1);
        }
        85% {
            opacity: 1;
            transform: translateX(-50%) translateY(-100px) scale(1);
        }
        100% {
            opacity: 0;
            transform: translateX(-50%) translateY(-120px) scale(0.9);
        }
    }
}

@media (max-width: 480px) {
    .wish-message-float {
        font-size: 1rem !important;
        max-width: 200px;
        padding: 8px 14px !important;
    }
}
