/* ============================================
   刘文婧 21岁生日祝福 - 样式文件
   ============================================ */

/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 30%, #f48fb1 70%, #f06292 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== 背景装饰文字 ===== */
.bg-art {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-text {
    position: absolute;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
}

.bg-text-1 {
    font-size: clamp(60px, 16vw, 180px);
    top: 8%;
    left: -5%;
    transform: rotate(-12deg);
    letter-spacing: 0.1em;
    font-family: 'Georgia', serif;
    animation: bgFloat1 12s ease-in-out infinite;
}

.bg-text-2 {
    font-size: clamp(40px, 10vw, 120px);
    bottom: 15%;
    right: -3%;
    transform: rotate(8deg);
    font-family: 'Georgia', serif;
    letter-spacing: 0.15em;
    animation: bgFloat2 10s ease-in-out infinite;
}

.bg-text-3 {
    font-size: clamp(80px, 20vw, 240px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
    color: rgba(255, 255, 255, 0.04);
    animation: bgFloat3 8s ease-in-out infinite;
}

.bg-text-4 {
    font-size: clamp(20px, 5vw, 60px);
    top: 35%;
    right: 5%;
    transform: rotate(15deg);
    font-family: 'Georgia', serif;
    font-style: italic;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.05);
    animation: bgFloat1 14s ease-in-out infinite;
}

.bg-text-5 {
    font-size: clamp(40px, 10vw, 120px);
    bottom: 40%;
    left: 5%;
    transform: rotate(-8deg);
    color: rgba(255, 255, 255, 0.05);
    animation: bgFloat2 11s ease-in-out infinite;
}

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

@keyframes bgFloat2 {
    0%, 100% { transform: rotate(8deg) translateY(0); }
    50% { transform: rotate(8deg) translateY(15px); }
}

@keyframes bgFloat3 {
    0%, 100% { transform: translate(-50%, -50%) rotate(-5deg) scale(1); }
    50% { transform: translate(-50%, -50%) rotate(-5deg) scale(1.05); }
}

/* ===== Canvas 画布（背景粒子层） ===== */
#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ===== 主容器 ===== */
#app {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== 场景通用 ===== */
.scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.scene.active {
    display: flex;
}

/* ============================================
   场景0：开场 - 点击提示
   ============================================ */
#scene-welcome {
    z-index: 10;
    cursor: pointer;
}

.welcome-text {
    font-size: clamp(18px, 3.5vw, 32px);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    letter-spacing: 0.4em;
    animation: welcomePulse 2s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.4), 0 2px 12px rgba(233, 30, 99, 0.2);
    position: relative;
    padding: 20px 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    backdrop-filter: blur(4px);
    background: rgba(255, 255, 255, 0.08);
}

@keyframes welcomePulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.03); }
}

/* ============================================
   场景1：搞怪弹窗
   ============================================ */
#scene-door {
    z-index: 20;
}

.door-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
}

.door-modal {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: clamp(20px, 3vw, 28px);
    padding: clamp(32px, 5vw, 48px) clamp(24px, 4vw, 40px) clamp(24px, 4vw, 36px);
    max-width: min(85vw, 420px);
    width: 88%;
    text-align: center;
    box-shadow: 0 12px 50px rgba(233, 30, 99, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: modalIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.door-modal.shake {
    animation: modalShake 0.5s ease;
}

@keyframes modalShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-12px) rotate(-1deg); }
    30% { transform: translateX(10px) rotate(1deg); }
    45% { transform: translateX(-8px) rotate(-0.5deg); }
    60% { transform: translateX(6px) rotate(0.5deg); }
    75% { transform: translateX(-3px); }
    90% { transform: translateX(2px); }
}

.door-modal .icon-big {
    font-size: 52px;
    display: block;
    margin-bottom: 12px;
}

.door-modal h2 {
    font-size: clamp(20px, 2.8vw, 26px);
    font-weight: 700;
    color: #880e4f;
    margin-bottom: 8px;
}

.door-modal .door-text {
    font-size: clamp(15px, 2vw, 18px);
    color: #5c2a3e;
    line-height: 1.6;
    margin-bottom: clamp(20px, 3vw, 28px);
    min-height: 44px;
}

