﻿/* ===== CSS VARIABLES & RESET ===== */
:root {
    --pink: #f472b6;
    --soft-pink: #fda4af;
    --purple: #a855f7;
    --deep-purple: #7c3aed;
    --lavender: #ddd6fe;
    --cream: #fff1f2;
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.25);
    --shadow: 0 8px 32px rgba(168, 85, 247, 0.18);
    --text-light: rgba(255, 255, 255, 0.92);
    --grad: linear-gradient(135deg, #ff6b9d 0%, #c44dff 50%, #8b5cf6 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1a0533 0%, #2d0a5e 40%, #4a0e8f 70%, #1a0533 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-light);
}

/* ===== FLOATING HEARTS BACKGROUND ===== */
#hearts-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ===== MUSIC BUTTON ===== */
#music-btn {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(244, 114, 182, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    color: white;
}

#music-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 30px rgba(244, 114, 182, 0.5);
}

#music-btn.muted {
    opacity: 0.5;
}

/* ===== MAIN CONTAINER ===== */
#main-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Let the direct flex child absorb vertical space safely to center content */
#main-container>div {
    margin: auto 0;
    width: 100%;
}

/* ===== PAGES ===== */
.page {
    display: none;
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    transition: opacity 0.7s ease, transform 0.7s ease;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.page.active {
    display: block;
    animation: pageIn 0.7s ease forwards;
}

.page.exit {
    animation: pageOut 0.4s ease forwards;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pageOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

/* ===== GLASS CARD ===== */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 28px;
    padding: 36px 32px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-align: center;
    position: relative;
    overflow: hidden;
}



.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 60% 40%, rgba(244, 114, 182, 0.07) 0%, transparent 60%);
    pointer-events: none;
}

/* ===== TYPOGRAPHY ===== */
h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    margin-bottom: 12px;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    color: var(--lavender);
    margin-bottom: 10px;
}

p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    font-size: 0.97rem;
}

.italic-quote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--soft-pink);
    margin: 12px 0;
}

/* ===== TIMER ===== */
#time-elapsed {
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.08);
    padding: 16px 20px;
    border-radius: 18px;
    color: var(--soft-pink);
    font-weight: bold;
    margin: 20px 0;
    font-size: 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    letter-spacing: 1px;
}

/* ===== COUNTDOWN ===== */
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.count-box {
    background: rgba(168, 85, 247, 0.18);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 16px;
    padding: 12px 8px;
}

.count-box .num {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.count-box .label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== BUTTONS ===== */
.btn {
    background: var(--grad);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    margin-top: 16px;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.35);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.2s;
}

.btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.5);
}

.btn:hover::after {
    background: rgba(255, 255, 255, 0.08);
}

.btn:active {
    transform: scale(0.97);
}

/* ===== GIFT EMOJI ===== */
.gift {
    font-size: 90px;
    cursor: pointer;
    display: block;
    margin: 20px auto;
    transition: transform 0.3s;
    filter: drop-shadow(0 8px 20px rgba(244, 114, 182, 0.5));
}

.gift:hover {
    transform: scale(1.15) rotate(5deg);
}

/* ===== TYPING ANIMATION ===== */
.typed-text::after {
    content: '|';
    animation: blink 0.8s step-end infinite;
    color: var(--pink);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ===== WHY YOU'RE SPECIAL ===== */
.special-list {
    list-style: none;
    text-align: left;
    margin: 18px 0;
}

.special-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    line-height: 1.5;
    transition: background 0.3s, transform 0.3s;
}

.special-list li:hover {
    background: rgba(244, 114, 182, 0.12);
    transform: translateX(4px);
}

.special-list li .icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ===== SLIDESHOW / GALLERY ===== */
.slideshow-wrap {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4/3;
    margin: 20px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 0 2px var(--glass-border);
    cursor: grab;
    user-select: none;
}

.slideshow-wrap:active {
    cursor: grabbing;
}

/* Individual slide */
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(26, 5, 51, 0.9), rgba(74, 14, 143, 0.85));
    overflow: hidden;
}

.slide.current {
    opacity: 1;
}

/* Photo fills the slide */
.slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    transition: transform 8s ease;
}

.slide.current img {
    transform: scale(1.05);
}

/* Emoji fallback (shown when image fails) */
.slide-emoji {
    display: none;
    font-size: 5rem;
    z-index: 2;
    align-items: center;
    justify-content: center;
    animation: floatEmoji 3s ease-in-out infinite;
}

