/* ==========================================================================
   YAKBOK 3D GIFT BOX - Single Giant Grand Flying Number Burst (+1,111 บาท)
   Theme: Holographic Glass Slip, Soft Pearl White & Rose Gold (No Emojis)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Mitr:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&family=Outfit:wght@400;600;800&family=Space+Grotesk:wght@600;700&display=swap');

:root {
    --bg-light: #fff8f9;
    --bg-card: rgba(255, 255, 255, 0.94);
    --bg-card-hover: rgba(255, 245, 248, 0.98);
    
    --accent-pink: #ff407d;
    --accent-rose: #ff7597;
    --accent-gold: #e6a100;
    --accent-purple: #9d4edd;
    --accent-green: #00b894;
    --accent-cyan: #00b4d8;

    --border-pink: rgba(255, 64, 125, 0.25);
    --border-gold: rgba(230, 161, 0, 0.35);

    --text-primary: #2b2d42;
    --text-secondary: #5c677d;
    --text-muted: #8d99ae;

    --font-heading: 'Mitr', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Mitr', 'Outfit', sans-serif;
    --font-mono: 'Space Grotesk', monospace;

    --glass-shadow: 0 20px 50px rgba(255, 64, 125, 0.12), 0 8px 24px rgba(0, 0, 0, 0.06);
    --soft-pink-glow: 0 0 30px rgba(255, 64, 125, 0.3);
    --soft-gold-glow: 0 0 30px rgba(230, 161, 0, 0.4);

    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-light);
    color: var(--text-primary);
    font-family: var(--font-body);
    position: relative;
    touch-action: manipulation;
}

/* 3D WebGL Canvas Container */
#canvas-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: grab;
    touch-action: none;
}

#canvas-container:active { cursor: grabbing; }

#bg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* SINGLE GIANT GRAND FLYING 3D NUMBER BURST (+1,111 บาท) */
.single-giant-number {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 10005;
    font-family: var(--font-mono);
    font-size: clamp(3.2rem, 10vw, 6.2rem);
    font-weight: 900;
    color: var(--accent-pink);
    text-shadow: 0 0 40px rgba(255, 64, 125, 0.9), 0 0 80px rgba(230, 161, 0, 0.9);
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 0;
    animation: singleGiantFlyUp 2.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 15px 35px rgba(255, 64, 125, 0.6));
}

.giant-num-symbol {
    font-size: 0.8em;
}

.giant-num-unit {
    font-size: 0.45em;
    font-family: var(--font-body);
    font-weight: 700;
    margin-left: 6px;
}

@keyframes singleGiantFlyUp {
    0% {
        opacity: 0;
        transform: translate(-50%, -30%) scale(0.1);
    }
    25% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.4);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -70%) scale(1.1);
    }
    80% {
        opacity: 0.95;
        transform: translate(-50%, -120%) scale(1.0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -180%) scale(0.7);
    }
}

/* Floating Soft Glow Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.45;
    z-index: 0;
    pointer-events: none;
    animation: floatOrb 20s ease-in-out infinite alternate;
}

.glow-orb-1 { width: 550px; height: 550px; background: #ffe3ec; top: -120px; left: -120px; }
.glow-orb-2 { width: 600px; height: 600px; background: #f0e6ff; bottom: -140px; right: -120px; animation-delay: -10s; }

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 80px) scale(1.15); }
}

/* SVG Icon Base */
.icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25em;
    height: 1.25em;
    vertical-align: middle;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-lg { width: 2.5rem; height: 2.5rem; }
.icon-xl { width: 3.8rem; height: 3.8rem; }

/* MINIMALIST BRIGHT LOCK SCREEN OVERLAY WITH GRAND SILK CURTAINS */
.lock-screen {
    position: fixed;
    inset: 0;
    background: rgba(255, 248, 249, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
}

/* GRAND SILK & VELVET STAGE CURTAINS */
.curtain-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.curtain-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50.5%;
    z-index: 2;
    background: linear-gradient(135deg, #050a17 0%, #0d1b3e 22%, #1a326b 48%, #0f2352 75%, #08122c 100%);
    box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.75);
    transition: transform 2.5s cubic-bezier(0.77, 0, 0.175, 1);
    overflow: hidden;
}

