/* ============================================================
   LUMINOUS EMERALD GREEN DESIGN SYSTEM
   ============================================================ */
:root {
    --bg-dark: #021810;
    --card-bg: rgba(4, 34, 23, 0.78);
    --primary: #059669;
    --primary-dark: #04724d;
    --primary-light: #10b981;
    --primary-mint: #34d399;
    --primary-glow: rgba(16, 185, 129, 0.35);
    
    --accent-gold: #f3dd97;
    --accent-gold-soft: #fbf5df;
    
    --text-main: #f0fdf4;
    --text-muted: #8ec5b0;
    --glass-border: rgba(16, 185, 129, 0.24);
    --glass-shine: rgba(255, 255, 255, 0.05);

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    --font-handwritten: 'Dancing Script', cursive;

    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

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

/* Utilities */
.hidden {
    display: none !important;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.55), inset 0 1px 0 var(--glass-shine);
}

/* Custom SVG Star Elements */
.star-svg-inline {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    color: var(--accent-gold);
    margin-left: 6px;
    filter: drop-shadow(0 0 6px rgba(243, 221, 151, 0.5));
}

.star-svg-cover {
    width: 48px;
    height: 48px;
    color: var(--accent-gold);
    margin-bottom: 18px;
    filter: drop-shadow(0 0 16px rgba(243, 221, 151, 0.6));
}

.star-svg-tiny {
    width: 14px;
    height: 14px;
    color: var(--accent-gold);
}

.star-svg-hero {
    width: 48px;
    height: 48px;
    color: var(--accent-gold);
    filter: drop-shadow(0 0 20px rgba(243, 221, 151, 0.65));
}

.star-pulse {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    animation: starGlow 2.6s ease-in-out infinite alternate;
}

@keyframes starGlow {
    0% { transform: scale(0.95); opacity: 0.85; filter: drop-shadow(0 0 10px rgba(243, 221, 151, 0.4)); }
    100% { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 0 24px rgba(243, 221, 151, 0.8)); }
}

/* Floating Music Player Button */
.music-toggle-btn {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 100;
    background: rgba(4, 38, 26, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.music-toggle-btn:hover {
    background: rgba(6, 52, 36, 0.9);
    border-color: var(--primary-mint);
    box-shadow: 0 0 15px var(--primary-glow);
}

.music-toggle-btn svg {
    width: 18px;
    height: 18px;
    color: var(--accent-gold);
}

.sound-wave {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
}

.sound-wave span {
    width: 2.5px;
    background: var(--primary-mint);
    border-radius: 2px;
    animation: wave 1.2s ease-in-out infinite alternate;
}

.sound-wave span:nth-child(1) { height: 50%; animation-delay: 0.1s; }
.sound-wave span:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.sound-wave span:nth-child(3) { height: 40%; animation-delay: 0.5s; }

.music-toggle-btn.paused .sound-wave span {
    animation: none;
    height: 25%;
    opacity: 0.4;
}

@keyframes wave {
    0% { height: 20%; }
    100% { height: 100%; }
}

/* ============================================================
   ENVELOPE SCREEN
   ============================================================ */
.envelope-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #083c2a 0%, #021810 100%);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.envelope-screen.opened-fade {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.06);
}

.envelope-wrapper {
    text-align: center;
}

.envelope {
    position: relative;
    width: 320px;
    height: 220px;
    background: #094732;
    border-radius: 8px;
    margin: 0 auto 28px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), 0 0 30px rgba(16, 185, 129, 0.18);
    cursor: pointer;
    perspective: 1000px;
}

.envelope-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #063726;
    border-radius: 8px;
}

.envelope-letter-preview {
    position: absolute;
    bottom: 10px;
    left: 15px;
    width: 290px;
    height: 190px;
    background: #fbfdfc;
    border-radius: 6px;
    padding: 22px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: transform 0.6s ease;
}

.handwritten-preview {
    font-family: var(--font-handwritten);
    font-size: 1.8rem;
    color: var(--primary-dark);
}

.envelope-front {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 160px solid #0c523a;
    border-right: 160px solid #0c523a;
    border-bottom: 110px solid #08422e;
    border-top: 110px solid transparent;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 3;
}

.envelope-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 160px solid transparent;
    border-right: 160px solid transparent;
    border-top: 115px solid #0e5e43;
    transform-origin: top;
    transition: transform 0.6s ease;
    z-index: 4;
}

