/* ==========================================================================
   AERION'S DESIGN — 9 AESTHETIC THEMES & 7-SLIDE DISTINCT ARCHITECTURES
   WITH SHINING LIQUID GLASSMORPHISM & DYNAMIC THEME-REACTIVE AMBIENCE
   ========================================================================== */

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

:root {
    /* Default: Dark Luxury */
    --theme-name: 'Dark Luxury';
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121c;
    --bg-radial: radial-gradient(circle at 50% 10%, #1e1b2e 0%, #0a0a0f 70%, #040407 100%);
    --bg-card: rgba(22, 22, 34, 0.65);
    --bg-card-border: rgba(255, 255, 255, 0.2);
    --accent-glow: rgba(212, 175, 55, 0.45);
    --accent-primary: #d4af37;
    --accent-secondary: #f3e5ab;
    --accent-gradient: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #aa7c11 100%);
    --envelope-body: #1a1820;
    --envelope-flap: #23202d;
    --envelope-lining: #383042;
    --letter-bg: #fffdf7;
    --letter-text: #2d2417;
    --seal-color: #c59b27;
    --seal-glow: rgba(197, 155, 39, 0.5);
    --swatch-gradient: linear-gradient(135deg, #2b2b36 0%, #15151e 100%);
    --swatch-border: #d4af37;
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --glass-shine: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.05) 40%, transparent 80%);
}