/* 3D Vertical Silk Folds Texture */
.curtain-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.55) 0px,
        rgba(0, 0, 0, 0.1) 25px,
        rgba(255, 255, 255, 0.25) 50px,
        rgba(0, 0, 0, 0.5) 75px
    );
}

.curtain-left {
    left: 0;
    transform-origin: left center;
}

.curtain-right {
    right: 0;
    transform-origin: right center;
}

/* 24K Shimmering Golden Edge Fringe Trim */
.curtain-left .curtain-fringe {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 10px;
    background: linear-gradient(180deg, #ffd700 0%, #fff7d6 25%, #ffd700 50%, #b8860b 75%, #ffd700 100%);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.9), -3px 0 8px rgba(0,0,0,0.5);
    z-index: 3;
}

.curtain-right .curtain-fringe {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 10px;
    background: linear-gradient(180deg, #ffd700 0%, #fff7d6 25%, #ffd700 50%, #b8860b 75%, #ffd700 100%);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.9), 3px 0 8px rgba(0,0,0,0.5);
    z-index: 3;
}

/* Top Decorative Royal Valance Drape */
.curtain-valance {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 95px;
    background: linear-gradient(180deg, #040814 0%, #0e204c 50%, #1c3b7a 85%, #0a1738 100%);
    border-bottom: 4px solid #ffd700;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 215, 0, 0.4);
    z-index: 4;
    transition: transform 2.5s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    justify-content: space-around;
    position: relative;
}

.valance-drape {
    flex: 1;
    height: 100%;
    background: radial-gradient(ellipse at top center, #264a9c 0%, #0e204c 65%, #050d21 100%);
    border-bottom-left-radius: 50% 35px;
    border-bottom-right-radius: 50% 35px;
    border-bottom: 3px solid #ffd700;
    margin: 0 -10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

/* Golden Hanging Tassels */
.gold-tassel {
    position: absolute;
    top: 70px;
    z-index: 5;
    width: 24px;
    height: 36px;
    filter: drop-shadow(0 4px 10px rgba(255, 215, 0, 0.7));
    animation: tasselSway 3s infinite ease-in-out alternate;
}

.tassel-left { left: 40px; }
.tassel-right { right: 40px; animation-delay: 1.5s; }

.tassel-svg {
    width: 100%;
    height: 100%;
}

@keyframes tasselSway {
    0% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}

/* Central Celestial Starlight Gold Beam on Curtain Opening */
.curtain-light-beam {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.2);
    width: 380px;
    height: 100vh;
    background: radial-gradient(ellipse at center, rgba(255, 250, 235, 1) 0%, rgba(255, 215, 0, 0.65) 35%, rgba(255, 83, 136, 0.35) 60%, rgba(255, 255, 255, 0) 80%);
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    filter: blur(15px);
    transition: opacity 1.2s ease, transform 2.3s ease-out;
}

/* LOCK SCREEN CONTENT CARD */
.lock-card {
    background: var(--bg-card);
    border: 1px solid var(--border-pink);
    padding: 52px 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    max-width: 440px;
    width: 100%;
    position: relative;
    overflow: hidden;
    z-index: 10;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

/* CURTAIN OPENING ANIMATION STATE (Triggered when user clicks unlock button) */
.lock-screen.opening-curtains .lock-card {
    opacity: 0;
    transform: scale(0.88) translateY(-15px);
    pointer-events: none;
}

.lock-screen.opening-curtains .curtain-left {
    transform: translateX(-104%) scaleX(0.9);
}

.lock-screen.opening-curtains .curtain-right {
    transform: translateX(104%) scaleX(0.9);
}

.lock-screen.opening-curtains .curtain-valance {
    transform: translateY(-105%);
}

.lock-screen.opening-curtains .curtain-light-beam {
    opacity: 1;
    transform: translate(-50%, -50%) scale(2.2);
}

.lock-screen.unlocked {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ==========================================================================
   FULL-SCREEN 3D UNBOXING SHOCKWAVE EXPLOSION AURA
   ========================================================================== */
.unboxing-shockwave-wrap {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unboxing-shockwave-ring {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 5px solid var(--accent-pink);
    box-shadow: 0 0 60px var(--accent-pink), inset 0 0 40px #ffd700;
    animation: shockwaveExplode 1.8s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.unboxing-shockwave-ray {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.7) 0%, rgba(255, 64, 125, 0.4) 40%, rgba(255, 255, 255, 0) 75%);
    filter: blur(25px);
    animation: rayPulseExplode 1.6s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes shockwaveExplode {
    0% { transform: scale(0.1); opacity: 1; border-width: 12px; }
    40% { opacity: 0.9; }
    100% { transform: scale(7); opacity: 0; border-width: 1px; }
}

@keyframes rayPulseExplode {
    0% { transform: scale(0.1); opacity: 1; }
    50% { transform: scale(2.2); opacity: 0.85; }
    100% { transform: scale(3.5); opacity: 0; }
}

.lock-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-rose), var(--accent-gold));
}

.lock-heart-wrap {
    width: 88px;
    height: 88px;
    margin: 0 auto 24px;
    background: rgba(255, 64, 125, 0.08);
    border: 2px solid var(--accent-pink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-pink);
    box-shadow: 0 0 25px rgba(255, 64, 125, 0.2);
    animation: pulseHeart 2s infinite ease-in-out;
}

@keyframes pulseHeart {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 64, 125, 0.2); }
    50% { transform: scale(1.08); box-shadow: 0 0 35px rgba(255, 64, 125, 0.4); }
}

.lock-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.lock-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 34px;
    line-height: 1.6;
    font-weight: 300;
}

.btn-unlock {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-rose));
    color: white;
    border: none;
    padding: 16px 42px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-body);
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 25px rgba(255, 64, 125, 0.35);
    transition: var(--transition-smooth);
    animation: pulseBtnGlow 2.5s infinite ease-in-out;
}