.wax-seal {
    position: absolute;
    top: 98px;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 64px;
    background: radial-gradient(circle, #084a33 0%, #03261a 100%);
    border: 1.5px solid rgba(243, 221, 151, 0.5);
    border-radius: 50%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), inset 0 1px 3px rgba(243, 221, 151, 0.35);
    transition: transform 0.3s ease;
}

.wax-seal:hover {
    transform: translateX(-50%) scale(1.08);
}

.seal-star {
    display: flex;
    justify-content: center;
    align-items: center;
}

.star-svg-seal {
    width: 24px;
    height: 24px;
    color: var(--accent-gold);
    filter: drop-shadow(0 0 6px rgba(243, 221, 151, 0.6));
}

.seal-text {
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--accent-gold-soft);
    margin-top: 2px;
}

.tap-hint {
    color: var(--text-muted);
    font-size: 0.95rem;
    letter-spacing: 0.8px;
    animation: pulseHint 2.4s infinite;
}

@keyframes pulseHint {
    0%, 100% { opacity: 0.6; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-3px); }
}

/* Opened Envelope Animation */
.envelope.opening .envelope-top {
    transform: rotateX(180deg);
    z-index: 1;
}

.envelope.opening .envelope-letter-preview {
    transform: translateY(-80px);
    z-index: 2;
}

/* ============================================================
   SLIDE PAGES & SWITCHER
   ============================================================ */
.main-content {
    position: relative;
    z-index: 10;
    max-width: 860px;
    margin: 0 auto;
    padding: 30px 20px 80px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slide-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(52, 211, 153, 0.25);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-dot:hover {
    background: rgba(16, 185, 129, 0.5);
    transform: scale(1.2);
}

.nav-dot.active {
    background: var(--primary-light);
    width: 28px;
    border-radius: 14px;
    box-shadow: 0 0 12px var(--primary-glow);
}

.slides-wrapper {
    position: relative;
    width: 100%;
    min-height: 540px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-page {
    position: absolute;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px) scale(0.97);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-page.active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.slide-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.margin-top-md {
    margin-top: 22px;
}

.margin-top-lg {
    margin-top: 30px;
}

/* Page Switch Bottom Navigation */
.page-controls {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    background: rgba(4, 34, 23, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 6px 16px;
    border-radius: 40px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.nav-control-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    transition: var(--transition-smooth);
}

.nav-control-btn svg {
    width: 16px;
    height: 16px;
}

.nav-control-btn:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.22);
    color: #fff;
}

.nav-control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero-section {
    text-align: center;
    padding-top: 10px;
}

.sparkle-badge {
    display: inline-block;
    padding: 5px 16px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 24px;
    color: var(--primary-mint);
    font-weight: 500;
    font-size: 0.88rem;
    letter-spacing: 1px;
    margin-bottom: 18px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 14px;
    line-height: 1.25;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.highlight-name {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-soft) 40%, var(--primary-mint) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.12rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    font-weight: 300;
}

/* ============================================================
   3D CARD (CLEAN TWO-FACE FLIP - NO OVERLAPPING)
   ============================================================ */
.card-section {
    display: flex;
    justify-content: center;
}

.card-container {
    width: 100%;
    max-width: 480px;
    height: 560px;
    perspective: 1500px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.18, 0.85, 0.32, 1.15);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Front Cover Face (Closed State) */
.card-front {
    background: linear-gradient(150deg, #053322 0%, #084831 60%, #042a1c 100%);
    border: 1px solid rgba(52, 211, 153, 0.3);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), inset 0 0 25px rgba(16, 185, 129, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 38px;
    transform: rotateY(0deg);
}

.card-front-content h2 {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    color: var(--accent-gold);
    margin-bottom: 8px;
    font-weight: 500;
}

.click-instruction {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Back Face / Letter (Revealed when opened) */
.card-container.is-open .card-inner {
    transform: rotateY(-180deg);
}

.card-back {
    transform: rotateY(180deg);
    background: #fbfdfc;
    color: #0f2c1f;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65);
    padding: 30px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
}

.sweet-quote {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #04724d;
    background: rgba(4, 114, 77, 0.06);
    border-left: 3px solid #059669;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.quote-author {
    display: block;
    font-size: 0.78rem;
    color: #058c42;
    margin-top: 3px;
    font-style: normal;
    font-weight: 500;
}

.letter-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px 0;
}

.letter-body h3 {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    color: #04724d;
    margin-bottom: 6px;
    font-weight: 600;
}

.letter-body p {
    font-size: 0.92rem;
    line-height: 1.55;
    color: #1a382b;
    margin-bottom: 6px;
}

.letter-closing {
    margin-top: 6px !important;
    font-weight: 500;
    color: #0f2c1f;
}

.handwritten-signature {
    font-family: var(--font-handwritten);
    font-size: 1.7rem;
    color: #04724d;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.see-gift-btn {
    margin-top: 12px;
    background: linear-gradient(135deg, #059669 0%, #04724d 100%);
    color: #fff;
    border: none;
    padding: 9px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.35);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.see-gift-btn svg {
    width: 15px;
    height: 15px;
}

.see-gift-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* ============================================================
   CAKE & CANDLE SECTION
   ============================================================ */
.cake-card {
    text-align: center;
    padding: 44px 30px;
    max-width: 580px;
    margin: 0 auto;
}

.cake-card h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 6px;
    color: var(--text-main);
}

.cake-card p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.98rem;
}

.cake-container {
    position: relative;
    width: 250px;
    height: 195px;
    margin: 10px auto 35px;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5));
}