@keyframes floatEmoji {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-12px) scale(1.08);
    }
}

/* Caption bar */
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
    padding: 24px 16px 12px;
    font-size: 0.85rem;
    color: white;
    font-style: italic;
    letter-spacing: 0.3px;
}

/* Prev / Next arrow buttons */
.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s, transform 0.25s, opacity 0.25s;
    opacity: 0.7;
    line-height: 1;
    padding: 0;
}

.slide-arrow:hover {
    background: rgba(244, 114, 182, 0.35);
    opacity: 1;
    transform: translateY(-50%) scale(1.12);
}

.slide-prev {
    left: 10px;
}

.slide-next {
    right: 10px;
}

/* Slide counter (e.g. "2 / 5") */
.slide-counter {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-top: 6px;
    letter-spacing: 1px;
}

/* Dot navigation */
.slideshow-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s, width 0.3s;
}

.dot.active {
    background: var(--pink);
    transform: scale(1.25);
    width: 22px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(244, 114, 182, 0.6);
}

/* ===== GLOWING CLICK EFFECTS ===== */
.spark {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    animation: sparkFly 0.8s ease-out forwards;
    font-size: 22px;
}

@keyframes sparkFly {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--sx), var(--sy)) scale(0);
        opacity: 0;
    }
}

.heart-click {
    position: fixed;
    pointer-events: none;
    z-index: 9997;
    font-size: 28px;
    animation: heartPop 0.6s ease-out forwards;
}

@keyframes heartPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }

    60% {
        transform: translate(-50%, -80%) scale(1.4);
        opacity: 0.9;
    }

    100% {
        transform: translate(-50%, -120%) scale(0.6);
        opacity: 0;
    }
}

/* ===== FINAL MESSAGE ===== */
.final-msg {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.12), rgba(168, 85, 247, 0.12));
    border: 1px solid rgba(244, 114, 182, 0.25);
    border-radius: 20px;
    padding: 22px;
    margin: 18px 0;
    line-height: 1.8;
    font-size: 0.93rem;
}

.final-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.5rem;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 14px;
}

/* ===== SURPRISE POPUP ===== */
#surprise-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 1, 25, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

#surprise-overlay.show {
    display: flex;
    animation: overlayIn 0.4s ease;
}

@keyframes overlayIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#surprise-box {
    background: linear-gradient(135deg, rgba(30, 5, 60, 0.95), rgba(60, 10, 100, 0.95));
    border: 1px solid rgba(244, 114, 182, 0.4);
    border-radius: 30px;
    padding: 44px 36px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 60px rgba(244, 114, 182, 0.3), 0 0 120px rgba(168, 85, 247, 0.2);
    animation: surpriseIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes surpriseIn {
    from {
        transform: scale(0.4) rotate(-5deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

#surprise-box .big-emoji {
    font-size: 60px;
    margin-bottom: 14px;
    animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

#surprise-box h2 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.6rem;
    margin-bottom: 14px;
    color: var(--soft-pink);
}

#surprise-box p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

#surprise-close {
    background: var(--grad);
    border: none;
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(244, 114, 182, 0.4);
    transition: transform 0.2s;
}

#surprise-close:hover {
    transform: scale(1.05);
}

/* ===== BEER ANIMATION ===== */
.beer {
    font-size: 100px;
    animation: drink 1.5s infinite alternate;
    display: block;
    margin: 10px auto;
}

@keyframes drink {
    0% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(-20deg) translateY(-15px);
    }
}

/* ===== STICKER ===== */
.sticker {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 85px;
    z-index: 100;
    animation: floatSticker 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatSticker {

    0%,
    100% {
        transform: translateY(0) rotate(5deg);
    }

    50% {
        transform: translateY(-15px) rotate(-5deg);
    }
}





/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .glass-card {
        padding: 24px 18px;
    }

    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .count-box .num {
        font-size: 1.5rem;
    }

    #surprise-box {
        padding: 32px 22px;
    }
}

/* ===== RADIANT GLOW CHIP ===== */
.chip {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 50px;
    background: rgba(244, 114, 182, 0.15);
    border: 1px solid rgba(244, 114, 182, 0.3);
    font-size: 0.8rem;
    color: var(--soft-pink);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

/* ===== DIVIDER ===== */
.divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(244, 114, 182, 0.4), transparent);
    margin: 18px 0;
}

/* ===== BIRTHDAY LOCK ===== */
.bday-lock {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 22px;
    padding: 24px 20px;
    margin: 18px 0 8px;
    text-align: center;
}