.door-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-accept, .btn-reject {
    padding: clamp(10px, 1.8vw, 16px) clamp(24px, 4vw, 40px);
    border: none;
    border-radius: 50px;
    font-size: clamp(15px, 2vw, 18px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn-accept {
    background: linear-gradient(135deg, #e91e63, #ff6f00);
    color: white;
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.4);
}

.btn-accept:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 28px rgba(233, 30, 99, 0.5);
}

.btn-accept:active {
    transform: scale(0.95);
}

.btn-reject {
    background: rgba(255, 255, 255, 0.5);
    color: #7a4a5e;
    border: 1px solid rgba(233, 30, 99, 0.15);
    backdrop-filter: blur(4px);
}

.btn-reject:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.03);
}

.btn-reject:active {
    transform: scale(0.95);
}

/* 搞怪装饰 - 逐次升级 */
.door-deco {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.door-deco.flower {
    font-size: 36px;
    animation: flowerSpin 3s linear infinite;
}

@keyframes flowerSpin {
    0% { transform: rotate(0deg) scale(0); opacity: 0; }
    20% { transform: rotate(30deg) scale(1); opacity: 1; }
    80% { transform: rotate(330deg) scale(1); opacity: 1; }
    100% { transform: rotate(360deg) scale(0); opacity: 0; }
}

/* ============================================
   场景2：倒计时
   ============================================ */
#scene-countdown {
    z-index: 10;
}

.countdown-number {
    font-size: clamp(80px, 18vw, 180px);
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.5), 0 4px 30px rgba(233, 30, 99, 0.4);
    animation: countPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes countPop {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.countdown-number.exit {
    animation: countExit 0.4s ease forwards;
}

@keyframes countExit {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ============================================
   场景3：打字机祝福
   ============================================ */
#scene-typing {
    z-index: 10;
}

.typing-container {
    text-align: center;
    padding: 0 20px;
}

.typing-line {
    font-size: clamp(22px, 4.5vw, 42px);
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 20px rgba(233, 30, 99, 0.3);
    min-height: clamp(40px, 6vw, 70px);
    line-height: 1.8;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 28px;
    background: #fff;
    margin-left: 2px;
    animation: cursorBlink 0.8s step-end infinite;
    vertical-align: text-bottom;
}

.typing-cursor.hidden {
    display: none;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typing-done {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 20px rgba(255, 255, 255, 0.3); }
    50% { text-shadow: 0 0 40px rgba(255, 255, 255, 0.8), 0 0 60px rgba(233, 30, 99, 0.4); }
}

/* ============================================
   场景4：许愿星
   ============================================ */
#scene-star {
    z-index: 10;
    cursor: pointer;
}

.star-prompt {
    text-align: center;
}

.star-icon {
    font-size: clamp(60px, 12vw, 110px);
    display: block;
    margin-bottom: clamp(12px, 2vw, 20px);
    animation: starFloat 2s ease-in-out infinite;
    cursor: pointer;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.4));
}

@keyframes starFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.1); }
}