/* Realistic Porcelain Cake Plate */
.plate-shadow {
    position: absolute;
    bottom: -6px;
    left: -15px;
    width: 280px;
    height: 14px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 75%);
    border-radius: 50%;
}

.plate {
    position: absolute;
    bottom: 0;
    left: -15px;
    width: 280px;
    height: 16px;
    background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 55%, #94a3b8 100%);
    border-radius: 20px;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.6),
        inset 0 2px 2px rgba(255, 255, 255, 0.9),
        inset 0 -2px 3px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.plate-inner {
    width: 90%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    border-radius: 4px;
}

/* Cake Layers: Ultra-rich Cocoa Sponge & Creamy Fudge Ganache */
.layer {
    position: absolute;
    left: 20px;
    width: 210px;
    border-radius: 6px;
    box-shadow: 
        inset 0 4px 6px rgba(255, 255, 255, 0.12),
        inset 0 -4px 8px rgba(0, 0, 0, 0.6),
        0 4px 10px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

/* Moist dark chocolate sponge texture */
.layer::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image: radial-gradient(#1a0a03 1px, transparent 1px), radial-gradient(#ffe0b2 1px, transparent 1px);
    background-size: 6px 6px;
    background-position: 0 0, 3px 3px;
    pointer-events: none;
}

/* Creamy Chocolate Fudge / Mousse Filling line */
.frosting-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 7px;
    background: linear-gradient(180deg, #6c3b1b 0%, #4a240e 70%, #2f1406 100%);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.25);
    border-radius: 2px;
}

.layer-bottom {
    bottom: 14px;
    height: 44px;
    background: linear-gradient(180deg, #3d1c0b 0%, #261106 60%, #1c0b03 100%);
}

.layer-middle {
    bottom: 56px;
    height: 44px;
    background: linear-gradient(180deg, #45210e 0%, #2d1408 60%, #1f0c04 100%);
}

.layer-top {
    bottom: 98px;
    height: 42px;
    background: linear-gradient(180deg, #4d2611 0%, #351709 60%, #240e04 100%);
}

/* Top Ganache Glaze - Glossy, silky, mirror glaze effect */
.icing {
    position: absolute;
    bottom: 136px;
    left: 17px;
    width: 216px;
    height: 20px;
    background: linear-gradient(180deg, #5a2e14 0%, #3e1e0d 60%, #2a1207 100%);
    border-radius: 12px 12px 4px 4px;
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.5),
        inset 0 4px 4px rgba(255, 255, 255, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.4);
    z-index: 3;
}

.glaze-gloss {
    position: absolute;
    top: 2px;
    left: 12px;
    right: 12px;
    height: 5px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.55) 40%, rgba(255,255,255,0.65) 60%, rgba(255,255,255,0.08) 100%);
    border-radius: 10px;
    filter: blur(0.5px);
}

/* Rich, dripping chocolate ganache */
.drips {
    position: absolute;
    bottom: 114px;
    left: 20px;
    width: 210px;
    height: 26px;
    z-index: 4;
    pointer-events: none;
}

.drip {
    position: absolute;
    top: 0;
    width: 16px;
    background: linear-gradient(180deg, #3e1e0d 0%, #291206 80%, #1c0a03 100%);
    border-radius: 0 0 10px 10px;
    box-shadow: 
        inset 1px 0 2px rgba(255, 255, 255, 0.25),
        inset -1px 0 2px rgba(0, 0, 0, 0.5),
        0 4px 6px rgba(0, 0, 0, 0.4);
}

/* Individual chocolate drips of varying realistic lengths */
.drip-1 { left: 10px; height: 18px; width: 14px; border-radius: 0 0 8px 8px; }
.drip-2 { left: 38px; height: 26px; width: 16px; border-radius: 0 0 10px 10px; }
.drip-3 { left: 72px; height: 16px; width: 13px; border-radius: 0 0 7px 7px; }
.drip-4 { left: 104px; height: 24px; width: 17px; border-radius: 0 0 10px 10px; }
.drip-5 { left: 138px; height: 19px; width: 15px; border-radius: 0 0 9px 9px; }
.drip-6 { left: 168px; height: 25px; width: 15px; border-radius: 0 0 9px 9px; }
.drip-7 { left: 192px; height: 14px; width: 12px; border-radius: 0 0 7px 7px; }

/* Drip highlights */
.drip::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 20%;
    width: 60%;
    height: 4px;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 80%);
    border-radius: 50%;
}

/* Cake Toppings: Strawberries & Chocolate Shavings/Curls */
.cake-toppings {
    position: absolute;
    bottom: 148px;
    left: 20px;
    width: 210px;
    height: 30px;
    z-index: 5;
    pointer-events: none;
}

/* Sweet ripe strawberry */
.strawberry {
    position: absolute;
    width: 18px;
    height: 22px;
    background: radial-gradient(circle at 35% 35%, #ff4d6d 0%, #d90429 55%, #7a0016 100%);
    border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.45);
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

.strawberry::before {
    content: '';
    position: absolute;
    inset: 2px;
    opacity: 0.35;
    background-image: radial-gradient(#fff 1px, transparent 1px);
    background-size: 4px 4px;
    border-radius: inherit;
}

.berry-leaf {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 6px;
    background: #2d6a4f;
    border-radius: 50%;
    box-shadow: -3px -1px 0 #40916c, 3px -1px 0 #1b4332;
}

.strawberry-left {
    left: 36px;
    bottom: 0px;
    transform: rotate(-14deg);
}

.strawberry-right {
    right: 40px;
    bottom: 0px;
    transform: rotate(18deg);
}

/* Rolled dark chocolate curls */
.choco-curl {
    position: absolute;
    width: 24px;
    height: 10px;
    border: 3px solid #230d04;
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 2px 2px rgba(255,255,255,0.2);
}

.curl-1 {
    left: 68px;
    bottom: 2px;
    transform: rotate(-8deg);
}

.curl-2 {
    right: 70px;
    bottom: 4px;
    transform: rotate(12deg);
}

/* Realistic Birthday Candle */
.candle {
    position: absolute;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    width: 13px;
    height: 52px;
    /* Elegant gold-striped artisan birthday candle */
    background: repeating-linear-gradient(
        45deg,
        #fffdf7,
        #fffdf7 7px,
        #d4af37 7px,
        #d4af37 13px,
        #b8860b 13px,
        #b8860b 14px
    );
    border-radius: 4px 4px 2px 2px;
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.4),
        inset -2px 0 4px rgba(0, 0, 0, 0.25),
        inset 2px 0 4px rgba(255, 255, 255, 0.7);
    z-index: 6;
}

.candle-wick {
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: #1e1e1e;
    border-radius: 1px;
}

/* Candle flame with realistic core, aura and flicker */
.flame {
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 26px;
    background: radial-gradient(ellipse at 50% 70%, #ff5722 0%, #ff9800 45%, #ffeb3b 85%);
    border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
    box-shadow: 
        0 0 15px rgba(255, 152, 0, 0.9),
        0 0 35px rgba(255, 87, 34, 0.6),
        0 0 60px rgba(255, 193, 7, 0.4);
    animation: realisticFlicker 1s infinite ease-in-out alternate;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s ease;
    transform-origin: bottom center;
}

.flame-inner {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 7px;
    height: 12px;
    background: radial-gradient(ellipse at 50% 50%, #ffffff 20%, #64b5f6 80%, #1976d2 100%);
    border-radius: 50%;
    opacity: 0.95;
}

.flame-glow {
    position: absolute;
    top: -15px;
    left: -20px;
    width: 56px;
    height: 56px;
    background: radial-gradient(circle, rgba(255, 183, 77, 0.25) 0%, rgba(255, 183, 77, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: auraPulse 1.8s infinite alternate;
}

@keyframes realisticFlicker {
    0% {
        transform: translateX(-50%) scale(1) rotate(-1.5deg);
        filter: brightness(1);
    }
    30% {
        transform: translateX(-50%) scale(1.05, 0.96) rotate(1deg);
        filter: brightness(1.1);
    }
    60% {
        transform: translateX(-50%) scale(0.97, 1.04) rotate(-1deg);
        filter: brightness(0.95);
    }
    100% {
        transform: translateX(-50%) scale(1.06, 1.02) rotate(2deg);
        filter: brightness(1.15);
    }
}

@keyframes auraPulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.15); opacity: 1; }
}

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

/* Wispy smoke puff when candle is blown out */
.smoke {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: rgba(220, 220, 220, 0.6);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.candle.blown-out .smoke {
    animation: smokeDrift 1.8s ease-out forwards;
}

@keyframes smokeDrift {
    0% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateX(-80%) scale(2.5) translateY(-25px);
        filter: blur(2px);
    }
    100% {
        opacity: 0;
        transform: translateX(-120%) scale(4) translateY(-55px);
        filter: blur(4px);
    }
}

.glow-btn {
    background: linear-gradient(135deg, #059669 0%, #04724d 100%);
    color: #fff;
    border: 1px solid rgba(52, 211, 153, 0.35);
    padding: 12px 28px;
    font-size: 0.98rem;
    font-weight: 500;
    border-radius: 40px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
    transition: var(--transition-smooth);
}

.glow-btn svg {
    width: 18px;
    height: 18px;
}

.glow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}

.wish-message {
    margin-top: 22px;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--accent-gold);
    animation: fadeIn 0.5s ease;
}

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

/* ============================================================
   TIMELINE SECTION
   ============================================================ */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 6px;
    color: var(--text-main);
    font-weight: 500;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 0.98rem;
}

.timeline {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    padding: 16px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1.5px;
    background: linear-gradient(to bottom, transparent, var(--primary), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 34px;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 32px;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 32px;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    top: 18px;
    width: 32px;
    height: 32px;
    background: #021a12;
    border: 1.5px solid var(--primary-mint);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -16px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -16px;
}

.timeline-content {
    padding: 22px;
}

.timeline-date {
    display: inline-block;
    color: var(--primary-mint);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 6px;
    font-weight: 500;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ============================================================
   POLAROID GALLERY
   ============================================================ */
.polaroid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 28px;
    margin: 24px auto 0;
    max-width: 780px;
    width: 100%;
}

.polaroid {
    background: #fbfdfc;
    padding: 12px 12px 20px;
    border-radius: 6px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(16, 185, 129, 0.15);
    cursor: pointer;
    transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.45s ease;
    transform: rotate(calc(var(--rotation, 0) * 1deg)) translateY(0);
    animation: polaroidEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: calc(var(--delay, 0) * 0.1s);
    position: relative;
    will-change: transform, box-shadow;
}

.polaroid:nth-child(1) { --rotation: -2.5; --delay: 1; }
.polaroid:nth-child(2) { --rotation: 2.2; --delay: 2; }
.polaroid:nth-child(3) { --rotation: -1.8; --delay: 3; }
.polaroid:nth-child(4) { --rotation: 2.5; --delay: 4; }
.polaroid:nth-child(5) { --rotation: -2; --delay: 5; }
.polaroid:nth-child(6) { --rotation: 1.5; --delay: 6; }

@keyframes polaroidEntrance {
    0% {
        opacity: 0;
        transform: translateY(28px) scale(0.92) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: rotate(calc(var(--rotation, 0) * 1deg)) translateY(0) scale(1);
    }
}

.polaroid:hover {
    transform: scale(1.08) rotate(0deg) translateY(-8px);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.65), 0 0 20px rgba(52, 211, 153, 0.35);
    border-color: rgba(52, 211, 153, 0.4);
    z-index: 10;
}

.polaroid-img-wrapper {
    width: 100%;
    height: 195px;
    overflow: hidden;
    border-radius: 4px;
    background: #e1ede6;
    position: relative;
}

/* Subtle gloss shine overlay on photo */
.polaroid-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
    transition: left 0.75s ease;
    pointer-events: none;
}