.lock-icon {
    font-size: 3.2rem;
    margin-bottom: 10px;
    animation: lockPulse 2s ease-in-out infinite;
    display: block;
}

@keyframes lockPulse {

    0%,
    100% {
        transform: scale(1) rotate(-3deg);
    }

    50% {
        transform: scale(1.12) rotate(3deg);
    }
}

.lock-label {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--lavender);
    margin-bottom: 14px;
}

.lock-countdown {
    font-family: 'Courier New', monospace;
    font-size: 1.05rem;
    font-weight: bold;
    color: var(--soft-pink);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px 16px;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.lock-sub {
    font-size: 0.78rem;
    opacity: 0.55;
    letter-spacing: 0.3px;
}

/* Unlocked state â€” open lock animation */
.bday-unlocked {
    animation: unlockReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes unlockReveal {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ===== WISH CARD ===== */
.wish-card {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(244, 114, 182, 0.3);
    border-radius: 20px;
    padding: 26px 22px;
    margin: 16px 0;
    text-align: center;
    box-shadow: 0 4px 24px rgba(244, 114, 182, 0.1);
}

.wish-icon {
    font-size: 3rem;
    margin-bottom: 14px;
    animation: wishFloat 3s ease-in-out infinite;
    display: block;
}

@keyframes wishFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.08);
    }
}

.wish-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--lavender);
    line-height: 1.75;
    text-align: left;
}

/* ===== CLUB PHOTO (p9 between ðŸ¥‚ heading and ðŸº) ===== */
.club-photo-wrap {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 14px auto 4px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(244, 114, 182, 0.3);
    aspect-ratio: 4/3;
    background: rgba(168, 85, 247, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.club-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

.club-photo-fallback {
    display: none;
    font-size: 4rem;
    animation: wishFloat 3s ease-in-out infinite;
}

/* =========================================
   STICKERS  (lock screen only)
========================================= */

/* ---- Shared base ---- */
.sticker {
    position: fixed;
    pointer-events: none;
    z-index: 200;
    user-select: none;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* ================================================
   BALLOONS â€” 4 pandas rising from bottom to top
   Each gets its own horizontal lane + delay so
   they feel independent, like 4 balloons let go.
================================================ */
.sticker-balloon {
    width: 88px;
    /* starts hidden below viewport */
    bottom: -120px;
    animation: balloonRise 9s ease-in-out infinite;
    transform-origin: center bottom;
}

/* Lane 1 â€” far left */
.sticker-balloon {
    left: 8%;
    animation-delay: 0s;
}

/* Lane 2 â€” left-center */
.sticker-balloon-2 {
    left: 30%;
    animation-delay: 2.5s;
}

/* Lane 3 â€” right-center */
.sticker-balloon-3 {
    left: 58%;
    animation-delay: 5s;
}

/* Lane 4 â€” far right */
.sticker-balloon-4 {
    left: 78%;
    animation-delay: 7s;
}

@keyframes balloonRise {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    25% {
        transform: translateY(-28vh) rotate(5deg);
    }

    50% {
        transform: translateY(-55vh) rotate(-6deg);
        opacity: 1;
    }

    75% {
        transform: translateY(-82vh) rotate(4deg);
    }

    92% {
        opacity: 1;
    }

    100% {
        transform: translateY(-115vh) rotate(-3deg);
        opacity: 0;
    }
}

/* ================================================
   PEEK â€” full right-edge sweep 0Â° â†’ 180Â°
   transform-origin: right bottom acts as the
   corner anchor. 0Â° = upright on right edge,
   90Â° = fully peeking in, 180Â° = flipped past.
================================================ */
.sticker-peek {
    width: 88px;
    right: -16px;
    bottom: 32%;
    transform-origin: right bottom;
    animation: peekFromRight 6s ease-in-out infinite;
}

@keyframes peekFromRight {
    0% {
        transform: rotate(0deg);
        opacity: 0;
    }

    8% {
        opacity: 1;
    }

    30% {
        transform: rotate(60deg);
    }

    50% {
        transform: rotate(90deg);
    }

    /* fully peeking */
    70% {
        transform: rotate(140deg);
    }

    88% {
        transform: rotate(180deg);
        opacity: 1;
    }

    /* flipped past edge */
    95% {
        opacity: 0;
    }

    100% {
        transform: rotate(0deg);
        opacity: 0;
    }

    /* reset hidden */
}

/* ================================================
   CAMERAS â€” 2 stickers, both at the TOP
   Camera-1: top-left corner
   Camera-2: slightly right of it
   Both bob and flash independently (different delay).
================================================ */
.sticker-camera {
    width: 80px;
    top: 68px;
    animation: cameraBob 3.5s ease-in-out infinite,
        cameraFlash 6s ease-in-out infinite;
}

.sticker-camera-1 {
    left: 10px;
    animation-delay: 0s;
}

.sticker-camera-2 {
    right: 14px;
    left: auto;
    animation-delay: 1.8s;
}

@keyframes cameraBob {

    0%,
    100% {
        transform: translateY(0) rotate(-4deg);
    }

    30% {
        transform: translateY(-8px) rotate(3deg);
    }

    70% {
        transform: translateY(5px) rotate(-2deg);
    }
}

@keyframes cameraFlash {

    0%,
    74%,
    100% {
        filter: none;
    }

    78% {
        filter: brightness(2.2) drop-shadow(0 0 12px rgba(255, 255, 255, 0.95));
    }

    82% {
        filter: none;
    }

    85% {
        filter: brightness(1.7) drop-shadow(0 0 7px rgba(255, 255, 255, 0.7));
    }

    88% {
        filter: none;
    }
}

/* ================================================
   HEARTS â€” 2 stickers, both at the BOTTOM
   Heart-1: bottom-left corner
   Heart-2: slightly right of it
   Both sway + pulse with a slight time offset.
================================================ */
.sticker-heart {
    width: 82px;
    bottom: 18px;
    animation: heartKittySway 3s ease-in-out infinite,
        heartKittyPulse 1.2s ease-in-out infinite;
}

.sticker-heart-1 {
    left: 10px;
    animation-delay: 0s;
}

.sticker-heart-2 {
    right: 14px;
    left: auto;
    animation-delay: 1.5s;
}

@keyframes heartKittySway {

    0%,
    100% {
        transform: rotate(-7deg) translateY(0);
    }

    50% {
        transform: rotate(7deg) translateY(-9px);
    }
}

@keyframes heartKittyPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 4px rgba(244, 114, 182, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 16px rgba(244, 114, 182, 1)) brightness(1.1);
    }
}

/* =============================================
   MOON TRANSITION OVERLAY
============================================= */
#moon-overlay {
    position: fixed;
    inset: 0;
    z-index: 8000;
    pointer-events: none;
    overflow: hidden;
}

