@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,400;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Cinzel:wght@600;700&display=swap');

/* ==========================================================================
   SWEETNOTE - PREMIUM 9-PAGE HAPPY BIRTHDAY INTERACTIVE EXPERIENCE
   Scoped strictly to #birthdayExperienceContainer (zero bleed to main site)
   ========================================================================== */

:root {
    --bday-gold: #f59e0b;
    --bday-gold-glow: rgba(245, 158, 11, 0.4);
    --bday-rose: #f43f5e;
    --bday-rose-glow: rgba(244, 63, 94, 0.35);
    --bday-pink-soft: #fbcfe8;
    --bday-cream: #fffdfa;
    --bday-champagne: #fef3c7;
    --bday-card-bg: rgba(255, 253, 250, 0.94);
    --bday-card-border: rgba(254, 205, 211, 0.7);
    --bday-dark-bg: #14050c;
    --bday-text-dark: #2a0618;
    --bday-text-muted: #702447;
    --bday-radius-sm: 12px;
    --bday-radius-md: 20px;
    --bday-radius-lg: 28px;
    --bday-shadow-soft: 0 16px 40px rgba(244, 63, 94, 0.16), 0 4px 12px rgba(0, 0, 0, 0.04);
    --bday-shadow-glow: 0 20px 50px rgba(244, 63, 94, 0.28), 0 0 30px rgba(245, 158, 11, 0.2);
}

/* 1. Main Scoped Container */
#birthdayExperienceContainer {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 12%, #fff1f2 0%, #ffe4e6 25%, #fecdd3 55%, #fda4af 85%, #fb7185 100%);
    color: var(--bday-text-dark);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    padding: 16px 12px 90px 12px;
    box-sizing: border-box;
}

/* Ambient Sparkle Canvas */
#bdayAmbientCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

/* 2. Top Floating Navigation & Audio Bar */
.bday-top-bar {
    position: relative;
    z-index: 10;
    max-width: 500px;
    margin: 0 auto 14px auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.bday-audio-pill {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(254, 205, 211, 0.9);
    padding: 6px 14px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #9f1239;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.12);
    transition: all 0.25s ease;
    user-select: none;
}

.bday-audio-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(244, 63, 94, 0.2);
}

.bday-audio-pill .disc-spin {
    display: inline-block;
    animation: bdaySpin 3s linear infinite;
    animation-play-state: paused;
}

.bday-audio-pill.playing .disc-spin {
    animation-play-state: running;
}

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

.bday-step-indicator {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(254, 205, 211, 0.9);
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.76rem;
    font-weight: 800;
    color: #9f1239;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.12);
}

/* 3. 9-Step Progress Dots Bar */
.bday-progress-dots {
    position: relative;
    z-index: 10;
    max-width: 500px;
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 8px;
}