@keyframes pulseBtnGlow {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(255, 64, 125, 0.35); }
    50% { transform: scale(1.04); box-shadow: 0 12px 35px rgba(255, 64, 125, 0.5); }
}

.btn-unlock:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 14px 40px rgba(255, 64, 125, 0.6);
}

/* HUD Top Header Overlay */
.hud-header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    pointer-events: none;
    width: 90%;
    max-width: 600px;
}

.badge-glow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px;
    background: linear-gradient(135deg, rgba(255, 64, 125, 0.12), rgba(255, 215, 0, 0.12));
    border: 1.5px solid rgba(255, 64, 125, 0.35);
    border-radius: 50px;
    color: var(--accent-pink);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
    box-shadow: 0 4px 15px rgba(255, 64, 125, 0.1);
}

.hud-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    line-height: 1.25;
}

.hud-title-sub {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.hud-title-name {
    font-size: clamp(1.8rem, 5.5vw, 2.8rem);
    font-weight: 700;
    background: linear-gradient(135deg, #ff407d 0%, #ff7597 45%, #e6a100 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 15px rgba(255, 64, 125, 0.25));
    letter-spacing: 0.5px;
}

/* Bottom Instruction HUD */
.hud-bottom {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 90%;
    max-width: 420px;
    text-align: center;
    pointer-events: auto;
}

.drag-instruction-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px dashed var(--accent-pink);
    padding: 10px 22px;
    border-radius: 50px;
    color: var(--accent-pink);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    animation: bounceHUD 2s infinite ease-in-out;
}

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

.progress-bar-bg {
    width: 100%;
    height: 10px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-rose), var(--accent-gold));
    border-radius: 10px;
    transition: width 0.1s ease-out;
}