.polaroid:hover .polaroid-img-wrapper::after {
    left: 140%;
}

.polaroid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.polaroid:hover .polaroid-img {
    transform: scale(1.06);
    filter: brightness(1.03) contrast(1.02);
}

.polaroid-caption {
    font-family: var(--font-handwritten);
    color: #0d281e;
    font-size: 1.3rem;
    text-align: center;
    margin-top: 14px;
    letter-spacing: 0.5px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.polaroid:hover .polaroid-caption {
    color: #04724d;
    transform: translateY(1px);
}

/* ============================================================
   FINAL NOTE
   ============================================================ */
.note-card {
    text-align: center;
    padding: 44px 30px;
    max-width: 540px;
    margin: 0 auto;
}

.note-card h2 {
    font-family: var(--font-heading);
    font-size: 1.95rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.note-text {
    font-size: 1.12rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 22px;
    font-weight: 300;
}

/* Lightbox Modal with Butter-Smooth Fade and Spring Zoom */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 24, 16, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 200;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
}

.lightbox.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: flex !important; /* overrides utility hidden to let transition run */
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    color: #e2e8f0;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox-close:hover {
    color: var(--primary-mint);
    transform: scale(1.15) rotate(90deg);
}

#lightbox-img {
    max-width: 88%;
    max-height: 72vh;
    border-radius: 12px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(16, 185, 129, 0.25);
    border: 3px solid #fbfdfc;
    transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(1);
    animation: zoomLightbox 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomLightbox {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(15px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.lightbox-caption {
    font-family: var(--font-handwritten);
    font-size: 1.95rem;
    color: var(--accent-gold);
    margin-top: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.5s ease 0.15s backwards;
}

/* ============================================================
   VIDEO MEMORY SECTION
   ============================================================ */
.video-card {
    padding: 32px 34px 28px;
    text-align: center;
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
}

.video-container {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.65), 0 0 25px rgba(16, 185, 129, 0.2);
    aspect-ratio: 16 / 9;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 16px;
    cursor: pointer;
}

/* Big Play Overlay Button */
.video-big-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 68px;
    height: 68px;
    background: radial-gradient(circle, #059669 0%, #032b1d 100%);
    border: 1.5px solid rgba(52, 211, 153, 0.45);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 28px rgba(16, 185, 129, 0.45);
    transition: var(--transition-smooth);
    z-index: 5;
}

.video-big-play-btn svg {
    width: 28px;
    height: 28px;
    margin-left: 3px;
    color: #fff;
}

.video-big-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 38px rgba(52, 211, 153, 0.7);
}