.bday-dot {
    flex: 1;
    height: 5px;
    max-width: 44px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(244, 63, 94, 0.25);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bday-dot.active {
    background: linear-gradient(90deg, #f43f5e, #fb7185);
    border-color: #f43f5e;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.5);
    transform: scaleY(1.3);
}

.bday-dot.completed {
    background: #f43f5e;
    opacity: 0.85;
}

/* 4. Experience Wrap & Glass Card Container */
.bday-experience-wrap {
    position: relative;
    z-index: 5;
    max-width: 490px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bday-page-section {
    display: none;
    width: 100%;
    animation: bdayFadeSlideUp 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.bday-page-section.active {
    display: block;
}

@keyframes bdayFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bday-glass-card {
    background: var(--bday-card-bg);
    border: 1.5px solid var(--bday-card-border);
    border-radius: var(--bday-radius-lg);
    box-shadow: var(--bday-shadow-soft);
    padding: 26px 20px;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Badges & Typography */
.bday-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffe4e6;
    border: 1px solid #fecdd3;
    color: #be123c;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 40px;
    margin-bottom: 12px;
}

.bday-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 5.5vw, 2.3rem);
    font-weight: 800;
    color: #3b0724;
    line-height: 1.25;
    margin: 0 0 10px 0;
    letter-spacing: -0.015em;
}

.bday-hero-title .name-highlight {
    background: linear-gradient(135deg, #be123c 0%, #e11d48 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.bday-hero-sub {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--bday-text-muted);
    margin: 0 auto 20px auto;
    max-width: 380px;
}

/* Primary Celebratory Action Buttons */
.bday-btn-primary {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 50%, #be123c 100%);
    color: #ffffff;
    border: none;
    border-radius: 40px;
    padding: 14px 28px;
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    max-width: 320px;
    margin: 12px auto 0 auto;
    box-shadow: 0 8px 24px rgba(225, 29, 72, 0.38);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
}

.bday-btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 30px rgba(225, 29, 72, 0.48);
}

.bday-btn-primary:active {
    transform: scale(0.98);
}

.bday-btn-secondary {
    background: rgba(255, 255, 255, 0.85);
    border: 1.5px solid #fecdd3;
    color: #9f1239;
    border-radius: 40px;
    padding: 10px 22px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    user-select: none;
}

.bday-btn-secondary:hover {
    background: #fff;
    border-color: #f43f5e;
    transform: translateY(-1px);
}

/* Bottom Navigation Dock */
.bday-bottom-nav-dock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px dashed rgba(244, 63, 94, 0.25);
    width: 100%;
}

.bday-btn-nav-prev {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #fecdd3;
    color: #9f1239;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.bday-btn-nav-next {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    border: none;
    color: #fff;
    padding: 9px 20px;
    border-radius: 30px;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
    transition: all 0.2s;
}

/* ==========================================================================
   PAGE 1: THE GRAND BIRTHDAY INTRODUCTION
   ========================================================================== */
.bday-intro-hero {
    position: relative;
    padding: 10px 0 6px 0;
}

.bday-intro-anim-wrap {
    width: 130px;
    height: 130px;
    margin: 0 auto 14px auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bday-intro-sparkle-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px dashed rgba(244, 63, 94, 0.35);
    animation: bdaySpin 12s linear infinite;
}

.bday-intro-cake-icon {
    font-size: 4.2rem;
    filter: drop-shadow(0 10px 20px rgba(244, 63, 94, 0.3));
    animation: bdayBounce 2.4s ease-in-out infinite;
}

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

.bday-intro-countdown-pill {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 16px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.bday-intro-countdown-pill span {
    font-size: 0.78rem;
    font-weight: 700;
    color: #9f1239;
}

/* ==========================================================================
   PAGE 2: THE INTERACTIVE 3D GIFT BOX (VANISH & EMERGENT LETTER)
   ========================================================================== */
.bday-gift-stage-container {
    position: relative;
    width: 100%;
    min-height: 230px;
    margin: 8px auto 14px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bday-gift-scene {
    position: relative;
    width: 100%;
    max-width: 280px;
    height: 210px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    perspective: 800px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bday-gift-box-wrap {
    position: relative;
    width: 160px;
    height: 150px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bday-gift-box-wrap:hover {
    transform: scale(1.05);
}

/* 3D Gift Box Layers */
.bday-gift-lid {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 144px;
    height: 36px;
    background: linear-gradient(135deg, #f43f5e, #be123c);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.35);
    z-index: 3;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top center;
}

.bday-gift-bow {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.2rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
    transition: transform 0.4s ease;
}

.bday-gift-base {
    position: absolute;
    top: 40px;
    left: 18px;
    width: 124px;
    height: 100px;
    background: linear-gradient(135deg, #fb7185, #e11d48);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 14px 28px rgba(225, 29, 72, 0.3);
    z-index: 2;
    overflow: hidden;
}

.bday-gift-ribbon-v {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 100%;
    background: linear-gradient(180deg, #fef08a, #f59e0b);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.bday-gift-ribbon-h {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 20px;
    background: linear-gradient(90deg, #fef08a, #f59e0b);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.bday-gift-burst-rays {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.35) 0%, rgba(244, 63, 94, 0) 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

/* Vanish Gift Box When Opened */
.bday-gift-stage-container.opened .bday-gift-scene {
    opacity: 0;
    transform: scale(0.25) translateY(40px);
    pointer-events: none;
    height: 0;
    margin: 0;
    overflow: hidden;
}

/* Emergent Letter Card Taking Center Stage On Top */
.bday-gift-revealed-card {
    display: none;
    background: #fffdfa;
    border: 1.5px solid #fecdd3;
    border-radius: var(--bday-radius-md);
    padding: 22px 18px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 16px 36px rgba(244, 63, 94, 0.18);
    opacity: 0;
    transform: scale(0.7) translateY(30px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
}

.bday-gift-stage-container.opened .bday-gift-revealed-card {
    display: block;
    opacity: 1;
    transform: scale(1) translateY(0);
}

@keyframes bdayPopReveal {
    from { opacity: 0; transform: scale(0.88) translateY(15px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==========================================================================
   PAGE 3: THE BIRTHDAY CAKE & CANDLE EXPERIENCE
   ========================================================================== */
.bday-cake-stage {
    position: relative;
    width: 260px;
    height: 230px;
    margin: 12px auto 18px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.bday-cake-art {
    position: relative;
    width: 220px;
    height: 180px;
}

/* Cake Layers */
.bday-cake-plate {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 210px;
    height: 18px;
    background: #fff;
    border-radius: 30px;
    border: 1.5px solid #fbcfe8;
    box-shadow: 0 10px 24px rgba(244, 63, 94, 0.18);
}

.bday-cake-tier-bottom {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 175px;
    height: 65px;
    background: linear-gradient(135deg, #ffe4e6, #fbcfe8);
    border-radius: 14px 14px 6px 6px;
    border: 1.5px solid #f472b6;
    overflow: hidden;
}

.bday-cake-tier-top {
    position: absolute;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%);
    width: 125px;
    height: 55px;
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    border-radius: 12px 12px 6px 6px;
    border: 1.5px solid #f472b6;
}

/* Frosting drips */
.bday-frosting-drips {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 16px;
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

/* Candles & Animated Flames */
.bday-candles-row {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 5;
}

.bday-candle-item {
    position: relative;
    width: 8px;
    height: 34px;
    background: repeating-linear-gradient(45deg, #fff, #fff 4px, #f43f5e 4px, #f43f5e 8px);
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
}

.bday-candle-flame {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 20px;
    background: radial-gradient(circle at 50% 60%, #fff 15%, #fef08a 45%, #f97316 75%, #ef4444 100%);
    border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.9), 0 0 28px rgba(249, 115, 22, 0.6);
    animation: bdayFlicker 0.18s infinite alternate;
    transition: all 0.35s ease;
}

@keyframes bdayFlicker {
    0% { transform: translateX(-50%) scale(1) rotate(-2deg); }
    100% { transform: translateX(-50%) scale(1.1) rotate(2deg); }
}

.bday-candle-flame.extinguished {
    opacity: 0;
    transform: translateX(-50%) scale(0.2) translateY(-10px);
    pointer-events: none;
}

.bday-smoke-puff {
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: rgba(161, 161, 170, 0.6);
    border-radius: 50%;
    filter: blur(4px);
    opacity: 0;
    pointer-events: none;
}

.bday-smoke-puff.rise {
    animation: bdaySmokeRise 1.2s ease-out forwards;
}

@keyframes bdaySmokeRise {
    0% { opacity: 0.7; transform: translateX(-50%) scale(0.5); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-35px) scale(2); }
}

.bday-mic-blow-btn {
    margin-top: 10px;
    font-size: 0.8rem;
    padding: 8px 16px;
}

/* ==========================================================================
   PAGE 4: THE FLOATING BALLOON EXPERIENCE
   ========================================================================== */
.bday-balloons-cluster {
    position: relative;
    width: 100%;
    height: 260px;
    margin: 10px auto;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bday-balloon-node {
    position: absolute;
    width: 68px;
    height: 84px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    cursor: pointer;
    box-shadow: inset -6px -6px 14px rgba(0,0,0,0.22), inset 6px 6px 14px rgba(255,255,255,0.38), 0 10px 22px rgba(0,0,0,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    overflow: visible !important;
}

.bday-balloon-node:hover {
    transform: scale(1.12);
}

.bday-balloon-num {
    position: relative;
    z-index: 5;
    text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

.bday-balloon-knot {
    position: absolute;
    top: calc(100% - 3px);
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 6px;
    background: inherit;
    border-radius: 2px 2px 50% 50%;
    filter: brightness(0.8);
    z-index: 2;
    pointer-events: none;
}

.bday-balloon-string {
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 52px;
    background: linear-gradient(180deg, rgba(130, 130, 130, 0.75) 0%, rgba(130, 130, 130, 0.15) 100%);
    border-radius: 1px;
    z-index: 1;
    pointer-events: none;
}

/* Balloon Themes */
.bday-balloon-1 { background: radial-gradient(circle at 35% 30%, #fbcfe8, #f43f5e); left: 12%; top: 20px; animation: bdayFloat 3.2s ease-in-out infinite alternate; }
.bday-balloon-2 { background: radial-gradient(circle at 35% 30%, #ddd6fe, #8b5cf6); left: 32%; top: 60px; animation: bdayFloat 3.8s ease-in-out infinite alternate-reverse; }
.bday-balloon-3 { background: radial-gradient(circle at 35% 30%, #fef08a, #f59e0b); left: 52%; top: 15px; animation: bdayFloat 3.5s ease-in-out infinite alternate; }
.bday-balloon-4 { background: radial-gradient(circle at 35% 30%, #a7f3d0, #10b981); left: 72%; top: 50px; animation: bdayFloat 4.1s ease-in-out infinite alternate-reverse; }
.bday-balloon-5 { background: radial-gradient(circle at 35% 30%, #bae6fd, #0284c7); left: 42%; top: 120px; animation: bdayFloat 3.4s ease-in-out infinite alternate; }

@keyframes bdayFloat {
    from { transform: translateY(0) rotate(-2deg); }
    to { transform: translateY(-16px) rotate(2deg); }
}

.bday-balloon-node.popped {
    animation: bdayPopBurst 0.25s forwards;
    pointer-events: none;
}

@keyframes bdayPopBurst {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.8; }
    100% { transform: scale(0); opacity: 0; }
}

.bday-balloon-secret-modal {
    background: #fffdfa;
    border: 1.5px solid #fecdd3;
    border-radius: var(--bday-radius-md);
    padding: 16px 20px;
    margin-top: 12px;
    box-shadow: 0 8px 24px rgba(244, 63, 94, 0.15);
    font-size: 0.94rem;
    font-weight: 600;
    color: #3b0724;
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   PAGE 5: THE MEMORY & SURPRISE SCRAPBOOK
   ========================================================================== */
.bday-scrapbook-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 16px auto 14px auto;
}

.bday-polaroid-card {
    background: #fff;
    border: 1px solid #f3e8e2;
    border-radius: 8px;
    padding: 10px 10px 14px 10px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.bday-polaroid-card:nth-child(odd) {
    transform: rotate(-2.5deg);
}

.bday-polaroid-card:nth-child(even) {
    transform: rotate(2.5deg);
}

.bday-polaroid-card:hover {
    transform: rotate(0deg) scale(1.04);
    box-shadow: 0 14px 28px rgba(244, 63, 94, 0.2);
    z-index: 5;
}

.bday-polaroid-tape {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 14px;
    background: rgba(254, 240, 138, 0.7);
    border-left: 2px dashed rgba(234, 179, 8, 0.5);
    border-right: 2px dashed rgba(234, 179, 8, 0.5);
    z-index: 2;
}

.bday-polaroid-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    overflow: hidden;
    background: #fdf2f8;
    position: relative;
}

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

.bday-polaroid-caption {
    font-family: 'Caveat', cursive;
    font-size: 1.15rem;
    font-weight: 700;
    color: #4a044e;
    margin-top: 8px;
    line-height: 1.2;
}

.bday-photo-upload-overlay-btn {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
}

/* ==========================================================================
   PAGE 6: THE SECRET LETTER
   ========================================================================== */
.bday-letter-scene {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 12px auto;
}

.bday-envelope-wrap {
    position: relative;
    width: 100%;
    background: #fdf6ec;
    border: 2px solid #fbd38d;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    padding: 24px 18px;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bday-envelope-flap-gold {
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 20px;
    border-top: 2px solid #ecc94b;
}

.bday-wax-seal-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e11d48, #9f1239);
    border: 2px solid #fda4af;
    color: #fff;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(159, 18, 57, 0.4);
    cursor: pointer;
    transition: transform 0.25s ease;
}

.bday-wax-seal-btn:hover {
    transform: scale(1.08);
}

.bday-letter-paper-reveal {
    display: none;
    background: #fffdfa;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 20px 18px;
    margin-top: 14px;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    line-height: 1.6;
    animation: bdayPaperSlide 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

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

.bday-letter-greeting {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #3b0724;
    margin-bottom: 12px;
}

.bday-letter-body-text {
    font-family: 'Caveat', cursive;
    font-size: 1.35rem;
    font-weight: 600;
    color: #2e081f;
    white-space: pre-line;
    line-height: 1.5;
}

.bday-letter-signoff {
    margin-top: 16px;
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    font-weight: 700;
    color: #be123c;
    text-align: right;
}

/* ==========================================================================
   PAGE 7: SCRATCH-TO-REVEAL SURPRISE
   ========================================================================== */
.bday-scratch-container {
    position: relative;
    width: 290px;
    height: 170px;
    margin: 16px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(244, 63, 94, 0.25);
    border: 2px solid #fecdd3;
}

.bday-scratch-hidden-content {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px;
    text-align: center;
    box-sizing: border-box;
}

.bday-scratch-hidden-content h4 {
    margin: 0 0 6px 0;
    font-size: 0.96rem;
    font-weight: 800;
    color: #92400e;
}

.bday-scratch-hidden-content p {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: #78350f;
    line-height: 1.35;
}

.bday-scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    touch-action: none;
    z-index: 3;
}

.bday-scratch-hint-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 290px;
    margin: 8px auto 0 auto;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--bday-text-muted);
}

/* ==========================================================================
   PAGE 8: BIRTHDAY WISH & MYSTERY QUIZ
   ========================================================================== */
.bday-wish-sky-box {
    position: relative;
    width: 100%;
    height: 160px;
    background: radial-gradient(circle at 50% 30%, #1e1b4b 0%, #0f172a 100%);
    border-radius: var(--bday-radius-md);
    overflow: hidden;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid rgba(147, 197, 253, 0.3);
}

.bday-sky-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bday-wish-input-row {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 6px;
    width: 100%;
    max-width: 320px;
}

.bday-wish-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 8px 14px;
    color: #fff;
    font-size: 0.84rem;
    outline: none;
}

.bday-wish-input::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

.bday-quiz-card {
    background: #fff;
    border: 1.5px solid #fecdd3;
    border-radius: var(--bday-radius-md);
    padding: 16px;
    text-align: left;
    margin-top: 14px;
}

.bday-quiz-question {
    font-size: 0.92rem;
    font-weight: 800;
    color: #3b0724;
    margin-bottom: 12px;
}

.bday-quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bday-quiz-btn-opt {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #9f1239;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bday-quiz-btn-opt:hover {
    background: #ffe4e6;
    border-color: #f43f5e;
}

.bday-quiz-btn-opt.selected {
    background: #10b981;
    border-color: #059669;
    color: #fff;
}

/* ==========================================================================
   PAGE 9: THE GRAND FINALE
   ========================================================================== */
.bday-finale-wrap {
    padding: 10px 0;
}

.bday-finale-badge {
    display: inline-block;
    font-size: 3rem;
    margin-bottom: 8px;
    animation: bdayBounce 2s ease-in-out infinite;
}

.bday-emoji-reactions-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 18px auto;
}

.bday-emoji-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid #fecdd3;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.15);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
}

.bday-emoji-btn:hover {
    transform: scale(1.22);
}

.bday-emoji-btn:active {
    transform: scale(0.9);
}

.bday-floating-emoji-item {
    position: fixed;
    pointer-events: none;
    z-index: 100;
    font-size: 2rem;
    animation: bdayFloatEmoji 2s ease-out forwards;
}

@keyframes bdayFloatEmoji {
    0% { opacity: 1; transform: translateY(0) scale(0.6); }
    100% { opacity: 0; transform: translateY(-180px) scale(1.4); }
}

/* Responsive Rules for Small Devices */
@media (max-width: 480px) {
    #birthdayExperienceContainer {
        padding: 12px 8px 80px 8px;
    }
    .bday-glass-card {
        padding: 22px 14px;
        border-radius: 22px;
    }
    .bday-hero-title {
        font-size: 1.7rem;
    }
    .bday-scrapbook-grid {
        gap: 10px;
    }
    .bday-polaroid-caption {
        font-size: 1.05rem;
    }
}

/* Wish Wrapping Animation & Cosmic Shooting Stars Display */
.bday-wish-input-row.wrapping {
    animation: bdayWishWrap 0.4s ease forwards;
}

@keyframes bdayWishWrap {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.9) rotate(2deg); opacity: 0.6; }
    100% { transform: scale(0.1) translateY(-25px); opacity: 0; height: 0; margin: 0; padding: 0; }
}

.bday-shooting-stars-display {
    display: none;
    position: relative;
    width: 100%;
    height: 230px;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 10px;
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.45), 0 0 25px rgba(56, 189, 248, 0.35);
    animation: bdayStarSkyReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.bday-shooting-stars-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(1.1) contrast(1.15);
}

.bday-launched-wish-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.4) 0%, rgba(2, 6, 23, 0.78) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    box-sizing: border-box;
}

.bday-star-scroll-badge {
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    font-weight: 800;
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.bday-launched-wish-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-style: italic;
    color: #fef08a;
    text-shadow: 0 0 14px rgba(254, 240, 138, 0.85), 0 2px 4px rgba(0,0,0,0.8);
    margin-bottom: 6px;
    line-height: 1.4;
    animation: bdayFloatWish 3s ease-in-out infinite alternate;
}

.bday-launched-wish-sub {
    font-size: 0.75rem;
    color: #cbd5e1;
    margin: 0 0 6px 0;
}

@keyframes bdayStarSkyReveal {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes bdayFloatWish {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}