.progress-label {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Floating Music Control Bar */
.music-bar {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 900;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.music-btn {
    background: var(--accent-pink);
    border: none;
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 64, 125, 0.4);
}

.music-info { display: flex; flex-direction: column; }
.music-title { font-size: 0.78rem; font-weight: 600; color: var(--text-primary); }
.music-status { font-size: 0.68rem; color: var(--accent-pink); }

.equalizer { display: flex; align-items: flex-end; gap: 3px; height: 14px; }
.eq-bar { width: 3px; background: var(--accent-pink); border-radius: 2px; height: 3px; }
.playing .eq-bar:nth-child(1) { animation: eqAnim 0.8s infinite alternate ease-in-out; }
.playing .eq-bar:nth-child(2) { animation: eqAnim 0.6s infinite alternate ease-in-out 0.2s; }
.playing .eq-bar:nth-child(3) { animation: eqAnim 1.1s infinite alternate ease-in-out 0.4s; }

@keyframes eqAnim { 0% { height: 3px; } 100% { height: 14px; } }

/* ==========================================================================
   MODALS & SEQUENTIAL SURPRISE CARDS
   ========================================================================== */
.prize-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(255, 248, 249, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.prize-modal.active {
    opacity: 1;
    visibility: visible;
}

.prize-card {
    background: #ffffff;
    border: 2px solid transparent;
    background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(135deg, #ffd700, #ff5388, #ffd700, #ff2a6d);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border-radius: var(--radius-lg);
    padding: 32px 22px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 70px rgba(255, 64, 125, 0.22), 0 0 30px rgba(255, 215, 0, 0.2);
    position: relative;
    transform: scale(0.85);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
}

.prize-modal.active .prize-card { transform: scale(1); }

.prize-crown-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 64, 125, 0.15));
    border: 2px solid #ffd700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-pink);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
    animation: trophyPulse 2.2s infinite alternate ease-in-out;
}

@keyframes trophyPulse {
    0% { transform: scale(1) rotate(0deg); box-shadow: 0 0 15px rgba(255, 215, 0, 0.3); }
    100% { transform: scale(1.1) rotate(4deg); box-shadow: 0 0 35px rgba(255, 64, 125, 0.5), 0 0 20px rgba(255, 215, 0, 0.6); }
}

.prize-header-tag {
    color: var(--accent-pink);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.prize-title-pop {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    animation: popTitleIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popTitleIn {
    0% { opacity: 0; transform: translateY(-15px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.prize-highlight-amount {
    color: var(--accent-pink);
    font-weight: 900;
    text-shadow: 0 0 12px rgba(255, 64, 125, 0.3);
}

/* Digital Bank Slip VIP Card */
.slip-card {
    background: linear-gradient(145deg, #ffffff 0%, #fff0f4 50%, #fff7e6 100%);
    border: 1.5px solid #ffd700;
    border-radius: var(--radius-md);
    padding: 20px 18px;
    margin: 16px 0;
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(255, 215, 0, 0.18), 0 6px 20px rgba(255, 64, 125, 0.08);
}

.slip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ffd700, var(--accent-pink), #ffd700);
}

.slip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.3);
    margin-bottom: 14px;
}

.slip-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-pink);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.slip-status-badge {
    background: rgba(255, 215, 0, 0.18);
    border: 1px solid #ffd700;
    color: #b8860b;
    font-size: 0.7rem;
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.slip-amount-wrap {
    text-align: center;
    margin: 14px 0;
    padding: 14px 0;
    background: linear-gradient(135deg, rgba(255, 64, 125, 0.05), rgba(255, 215, 0, 0.08));
    border-radius: var(--radius-sm);
    border: 1px dashed rgba(255, 64, 125, 0.25);
}

.slip-amount-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.slip-amount-val {
    font-family: var(--font-mono);
    font-size: 3.4rem;
    font-weight: 900;
    color: var(--accent-pink);
    line-height: 1.1;
    transition: transform 0.3s ease;
    text-shadow: 0 4px 12px rgba(255, 64, 125, 0.2);
}

.slip-amount-val.pop-finished #animated-money-val {
    animation: moneyFinishedPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

@keyframes moneyFinishedPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); color: #ffd700; text-shadow: 0 0 20px #ffd700; }
    100% { transform: scale(1); color: var(--accent-pink); }
}

.slip-amount-currency {
    font-size: 0.88rem;
    color: var(--text-primary);
    font-weight: 800;
}

.slip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 0.76rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.12);
    padding-top: 14px;
    margin-bottom: 12px;
}