#moon-dim {
    position: fixed;
    inset: 0;
    z-index: 7999;
    background: rgba(5, 0, 18, 0);
    pointer-events: none;
    transition: background 0.3s ease;
}

#moon-dim.active {
    background: rgba(5, 0, 18, 0.55);
}

#moon-img {
    position: absolute;
    width: 130px;
    height: 130px;
    object-fit: contain;
    bottom: -180px;
    left: -90px;
    filter:
        drop-shadow(0 0 18px rgba(255, 230, 150, 0.85)) drop-shadow(0 0 45px rgba(255, 210, 100, 0.5)) drop-shadow(0 0 70px rgba(200, 150, 255, 0.3));
    opacity: 0;
    transform: scale(0.8) rotate(0deg);
    will-change: transform, opacity;
}

#moon-img.moon-rising {
    animation: moonRise 1.2s cubic-bezier(0.42, 0, 0.58, 1) forwards;
}

@keyframes moonRise {
    0% {
        transform: translate(0px, 0px) scale(0.8) rotate(0deg);
        opacity: 0;
        filter:
            drop-shadow(0 0 12px rgba(255, 230, 150, 0.5)) drop-shadow(0 0 30px rgba(255, 210, 100, 0.3));
    }

    15% {
        opacity: 1;
    }

    60% {
        transform: translate(55vw, -55vh) scale(1.05) rotate(-4deg);
        filter:
            drop-shadow(0 0 28px rgba(255, 240, 160, 0.95)) drop-shadow(0 0 60px rgba(255, 200, 80, 0.7)) drop-shadow(0 0 100px rgba(220, 170, 255, 0.45));
    }

    85% {
        opacity: 1;
    }

    100% {
        transform: translate(110vw, -110vh) scale(1.2) rotate(-8deg);
        opacity: 0;
        filter:
            drop-shadow(0 0 20px rgba(255, 240, 160, 0.5)) drop-shadow(0 0 50px rgba(255, 200, 80, 0.3));
    }
}

/* ---- Star particles trailing the moon ---- */
.moon-star {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    will-change: transform, opacity;
}