/* 1. Dark Luxury */
body[data-theme="dark-luxury"] {
    --theme-name: 'Dark Luxury';
    --bg-primary: #07070a;
    --bg-secondary: #13121b;
    --bg-radial: radial-gradient(circle at 50% 15%, #241f15 0%, #0c0b10 50%, #050508 100%);
    --bg-card: rgba(24, 22, 30, 0.65);
    --bg-card-border: rgba(230, 202, 101, 0.35);
    --accent-glow: rgba(212, 175, 55, 0.5);
    --accent-primary: #e6ca65;
    --accent-secondary: #fbeea4;
    --accent-gradient: linear-gradient(135deg, #dfba48 0%, #ffe580 50%, #9e7514 100%);
    --envelope-body: #1c1a24;
    --envelope-flap: #272433;
    --envelope-lining: #342f45;
    --letter-bg: #fbf8ee;
    --letter-text: #231e13;
    --seal-color: #d4af37;
    --seal-glow: rgba(212, 175, 55, 0.65);
    --glass-shine: linear-gradient(135deg, rgba(255,235,160,0.45) 0%, rgba(212,175,55,0.1) 45%, transparent 80%);
}

/* 2. Rosy Romance */
body[data-theme="rosy-romance"] {
    --theme-name: 'Rosy Romance';
    --bg-primary: #0f050b;
    --bg-secondary: #220919;
    --bg-radial: radial-gradient(circle at 50% 20%, #3d102a 0%, #170410 55%, #080206 100%);
    --bg-card: rgba(45, 14, 32, 0.65);
    --bg-card-border: rgba(255, 130, 180, 0.4);
    --accent-glow: rgba(255, 94, 151, 0.55);
    --accent-primary: #ff5e97;
    --accent-secondary: #ffb8d2;
    --accent-gradient: linear-gradient(135deg, #ff4081 0%, #ff80ab 50%, #f50057 100%);
    --envelope-body: #3b1428;
    --envelope-flap: #4c1a34;
    --envelope-lining: #6b2649;
    --letter-bg: #fff0f5;
    --letter-text: #4a0e2e;
    --seal-color: #e91e63;
    --seal-glow: rgba(233, 30, 99, 0.7);
    --glass-shine: linear-gradient(135deg, rgba(255,200,225,0.5) 0%, rgba(255,94,151,0.15) 45%, transparent 80%);
}

/* 3. Moody Violet */
body[data-theme="moody-violet"] {
    --theme-name: 'Moody Violet';
    --bg-primary: #070311;
    --bg-secondary: #170b2e;
    --bg-radial: radial-gradient(circle at 50% 20%, #2f125a 0%, #110524 55%, #05020c 100%);
    --bg-card: rgba(35, 18, 64, 0.65);
    --bg-card-border: rgba(192, 132, 252, 0.4);
    --accent-glow: rgba(168, 85, 247, 0.55);
    --accent-primary: #a855f7;
    --accent-secondary: #d8b4fe;
    --accent-gradient: linear-gradient(135deg, #9333ea 0%, #c084fc 50%, #6b21a8 100%);
    --envelope-body: #251240;
    --envelope-flap: #321957;
    --envelope-lining: #4a277d;
    --letter-bg: #f8f0ff;
    --letter-text: #2a104e;
    --seal-color: #9333ea;
    --seal-glow: rgba(147, 51, 234, 0.7);
    --glass-shine: linear-gradient(135deg, rgba(230,200,255,0.5) 0%, rgba(168,85,247,0.15) 45%, transparent 80%);
}

/* 4. Chocolate & Mocha */
body[data-theme="chocolate-mocha"] {
    --theme-name: 'Chocolate & Mocha';
    --bg-primary: #0d0805;
    --bg-secondary: #221209;
    --bg-radial: radial-gradient(circle at 50% 20%, #3e1f0e 0%, #1a0b04 55%, #080302 100%);
    --bg-card: rgba(45, 26, 16, 0.65);
    --bg-card-border: rgba(245, 158, 11, 0.4);
    --accent-glow: rgba(217, 119, 6, 0.55);
    --accent-primary: #e08b3e;
    --accent-secondary: #fed7aa;
    --accent-gradient: linear-gradient(135deg, #b45309 0%, #f59e0b 50%, #78350f 100%);
    --envelope-body: #331f13;
    --envelope-flap: #442a1a;
    --envelope-lining: #5e3b24;
    --letter-bg: #fef7ed;
    --letter-text: #451a03;
    --seal-color: #b45309;
    --seal-glow: rgba(180, 83, 9, 0.7);
    --glass-shine: linear-gradient(135deg, rgba(255,230,195,0.45) 0%, rgba(224,139,62,0.15) 45%, transparent 80%);
}

/* 5. True Romance */
body[data-theme="true-romance"] {
    --theme-name: 'True Romance';
    --bg-primary: #0e0305;
    --bg-secondary: #24080e;
    --bg-radial: radial-gradient(circle at 50% 20%, #480c18 0%, #1a0408 55%, #090103 100%);
    --bg-card: rgba(52, 14, 22, 0.65);
    --bg-card-border: rgba(251, 113, 133, 0.4);
    --accent-glow: rgba(244, 63, 94, 0.55);
    --accent-primary: #f43f5e;
    --accent-secondary: #fecdd3;
    --accent-gradient: linear-gradient(135deg, #e11d48 0%, #fb7185 50%, #9f1239 100%);
    --envelope-body: #401019;
    --envelope-flap: #541622;
    --envelope-lining: #782132;
    --letter-bg: #fff1f2;
    --letter-text: #4c0519;
    --seal-color: #e11d48;
    --seal-glow: rgba(225, 29, 72, 0.7);
    --glass-shine: linear-gradient(135deg, rgba(255,205,215,0.5) 0%, rgba(244,63,94,0.15) 45%, transparent 80%);
}

/* 6. Pastel Dream */
body[data-theme="pastel-dream"] {
    --theme-name: 'Pastel Dream';
    --bg-primary: #060814;
    --bg-secondary: #121634;
    --bg-radial: radial-gradient(circle at 50% 20%, #273166 0%, #0d122b 55%, #04050d 100%);
    --bg-card: rgba(28, 36, 74, 0.65);
    --bg-card-border: rgba(167, 139, 250, 0.45);
    --accent-glow: rgba(129, 140, 248, 0.55);
    --accent-primary: #818cf8;
    --accent-secondary: #c7d2fe;
    --accent-gradient: linear-gradient(135deg, #60a5fa 0%, #c084fc 50%, #f472b6 100%);
    --envelope-body: #202b52;
    --envelope-flap: #2b396b;
    --envelope-lining: #3f5194;
    --letter-bg: #f0fdf4;
    --letter-text: #1e1b4b;
    --seal-color: #818cf8;
    --seal-glow: rgba(129, 140, 248, 0.7);
    --glass-shine: linear-gradient(135deg, rgba(220,235,255,0.5) 0%, rgba(192,132,252,0.15) 45%, transparent 80%);
}

/* 7. Golden Sunset */
body[data-theme="golden-sunset"] {
    --theme-name: 'Golden Sunset';
    --bg-primary: #0e0803;
    --bg-secondary: #251206;
    --bg-radial: radial-gradient(circle at 50% 20%, #461f06 0%, #1c0a02 55%, #080301 100%);
    --bg-card: rgba(52, 28, 14, 0.65);
    --bg-card-border: rgba(251, 146, 60, 0.45);
    --accent-glow: rgba(249, 115, 22, 0.55);
    --accent-primary: #f97316;
    --accent-secondary: #fed7aa;
    --accent-gradient: linear-gradient(135deg, #ea580c 0%, #facc15 50%, #c2410c 100%);
    --envelope-body: #3d2010;
    --envelope-flap: #502b16;
    --envelope-lining: #6f3d20;
    --letter-bg: #fffbeb;
    --letter-text: #431407;
    --seal-color: #ea580c;
    --seal-glow: rgba(234, 88, 12, 0.7);
    --glass-shine: linear-gradient(135deg, rgba(255,235,200,0.5) 0%, rgba(249,115,22,0.15) 45%, transparent 80%);
}

/* 8. Vintage Love */
body[data-theme="vintage-love"] {
    --theme-name: 'Vintage Love';
    --bg-primary: #0c0805;
    --bg-secondary: #1d120a;
    --bg-radial: radial-gradient(circle at 50% 20%, #3b2312 0%, #170d06 55%, #070301 100%);
    --bg-card: rgba(44, 30, 20, 0.65);
    --bg-card-border: rgba(217, 119, 6, 0.45);
    --accent-glow: rgba(180, 83, 9, 0.55);
    --accent-primary: #d97706;
    --accent-secondary: #fde68a;
    --accent-gradient: linear-gradient(135deg, #92400e 0%, #d97706 50%, #78350f 100%);
    --envelope-body: #2e2219;
    --envelope-flap: #3d2f23;
    --envelope-lining: #544131;
    --letter-bg: #fef3c7;
    --letter-text: #291c10;
    --seal-color: #92400e;
    --seal-glow: rgba(146, 64, 14, 0.7);
    --glass-shine: linear-gradient(135deg, rgba(255,240,200,0.45) 0%, rgba(217,119,6,0.15) 45%, transparent 80%);
}

/* 9. Cyber Glow */
body[data-theme="cyber-glow"] {
    --theme-name: 'Cyber Glow';
    --bg-primary: #02060d;
    --bg-secondary: #061220;
    --bg-radial: radial-gradient(circle at 50% 20%, #0d2c47 0%, #051424 55%, #010408 100%);
    --bg-card: rgba(14, 32, 56, 0.65);
    --bg-card-border: rgba(6, 182, 212, 0.55);
    --accent-glow: rgba(6, 182, 212, 0.65);
    --accent-primary: #06b6d4;
    --accent-secondary: #a5f3fc;
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #d946ef 100%);
    --envelope-body: #0d283e;
    --envelope-flap: #133857;
    --envelope-lining: #1c527e;
    --letter-bg: #ecfeff;
    --letter-text: #083344;
    --seal-color: #06b6d4;
    --seal-glow: rgba(6, 182, 212, 0.9);
    --glass-shine: linear-gradient(135deg, rgba(180,250,255,0.55) 0%, rgba(6,182,212,0.2) 45%, transparent 80%);
}

/* Global resets & mobile touch styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    background-image: var(--bg-radial);
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1), background-image 0.6s ease, color 0.5s ease;
    position: relative;
    touch-action: manipulation;
}

/* Canvas & Background Glow Engine */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.95;
}

.ambient-glow-top {
    position: fixed;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: min(900px, 100vw);
    height: 550px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0,0,0,0) 70%);
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
    transition: background 0.6s ease;
    filter: blur(90px);
}

.ambient-glow-bottom {
    position: fixed;
    bottom: -150px;
    right: 10%;
    width: min(700px, 90vw);
    height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0,0,0,0) 70%);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
    transition: background 0.6s ease;
    filter: blur(90px);
}

/* Typography styles */
.font-serif {
    font-family: 'Playfair Display', Georgia, serif;
}

.font-handwriting {
    font-family: 'Caveat', cursive;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   ULTRA-AESTHETIC SHINING FROSTED GLASS PANELS WITH 3D TILT
   ========================================================================== */

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid var(--bg-card-border);
    box-shadow:
        inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.35),
        inset 0 0 25px 0 rgba(255, 255, 255, 0.04),
        0 25px 50px -10px rgba(0, 0, 0, 0.75),
        0 0 35px var(--accent-glow);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.4, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

/* Holographic Specular Glint Sweep on Glass Cards */
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        115deg,
        transparent 0%,
        rgba(255, 255, 255, 0.03) 40%,
        rgba(255, 255, 255, 0.22) 50%,
        rgba(255, 255, 255, 0.03) 60%,
        transparent 100%
    );
    pointer-events: none;
    transition: transform 0.8s ease;
    z-index: 2;
}

.glass-panel:hover::before {
    transform: translateX(50%);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow:
        inset 0 2px 2px 0 rgba(255, 255, 255, 0.5),
        inset 0 0 30px 0 rgba(255, 255, 255, 0.08),
        0 30px 60px -10px rgba(0, 0, 0, 0.85),
        0 0 45px var(--accent-primary);
}

/* Shining Glow Buttons */
.glow-btn {
    background: var(--accent-gradient);
    box-shadow: 0 0 25px var(--accent-glow), inset 0 1px 1px rgba(255,255,255,0.6);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.glow-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(60deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: rotate(30deg);
    animation: shineSweep 4s infinite;
    pointer-events: none;
}

@keyframes shineSweep {
    0% { transform: translateX(-150%) rotate(30deg); }
    30%, 100% { transform: translateX(150%) rotate(30deg); }
}

.glow-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 35px var(--accent-primary), inset 0 1px 2px rgba(255,255,255,0.8);
}

.glow-btn:active {
    transform: translateY(1px) scale(0.97);
}

/* Swatch Buttons (Shining Glass Swatches with 3D Tilt) */
.theme-swatch {
    position: relative;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    user-select: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.2), 0 10px 25px rgba(0,0,0,0.5);
}

.theme-swatch:hover {
    transform: translateY(-5px) scale(1.04);
    border-color: var(--accent-primary);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.4), 0 15px 35px rgba(0,0,0,0.6), 0 0 25px var(--accent-glow);
}

.theme-swatch.active {
    transform: translateY(-6px) scale(1.05);
    box-shadow: inset 0 1.5px 2px rgba(255,255,255,0.6), 0 15px 35px rgba(0,0,0,0.7), 0 0 30px var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.12);
}

.theme-swatch.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-primary), 0 0 20px var(--accent-primary);
    animation: beaconPulse 1.8s infinite;
}

@keyframes beaconPulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
    50% { transform: translateX(-50%) scale(1.4); opacity: 0.7; }
}

/* Category Tab Pill */
.category-pill {
    transition: all 0.3s ease;
    user-select: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.category-pill.active {
    background: var(--accent-gradient);
    color: #0a0a0f;
    font-weight: 700;
    box-shadow: 0 0 25px var(--accent-glow), inset 0 1px 1px rgba(255,255,255,0.6);
}

/* ==========================================================================
   PHONE SIMULATOR COMPONENT (Liquid Glass Frame)
   ========================================================================== */

.phone-mockup {
    width: 100%;
    max-width: 380px;
    height: 740px;
    border-radius: 46px;
    background: #0d0e15;
    border: 9px solid #1e202e;
    box-shadow:
        inset 0 1px 2px rgba(255,255,255,0.2),
        0 25px 60px rgba(0, 0, 0, 0.9),
        0 0 50px var(--accent-glow);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
}

@media (max-width: 640px) {
    .phone-mockup {
        max-width: min(360px, 94vw);
        height: 680px;
        border-radius: 38px;
        border-width: 6px;
    }
}

.phone-island {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 24px;
    background: #000;
    border-radius: 20px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.phone-camera {
    width: 9px;
    height: 9px;
    background: #111d38;
    border-radius: 50%;
    border: 1px solid #1f3563;
}

.phone-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 36px;
    overflow-y: auto;
    overflow-x: hidden;
    background: radial-gradient(circle at 50% 20%, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
}

.phone-screen::-webkit-scrollbar {
    display: none;
}
.phone-screen {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Mini Audio Player */
.phone-audio-pill {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15);
    border-radius: 30px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
}

.wave-bars {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 12px;
}

.wave-bar {
    width: 2.5px;
    height: 100%;
    background-color: var(--accent-primary);
    border-radius: 2px;
    animation: waveBounce 0.8s ease-in-out infinite alternate;
}

.wave-bar:nth-child(2) { animation-delay: 0.2s; }
.wave-bar:nth-child(3) { animation-delay: 0.4s; }
.wave-bar:nth-child(4) { animation-delay: 0.1s; }

@keyframes waveBounce {
    0% { height: 3px; }
    100% { height: 12px; }
}

.paused .wave-bar {
    animation-play-state: paused;
    height: 4px;
}

/* ==========================================================================
   OCCASION INTERACTIVE COMPONENTS
   ========================================================================== */
.cake-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.cake-container:hover {
    transform: scale(1.04);
}

.candle-flame {
    animation: flameFlicker 1.2s infinite alternate ease-in-out;
    transform-origin: center bottom;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.candle-flame.blown {
    opacity: 0 !important;
    transform: scale(0.1) translateY(-10px) !important;
}

.candle-smoke {
    opacity: 0;
    transition: opacity 0.5s ease;
}
.candle-smoke.active {
    opacity: 0.8;
    animation: smokeRise 1.5s forwards ease-out;
}

@keyframes flameFlicker {
    0% { transform: scale(1) rotate(-2deg); filter: drop-shadow(0 0 6px #ffea00); }
    50% { transform: scale(1.1) rotate(2deg); filter: drop-shadow(0 0 10px #ff6d00); }
    100% { transform: scale(0.95) rotate(-1deg); filter: drop-shadow(0 0 8px #ffea00); }
}

@keyframes smokeRise {
    0% { transform: translateY(0) scale(0.5); opacity: 0.8; }
    100% { transform: translateY(-30px) scale(2); opacity: 0; }
}

.balloon-item {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}
.balloon-item:hover, .balloon-item:active {
    transform: translateY(-5px) scale(1.1);
}
.balloon-item.popped {
    opacity: 0;
    transform: scale(1.8) translateY(-20px);
    pointer-events: none;
}

.gift-box-interactive {
    cursor: pointer;
    transition: transform 0.3s ease;
}
.gift-box-interactive:hover, .gift-box-interactive:active {
    transform: scale(1.08);
}

.chocolate-box {
    position: relative;
    width: 140px;
    height: 120px;
    margin: 10px auto;
    cursor: pointer;
}
.choc-truffle {
    transition: all 0.3s ease;
    cursor: pointer;
}
.choc-truffle:hover, .choc-truffle:active {
    transform: scale(1.2);
}

.flip-card-3d {
    perspective: 1000px;
    cursor: pointer;
}
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 75px;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}
.flip-card-3d.flipped .flip-card-inner {
    transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
}
.flip-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), rgba(244, 63, 94, 0.08));
    border: 1px solid rgba(244, 63, 94, 0.4);
}

.cassette-spool {
    animation: rotateSpool 4s linear infinite;
}
.paused .cassette-spool {
    animation-play-state: paused;
}
@keyframes rotateSpool {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.photobooth-strip {
    background: #ffffff;
    padding: 8px;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    color: #1e293b;
}

.parchment-scroll {
    background: #fbf5e6;
    color: #291a0c;
    border: 2px solid #d4af37;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5), inset 0 0 15px rgba(180, 83, 9, 0.15);
}

.voice-wave-bar {
    width: 3px;
    background: var(--accent-primary);
    border-radius: 2px;
    animation: voiceBarPlay 0.7s ease-in-out infinite alternate;
}
.voice-wave-bar:nth-child(2) { animation-delay: 0.1s; height: 16px; }
.voice-wave-bar:nth-child(3) { animation-delay: 0.3s; height: 22px; }
.voice-wave-bar:nth-child(4) { animation-delay: 0.15s; height: 12px; }
.voice-wave-bar:nth-child(5) { animation-delay: 0.4s; height: 18px; }
.voice-wave-bar:nth-child(6) { animation-delay: 0.25s; height: 8px; }

@keyframes voiceBarPlay {
    0% { transform: scaleY(0.3); }
    100% { transform: scaleY(1); }
}

/* 3D Envelope Component (Responsive) */
.envelope-wrapper {
    position: relative;
    width: 270px;
    max-width: 90%;
    height: 170px;
    margin: 12px auto;
    cursor: pointer;
    perspective: 1000px;
}

@media (max-width: 400px) {
    .envelope-wrapper {
        width: 230px;
        height: 150px;
    }
}

.envelope-back {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--envelope-lining);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.letter-sheet {
    position: absolute;
    top: 10px;
    left: 15px;
    width: calc(100% - 30px);
    min-height: 140px;
    background: var(--letter-bg);
    color: var(--letter-text);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), z-index 0.8s;
    transform: translateY(0);
    overflow: hidden;
}

.envelope-wrapper.open .letter-sheet {
    transform: translateY(-85px) scale(1.03);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.envelope-pocket-left {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 135px solid var(--envelope-body);
    border-top: 85px solid transparent;
    border-bottom: 85px solid var(--envelope-body);
    border-radius: 0 0 0 12px;
    z-index: 4;
}

.envelope-pocket-right {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-right: 135px solid var(--envelope-body);
    border-top: 85px solid transparent;
    border-bottom: 85px solid var(--envelope-body);
    border-radius: 0 0 12px 0;
    z-index: 4;
}

.envelope-pocket-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 135px solid transparent;
    border-right: 135px solid transparent;
    border-bottom: 95px solid var(--envelope-flap);
    border-radius: 0 0 12px 12px;
    z-index: 5;
    opacity: 0.9;
}

.envelope-top-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 135px solid transparent;
    border-right: 135px solid transparent;
    border-top: 95px solid var(--envelope-flap);
    transform-origin: top;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 6;
    border-radius: 12px 12px 0 0;
}

@media (max-width: 400px) {
    .envelope-pocket-left {
        border-left-width: 115px;
        border-top-width: 75px;
        border-bottom-width: 75px;
    }
    .envelope-pocket-right {
        border-right-width: 115px;
        border-top-width: 75px;
        border-bottom-width: 75px;
    }
    .envelope-pocket-bottom {
        border-left-width: 115px;
        border-right-width: 115px;
        border-bottom-width: 85px;
    }
    .envelope-top-flap {
        border-left-width: 115px;
        border-right-width: 115px;
        border-top-width: 85px;
    }
}

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

.envelope-wax-seal {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 42px;
    background: var(--seal-color);
    border-radius: 50%;
    box-shadow: 0 4px 15px var(--seal-glow), inset 0 2px 5px rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    z-index: 7;
    transition: transform 0.4s ease, opacity 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.envelope-wrapper.open .envelope-wax-seal {
    opacity: 0;
    transform: translateX(-50%) scale(0.5);
    pointer-events: none;
}

/* Scratch Card (Responsive) */
.scratch-card-container {
    position: relative;
    width: 100%;
    max-width: 290px;
    height: 120px;
    border-radius: 14px;
    overflow: hidden;
    margin: 12px auto;
    border: 1px solid var(--bg-card-border);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.scratch-secret-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
    z-index: 1;
}

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

/* Polaroids & Video */
.polaroid-card {
    background: #fff;
    color: #1e293b;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    padding: 8px 8px 16px 8px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
.polaroid-card:hover {
    transform: scale(1.05) rotate(0deg) !important;
    z-index: 10;
}

.video-mockup-card {
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--bg-card-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-primary);
    color: #fff;
    transition: all 0.3s ease;
}

.video-mockup-card:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
    background: var(--accent-primary);
    color: #000;
}

/* Confetti Canvas */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}