.slip-field-label { color: var(--text-muted); font-size: 0.68rem; text-transform: uppercase; }
.slip-field-val { color: var(--text-primary); font-weight: 700; margin-top: 2px; }

.slip-emotional-note {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-left: 4px solid var(--accent-pink);
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.slip-footer-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Timer Countdown Badges */
.timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 64, 125, 0.08), rgba(255, 215, 0, 0.08));
    border: 1px solid rgba(255, 64, 125, 0.3);
    padding: 8px 20px;
    border-radius: 50px;
    color: var(--accent-pink);
    font-size: 0.82rem;
    font-weight: 700;
    margin: 14px 0;
    box-shadow: 0 4px 15px rgba(255, 64, 125, 0.1);
}

.timer-num {
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--accent-pink);
}

/* Wishes Box */
.modal-wishes-box {
    background: linear-gradient(145deg, #fff5f7 0%, #fffdf8 100%);
    border: 1.5px solid rgba(255, 215, 0, 0.35);
    border-radius: var(--radius-md);
    padding: 22px 20px;
    margin: 16px 0;
    text-align: left;
    font-size: 0.96rem;
    line-height: 1.7;
    color: var(--text-primary);
    position: relative;
    box-shadow: 0 8px 25px rgba(255, 64, 125, 0.06);
}

.gold-quote-icon {
    color: #ffd700;
    opacity: 0.5;
    position: absolute;
}
.quote-start { top: 8px; left: 10px; }
.quote-end { bottom: 8px; right: 10px; }

.modal-wishes-p {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.modal-wishes-p::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 7px;
    height: 7px;
    background: linear-gradient(135deg, var(--accent-pink), #ffd700);
    border-radius: 50%;
}

/* Photo Gallery Slider */
.gallery-modal-card {
    max-width: 620px;
}

.photo-gallery-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 16px;
    max-height: 52vh;
    overflow-y: auto;
    padding: 6px;
}

.photo-polaroid-card {
    background: #ffffff;
    border: 1.5px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 10px 10px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
    position: relative;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.photo-polaroid-card:hover {
    transform: translateY(-8px) scale(1.04) rotate(1deg);
    box-shadow: 0 18px 40px rgba(255, 64, 125, 0.22), 0 0 15px rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
}

.polaroid-pin {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    z-index: 5;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
}

.polaroid-img-wrap {
    width: 100%;
    height: 155px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.polaroid-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.photo-polaroid-card:hover .polaroid-img-wrap img {
    transform: scale(1.08);
}

.polaroid-caption {
    margin-top: 8px;
    text-align: left;
}

.polaroid-tag {
    font-size: 0.68rem;
    color: var(--accent-pink);
    font-weight: 800;
    letter-spacing: 1px;
}

.polaroid-caption p {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 2px;
}

/* Action Buttons Fade-in Animation */
.prize-close-btn {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-rose), #ff2a6d);
    color: white;
    border: 1px solid rgba(255, 215, 0, 0.4);
    padding: 14px 38px;
    font-size: 0.98rem;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 64, 125, 0.4), 0 0 15px rgba(255, 215, 0, 0.3);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(10px);
}

.prize-close-btn.show-btn {
    opacity: 1;
    transform: translateY(0);
}

.prize-close-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 16px 45px rgba(255, 64, 125, 0.55), 0 0 25px rgba(255, 215, 0, 0.5);
}

/* ==========================================================================
   ULTRA GRAND SINGLE GIANT MONEY BURST (+1,111 บาท)
   ========================================================================== */