.star-text {
    font-size: clamp(18px, 2.8vw, 26px);
    color: #fff;
    font-weight: 500;
    text-shadow: 0 2px 12px rgba(233, 30, 99, 0.3);
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.star-fly {
    position: fixed;
    z-index: 100;
    font-size: 60px;
    pointer-events: none;
    animation: starFlyToSky 2s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

@keyframes starFlyToSky {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(0, -60vh) scale(0.3); opacity: 0; }
}

.star-wish-sent {
    font-size: clamp(20px, 3vw, 30px);
    color: #fff;
    font-weight: 600;
    text-shadow: 0 2px 20px rgba(255, 255, 255, 0.5);
    animation: wishSent 2s ease forwards;
}

@keyframes wishSent {
    0% { opacity: 0; transform: scale(0.5); }
    30% { opacity: 1; transform: scale(1.1); }
    60% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* ============================================
   场景5：吹蜡烛
   ============================================ */
#scene-candle {
    z-index: 10;
}

.candle-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 0;
    animation: candleSlideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes candleSlideUp {
    0% { transform: translateY(100px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* 蛋糕 */
.cake-body {
    position: relative;
    width: clamp(160px, 28vw, 300px);
    text-align: center;
}

.cake-layer {
    background: linear-gradient(180deg, #fff0f5, #ffd1dc);
    border-radius: 10px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.1);
    position: relative;
}

.cake-layer-1 {
    width: 80%;
    height: clamp(35px, 5vw, 55px);
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, #fff5f7, #ffd1dc);
    position: relative;
    overflow: visible;
}

/* 奶油滴落装饰 */
.cake-layer-1::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 8%;
    width: 16%;
    height: 12px;
    background: #fff5f7;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 6px rgba(233, 30, 99, 0.08);
}
.cake-layer-1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 12%;
    width: 12%;
    height: 10px;
    background: #fff5f7;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 6px rgba(233, 30, 99, 0.08);
}

/* 额外奶油滴 */
.cake-cream-1 {
    position: absolute;
    bottom: -7px;
    left: 35%;
    width: 10%;
    height: 8px;
    background: #fff5f7;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 6px rgba(233, 30, 99, 0.08);
}

.cake-layer-2 {
    width: 90%;
    height: clamp(40px, 6vw, 65px);
    margin: 0 auto;
    background: linear-gradient(180deg, #ffd1dc, #f8bbd0);
    position: relative;
    overflow: hidden;
}

.cake-layer-2::before {
    content: '♡ ♡ ♡';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: clamp(9px, 1.2vw, 14px);
    letter-spacing: 0.5em;
}

/* 装饰圆点 */
.cake-layer-2::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 15%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 20px 0 0 rgba(255, 255, 255, 0.3),
                40px 0 0 rgba(255, 255, 255, 0.3),
                60px 0 0 rgba(255, 255, 255, 0.3),
                80px 0 0 rgba(255, 255, 255, 0.3);
}

.cake-layer-3 {
    width: 100%;
    height: clamp(50px, 7vw, 85px);
    margin: 0 auto;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(180deg, #f8bbd0, #f48fb1);
    position: relative;
}

/* 底部装饰线 */
.cake-layer-3::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
}

.cake-plate {
    width: 100%;
    height: clamp(6px, 0.8vw, 10px);
    background: linear-gradient(180deg, #fce4ec, #f8bbd0);
    border-radius: 0 0 6px 6px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}

/* 蛋糕底部阴影 */
.cake-shadow {
    width: 80%;
    height: 6px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.08) 0%, transparent 70%);
    margin: -4px auto 0;
    border-radius: 50%;
}

/* 蛋糕上的樱桃装饰 */
.cake-cherry {
    position: absolute;
    top: clamp(-8px, -1.5vw, -12px);
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(20px, 3vw, 30px);
    z-index: 15;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    animation: cherryBounce 3s ease-in-out infinite;
}

@keyframes cherryBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-3px); }
}