.moon-star.twinkle {
    animation: starTwinkle var(--dur, 0.9s) ease-out var(--delay, 0s) forwards;
}

@keyframes starTwinkle {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 0;
    }

    25% {
        opacity: 1;
        transform: translate(var(--tx, 10px), var(--ty, -10px)) scale(1);
    }

    100% {
        transform: translate(var(--tx2, 20px), var(--ty2, -20px)) scale(0);
        opacity: 0;
    }
}

/* =============================================
   FIXED FLOATING MOON — "Don't touch me"
============================================= */
#secret-moon-wrap {
    display: none;
    /* Hidden by default layut, shown via JS on page 9 */
    position: fixed;
    bottom: 28px;
    right: 20px;
    z-index: 5000;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    user-select: none;
    animation: moonFloat 4s ease-in-out infinite;
}

#secret-moon-wrap.show {
    display: flex;
}

@keyframes moonFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(3deg);
    }
}

#secret-moon-wrap:hover {
    animation-play-state: paused;
    transform: scale(1.08);
}

#secret-moon-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter:
        drop-shadow(0 0 14px rgba(255, 230, 150, 0.85)) drop-shadow(0 0 32px rgba(255, 210, 100, 0.55)) drop-shadow(0 0 55px rgba(200, 150, 255, 0.35));
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s;
}

#secret-moon-wrap.touched #secret-moon-img {
    transform: scale(1.25) rotate(-12deg);
    filter:
        drop-shadow(0 0 22px rgba(255, 240, 150, 1)) drop-shadow(0 0 50px rgba(255, 200, 80, 0.9)) drop-shadow(0 0 80px rgba(220, 150, 255, 0.7));
}

#secret-moon-label {
    font-size: 0.66rem;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.4px;
    font-style: italic;
    text-shadow: 0 0 8px rgba(255, 220, 120, 0.6);
    transition: color 0.3s;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 7px;
    border-radius: 20px;
    border: 1px solid rgba(255, 220, 120, 0.2);
}

#secret-moon-wrap.touched #secret-moon-label {
    color: var(--soft-pink);
}

/* old reveal paragraph — hidden (popup replaces it) */
#secret-moon-reveal {
    display: none;
}

/* =============================================
   MOON PHOTO POPUP
============================================= */
#moon-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10002;
    background: rgba(5, 0, 18, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    align-items: center;
    justify-content: center;
}

#moon-popup-overlay.show {
    display: flex;
    animation: overlayIn 0.35s ease;
}

#moon-popup-box {
    position: relative;
    background: linear-gradient(135deg, rgba(25, 5, 55, 0.97), rgba(55, 10, 95, 0.97));
    border: 1px solid rgba(255, 230, 150, 0.35);
    border-radius: 28px;
    padding: 28px 22px 22px;
    max-width: 340px;
    width: 88%;
    text-align: center;
    box-shadow:
        0 0 60px rgba(255, 220, 100, 0.25),
        0 0 120px rgba(168, 85, 247, 0.2);
    animation: surpriseIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#moon-popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
}

#moon-popup-close:hover {
    background: rgba(244, 114, 182, 0.35);
    transform: scale(1.12);
}

#moon-popup-img {
    width: 100%;
    max-width: 280px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.4),
        0 0 0 2px rgba(255, 230, 150, 0.25);
    animation: moonGlow 2.5s ease-in-out infinite alternate;
    display: block;
    margin: 0 auto;
}

@keyframes moonGlow {
    from {
        filter: drop-shadow(0 0 12px rgba(255, 220, 100, 0.5));
    }

    to {
        filter: drop-shadow(0 0 28px rgba(255, 220, 100, 0.9)) drop-shadow(0 0 50px rgba(200, 150, 255, 0.4));
    }
}

#moon-popup-caption {
    margin-top: 14px;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #ffe096, #fda4af, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

/* =============================================
   GIFT HEART BURST — localized over the gift
============================================= */
.gift-heart {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    font-size: 24px;
    transform-origin: center;
    animation: giftHeartFly var(--dur, 0.75s) ease-out forwards;
}

@keyframes giftHeartFly {
    0% {
        transform: translate(0, 0) scale(0.4);
        opacity: 1;
    }

    35% {
        opacity: 1;
        transform: translate(calc(var(--gx, 0px) * 0.4), calc(var(--gy, -60px) * 0.4)) scale(1.2);
    }

    100% {
        transform: translate(var(--gx, 0px), var(--gy, -80px)) scale(0);
        opacity: 0;
    }
}