.single-giant-number-wrap {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: grandBurstSequence 2.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.giant-glow-ring {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, rgba(255, 83, 136, 0.45) 40%, rgba(255, 255, 255, 0) 70%);
    filter: blur(20px);
    animation: ringExplode 1.4s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.single-giant-number {
    font-family: var(--font-heading), var(--font-mono), sans-serif;
    font-size: clamp(3.5rem, 12vw, 6.5rem);
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    background: linear-gradient(135deg, #fff7d6 0%, #ffd700 35%, #ff5388 70%, #ff2a6d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 15px 35px rgba(255, 64, 125, 0.6)) drop-shadow(0 0 25px rgba(255, 215, 0, 0.8));
    letter-spacing: -1px;
    position: relative;
    z-index: 2;
}

.giant-plus {
    color: #ffd700;
    -webkit-text-fill-color: #ffd700;
    margin-right: 2px;
}

.giant-currency {
    font-size: clamp(1.5rem, 5vw, 2.8rem);
    font-weight: 800;
    color: var(--accent-pink);
    -webkit-text-fill-color: var(--accent-pink);
    vertical-align: middle;
    margin-left: 6px;
}

.giant-star {
    position: absolute;
    width: 36px;
    height: 36px;
    fill: #ffd700;
    filter: drop-shadow(0 0 10px #ffd700);
    opacity: 0;
    z-index: 3;
}

.star-1 { top: -40px; left: -30px; animation: starPop1 1.5s 0.2s ease-out forwards; }
.star-2 { top: -50px; right: -40px; animation: starPop2 1.5s 0.3s ease-out forwards; }
.star-3 { bottom: -30px; left: -40px; animation: starPop3 1.5s 0.25s ease-out forwards; }
.star-4 { bottom: -40px; right: -30px; animation: starPop4 1.5s 0.35s ease-out forwards; }

@keyframes grandBurstSequence {
    0% {
        opacity: 0;
        transform: translate(-50%, -35%) scale(0.1) rotate(-12deg);
        filter: blur(15px);
    }
    18% {
        opacity: 1;
        transform: translate(-50%, -55%) scale(1.45) rotate(3deg);
        filter: blur(0px);
    }
    30% {
        transform: translate(-50%, -50%) scale(1.15) rotate(0deg);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -65%) scale(1.25);
        filter: blur(0px);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -105%) scale(1.4);
        filter: blur(10px);
    }
}

@keyframes ringExplode {
    0% { transform: scale(0.1); opacity: 0.9; }
    50% { transform: scale(1.8); opacity: 0.8; }
    100% { transform: scale(2.6); opacity: 0; }
}

@keyframes starPop1 { 0% { transform: translate(0,0) scale(0); opacity: 0; } 50% { transform: translate(-45px, -45px) scale(1.5) rotate(45deg); opacity: 1; } 100% { transform: translate(-80px, -80px) scale(0); opacity: 0; } }
@keyframes starPop2 { 0% { transform: translate(0,0) scale(0); opacity: 0; } 50% { transform: translate(45px, -55px) scale(1.5) rotate(-30deg); opacity: 1; } 100% { transform: translate(80px, -90px) scale(0); opacity: 0; } }
@keyframes starPop3 { 0% { transform: translate(0,0) scale(0); opacity: 0; } 50% { transform: translate(-55px, 35px) scale(1.5) rotate(60deg); opacity: 1; } 100% { transform: translate(-90px, 60px) scale(0); opacity: 0; } }
@keyframes starPop4 { 0% { transform: translate(0,0) scale(0); opacity: 0; } 50% { transform: translate(55px, 45px) scale(1.5) rotate(-45deg); opacity: 1; } 100% { transform: translate(90px, 70px) scale(0); opacity: 0; } }

/* Mobile Screen Breakpoint Adjustments (< 600px) */
@media (max-width: 600px) {
    .hud-header {
        top: 14px;
    }
    .hud-title {
        font-size: 1.35rem;
    }
    .badge-glow {
        font-size: 0.75rem;
        padding: 4px 14px;
    }
    .hud-bottom {
        bottom: 18px;
        width: 94%;
    }
    .drag-instruction-badge {
        font-size: 0.8rem;
        padding: 8px 18px;
    }
    .lock-card {
        padding: 36px 20px;
    }
    .lock-title {
        font-size: 1.5rem;
    }
    .lock-subtitle {
        font-size: 0.88rem;
    }
    .btn-unlock {
        padding: 14px 32px;
        font-size: 0.98rem;
    }
    .prize-card {
        padding: 24px 16px;
    }
    .slip-amount-val {
        font-size: 2.5rem;
    }
    .slip-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .photo-gallery-slider {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================================
   INTERACTIVE ENVELOPE & APOLOGY LETTER MODAL STYLES
   ========================================================================== */
.letter-modal-card {
    max-width: 580px;
    width: 95%;
    padding: 32px 24px;
}

.letter-hint-text {
    font-size: 0.95rem;
    color: var(--accent-pink);
    font-weight: 600;
    margin-bottom: 12px;
    animation: bounceHint 2s infinite ease-in-out;
}

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

.envelope-container {
    position: relative;
    width: 100%;
    margin: 15px auto;
    perspective: 1000px;
}

.envelope-wrapper {
    position: relative;
    width: 100%;
    min-height: 230px;
    background: linear-gradient(135deg, #ffeef3 0%, #ffd6e3 100%);
    border: 2px solid rgba(255, 117, 151, 0.4);
    border-radius: var(--radius-md);
    box-shadow: 0 15px 35px rgba(255, 64, 125, 0.18);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.envelope-wrapper:not(.is-open):hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 45px rgba(255, 64, 125, 0.28);
}

.envelope-wrapper:not(.is-open) {
    animation: envelopePulse 2.5s infinite ease-in-out;
}

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

/* Envelope Flap Top Triangle */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 115px;
    background: linear-gradient(180deg, #ffa8be, #ff7597);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    transform-origin: top center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 4;
}

/* Envelope Front Pocket Cover */
.envelope-front {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 140px;
    background: linear-gradient(180deg, rgba(255, 235, 242, 0.85), rgba(255, 204, 218, 0.95));
    clip-path: polygon(0 100%, 0 0, 50% 50%, 100% 0, 100% 100%);
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

/* Red Wax Seal Badge */
.wax-seal {
    position: absolute;
    top: 85px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #ff407d, #d6004c);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(214, 0, 76, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.5s ease;
}

.wax-seal .icon-svg {
    width: 1.2rem;
    height: 1.2rem;
    margin-bottom: 2px;
}

/* Letter Paper inside Envelope */
.letter-paper {
    position: absolute;
    top: 20px;
    left: 15px;
    right: 15px;
    background: #fffdfa;
    background-image: radial-gradient(#ffe0eb 1px, transparent 1px);
    background-size: 16px 16px;
    border: 2px solid rgba(255, 117, 151, 0.3);
    border-radius: 14px;
    padding: 24px 20px;
    z-index: 2;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.6;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

.letter-stamp {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    opacity: 0.7;
}

.letter-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px dashed rgba(255, 117, 151, 0.25);
}

.letter-to {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-pink);
    font-family: var(--font-heading);
}

.letter-from {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.letter-body {
    text-align: left;
}

.letter-paragraph {
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-family: var(--font-body);
}

.letter-paragraph:last-child {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--accent-pink);
}

/* OPENED STATE ANIMATIONS */
.envelope-wrapper.is-open {
    min-height: auto;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    cursor: default;
    overflow: visible;
}

.envelope-wrapper.is-open .envelope-flap {
    transform: rotateX(180deg);
    z-index: 1;
    opacity: 0;
}

.envelope-wrapper.is-open .envelope-front {
    opacity: 0;
}

.envelope-wrapper.is-open .wax-seal {
    transform: translateX(-50%) scale(0) rotate(180deg);
    opacity: 0;
}

.envelope-wrapper.is-open .letter-paper {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    box-shadow: 0 16px 40px rgba(255, 64, 125, 0.16);
    border-color: rgba(255, 64, 125, 0.4);
    animation: letterUnfold 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes letterUnfold {
    0% {
        transform: translateY(40px) scale(0.9);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