/* 数字蜡烛 */
.candle-numbers {
    position: absolute;
    top: clamp(-60px, -10vw, -110px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: clamp(20px, 5vw, 50px);
    align-items: center;
    z-index: 10;
}

.candle-number {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.candle-digit {
    font-size: clamp(48px, 10vw, 90px);
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 12px rgba(233, 30, 99, 0.3);
    line-height: 1;
}

/* 火焰 */
.candle-flame {
    position: absolute;
    top: clamp(-26px, -4vw, -38px);
    left: 50%;
    transform: translateX(-50%);
    width: clamp(16px, 2.5vw, 24px);
    height: clamp(24px, 4vw, 36px);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: linear-gradient(180deg, #ff6f00, #ffab00, #ffd54f);
    box-shadow: 0 0 20px rgba(255, 111, 0, 0.5), 0 0 40px rgba(255, 111, 0, 0.2);
    animation: flameDance 0.5s ease-in-out infinite alternate;
    transform-origin: center bottom;
}

@keyframes flameDance {
    0% { transform: translateX(-50%) scaleX(1) scaleY(1); }
    25% { transform: translateX(-50%) scaleX(0.9) scaleY(1.05); }
    50% { transform: translateX(-50%) scaleX(1.05) scaleY(0.95); }
    75% { transform: translateX(-50%) scaleX(0.95) scaleY(1.02); }
    100% { transform: translateX(-50%) scaleX(1) scaleY(1); }
}

.candle-flame.extinguish {
    animation: extinguish 0.5s ease forwards;
}

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

/* 青烟粒子 */
.smoke-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(200, 200, 200, 0.4);
    pointer-events: none;
    animation: smokeRise 1.5s ease-out forwards;
}

@keyframes smokeRise {
    0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

/* 吹气提示 */
.candle-hint {
    position: absolute;
    bottom: clamp(15px, 4vw, 40px);
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 500;
    text-shadow: 0 2px 12px rgba(0,0,0,0.15);
    animation: hintPulse 2s ease-in-out infinite;
    white-space: nowrap;
    letter-spacing: 0.05em;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 蜡烛入场动画 - 定义在 .candle-container 中 */

/* ============================================
   场景6：弹幕 + 翻牌 + 许愿结果
   ============================================ */
#scene-barrage {
    z-index: 10;
}

/* 弹幕容器 */
#barrage-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 11;
}

.barrage-item {
    position: absolute;
    white-space: nowrap;
    font-weight: 700;
    pointer-events: none;
    animation: barrageMoveUp linear forwards;
    text-shadow: 0 0 12px rgba(255,255,255,0.3), 0 2px 8px rgba(233,30,99,0.15);
    letter-spacing: 0.05em;
    opacity: 0;
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

@keyframes barrageMoveUp {
    0% { transform: translateY(0); opacity: 0; }
    5% { opacity: 0.9; }
    85% { opacity: 0.9; }
    100% { transform: translateY(calc(-100vh - 80px)); opacity: 0; }
}

/* ============================================
   翻牌区域
   ============================================ */
.cards-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: clamp(10px, 2vw, 18px);
    padding: clamp(14px, 2.5vw, 24px);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    max-width: min(88vw, 460px);
}

.flip-card {
    width: clamp(68px, 16vw, 120px);
    height: clamp(94px, 22vw, 162px);
    background: linear-gradient(145deg, #f48fb1, #e91e63);
    border-radius: clamp(8px, 1.5vw, 14px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(20px, 3.5vw, 34px);
    font-weight: 900;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.3);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
    perspective: 600px;
    position: relative;
}

.flip-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(233, 30, 99, 0.4);
}

.flip-card:active {
    transform: scale(0.95);
}

.flip-card.disabled {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(0.6);
}

.flip-card .card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.flip-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.flip-card .card-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card .card-front {
    background: linear-gradient(145deg, #f48fb1, #e91e63);
    transform: rotateY(180deg);
    overflow: hidden;
    padding: 4px;
}

.flip-card .card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.flip-card .card-back {
    background: linear-gradient(145deg, #f48fb1, #e91e63);
    font-size: clamp(24px, 4vw, 38px);
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 翻牌提示小标签 */
.card-tip {
    position: absolute;
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(15px, 2.2vw, 20px);
    font-weight: 500;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.18);
    padding: 6px 18px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: tipBounce 1.5s ease-in-out infinite;
    letter-spacing: 0.05em;
}

@keyframes tipBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
}

/* ============================================
   幸运转盘
   ============================================ */
#scene-wheel {
    z-index: 10;
}

.wheel-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(10px, 2.5vw, 20px);
}

.wheel-title {
    font-size: clamp(18px, 3vw, 26px);
    color: #fff;
    font-weight: 600;
    text-shadow: 0 2px 12px rgba(0,0,0,0.1);
    letter-spacing: 0.05em;
}

.wheel-wrapper {
    position: relative;
    width: clamp(300px, 65vw, 440px);
    height: clamp(300px, 65vw, 440px);
}

.wheel-pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(24px, 4vw, 32px);
    color: #e91e63;
    z-index: 5;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 4px 30px rgba(0,0,0,0.15), 0 0 0 4px rgba(255,255,255,0.3);
    transition: none;
}