.video-container.playing .video-big-play-btn {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.8);
}

/* Custom Video Controls Overlay */
.custom-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(to top, rgba(2, 24, 16, 0.95) 0%, rgba(2, 24, 16, 0.4) 70%, transparent 100%);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 6;
    transition: opacity 0.3s ease;
}

.v-control-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.v-control-btn svg {
    width: 18px;
    height: 18px;
}

.v-control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--primary-mint);
}

.video-time-display {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    min-width: 80px;
    white-space: nowrap;
}

.video-progress-container {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: height 0.2s ease;
}

.video-progress-container:hover {
    height: 7px;
}

.video-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--primary-mint), var(--primary));
    border-radius: 8px;
    box-shadow: 0 0 8px var(--primary-light);
    transition: width 0.1s linear;
}

.video-caption {
    font-family: var(--font-handwritten);
    font-size: 1.4rem;
    color: var(--accent-gold);
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Responsive Scaling */
@media (max-width: 768px) {
    .hero-title { font-size: 2.3rem; }
    .timeline::before { left: 16px; }
    .timeline-item { width: 100%; padding-left: 50px !important; text-align: left !important; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-dot { left: 0 !important; }
    .card-container { height: 530px; }
    .card-back { padding: 22px 18px; }
    .sweet-quote { font-size: 0.88rem; }
    .letter-body h3 { font-size: 1.35rem; }
    .letter-body p { font-size: 0.86rem; }
    .video-card { padding: 18px 14px 14px; }
}