#wheel-canvas.spinning {
    transition: transform 3.5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.wheel-spin-btn {
    padding: clamp(10px, 1.8vw, 16px) clamp(28px, 5vw, 48px);
    background: linear-gradient(135deg, #e91e63, #ff6f00);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: clamp(15px, 2.2vw, 20px);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.05em;
}

.wheel-spin-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 28px rgba(233, 30, 99, 0.4);
}

.wheel-spin-btn:active {
    transform: scale(0.95);
}

.wheel-spin-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.wheel-result {
    font-size: clamp(16px, 2.5vw, 22px);
    color: #fff;
    font-weight: 600;
    min-height: 30px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.5s;
}

.wheel-result.show {
    opacity: 1;
}

.wheel-retry-btn {
    padding: clamp(8px, 1.2vw, 12px) clamp(20px, 3vw, 32px);
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    font-size: clamp(13px, 1.8vw, 16px);
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.3s;
    letter-spacing: 0.03em;
}

.wheel-retry-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    transform: scale(1.05);
}

/* 金色闪粉粒子 */
.gold-sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 50;
    border-radius: 50%;
    animation: sparkleFall var(--duration) linear forwards;
}

@keyframes sparkleFall {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translateY(var(--fall-distance)) rotate(720deg) scale(0); opacity: 0; }
}



/* ============================================
   跳转按钮
   ============================================ */
#final-btn-wrap {
    position: absolute;
    z-index: 10;
    bottom: 50%;
    text-align: center;
    width: 100%;
    display: none;
    pointer-events: none;
}
#final-btn-wrap .jump-btn {
    pointer-events: auto;
}

.jump-btn {
    padding: clamp(14px, 2.5vw, 22px) clamp(32px, 6vw, 60px);
    background: linear-gradient(135deg, #e91e63, #ff6f00, #ffab00);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: clamp(17px, 2.8vw, 24px);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 30px rgba(233, 30, 99, 0.4);
    animation: breathBtn 2s ease-in-out infinite;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.05em;
    outline: none;
}

.jump-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #e91e63, #ff6f00, #ffab00, #e91e63);
    background-size: 400% 400%;
    border-radius: 52px;
    z-index: -1;
    animation: gradientShift 3s ease infinite;
    filter: blur(4px);
    opacity: 0.6;
}

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

.jump-btn:hover {
    transform: scale(1.05);
}

.jump-btn:active {
    transform: scale(0.95);
}

@keyframes breathBtn {
    0%, 100% { transform: scale(1); box-shadow: 0 6px 30px rgba(233, 30, 99, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 8px 50px rgba(233, 30, 99, 0.6); }
}

/* ============================================
   烟花/彩带 Canvas
   ============================================ */
#effect-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* ===== 音乐播放器小按钮 ===== */
.music-btn {
    position: fixed;
    top: clamp(16px, 3vh, 24px);
    right: clamp(16px, 3vw, 24px);
    width: clamp(40px, 6vw, 48px);
    height: clamp(40px, 6vw, 48px);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.music-btn span {
    font-size: clamp(18px, 2.5vw, 22px);
    animation: musicSpin 3s linear infinite;
    animation-play-state: paused;
}

.music-btn.playing span {
    animation-play-state: running;
}

.music-btn.paused {
    opacity: 0.5;
}

.music-btn.paused span {
    animation-play-state: paused;
}

@keyframes musicSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   通用工具
   ============================================ */
.hidden {
    display: none !important;
}

/* ============================================
   响应式 - 平板端（481px ~ 767px）
   ============================================ */
@media (min-width: 481px) and (max-width: 767px) {
    /* 平板端无需额外调整 */
}

/* ============================================
   响应式 - PC端（≥768px）
   ============================================ */
@media (min-width: 768px) {
    /* 弹幕 - PC端统一字体 */
    .barrage-item {
        font-size: 20px !important;
    }
}

/* ============================================
   响应式 - 手机端（≤480px）
   ============================================ */
@media (max-width: 480px) {
    .cards-area {
        gap: 6px;
        padding: 10px 12px;
        border-radius: 14px;
    }
    .flip-card {
        width: 60px;
        height: 82px;
        font-size: 18px;
    }
}