﻿/* =========================================================
   TOKENS
   A commendation-plaque palette: ink navy, brushed gold,
   ivory paper. One accent, spent deliberately.
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
    --ink: #0a0e1a;
    --panel-navy: #10162b;
    --panel: rgba(18, 24, 46, .78);
    --panel-border: rgba(201, 162, 39, .16);
    --gold: #c9a227;
    --gold-bright: #e8c96a;
    --paper: #f4efe1;
    --text: #f1ede0;
    --muted: #a3a9bd;
    --hairline: rgba(241, 237, 224, .1);
    --ease: cubic-bezier(.22, 1, .36, 1);
    --radius-lg: 18px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: var(--ink);
    background-image: radial-gradient(ellipse at 50% -10%, #1c2444 0%, transparent 55%), linear-gradient(180deg, var(--ink) 0%, #060810 100%);
    color: var(--text);
    font-family: "Inter", sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

    /* a single, quiet field of light — not a starfield of a hundred dots */
    body::before {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        background-image: radial-gradient(rgba(241, 237, 224, .35) 1px, transparent 1px);
        background-size: 64px 64px;
        opacity: .12;
    }

::selection {
    background: var(--gold);
    color: var(--ink);
}

:focus-visible {
    outline: 2px solid var(--gold-bright);
    outline-offset: 3px;
    border-radius: 4px;
}

/* =========================================================
   NAV
   ========================================================= */

.birthday-nav {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 6%;
    border-bottom: 1px solid var(--hairline);
    background: rgba(10, 14, 26, .82);
    backdrop-filter: blur(14px);
}

.brand {
    color: var(--gold-bright);
    text-decoration: none;
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: .01em;
}

    .brand span {
        color: var(--text);
        font-weight: 500;
    }

.nav-links {
    display: flex;
    gap: 26px;
}

    .nav-links a, .text-link {
        color: var(--muted);
        text-decoration: none;
        font-size: .95rem;
        transition: color .25s var(--ease);
        position: relative;
    }

        .nav-links a::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: -4px;
            width: 0;
            height: 1px;
            background: var(--gold);
            transition: width .25s var(--ease);
        }

        .nav-links a:hover, .text-link:hover {
            color: var(--gold-bright);
        }

            .nav-links a:hover::after {
                width: 100%;
            }

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    color: var(--text);
    font-size: 1.5rem;
}

/* =========================================================
   LAYOUT
   ========================================================= */

.birthday-main {
    max-width: 1180px;
    margin: auto;
    padding: 30px 20px;
    position: relative;
    z-index: 1;
}

.hero, .section {
    text-align: center;
    padding: 60px 0;
}

.eyebrow {
    color: var(--gold);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .06em;
}

.hero h1, .section h1 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 700;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.1;
    margin: 18px 0;
    color: var(--paper);
}

.hero h2 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
    color: var(--gold-bright);
    font-size: 2rem;
    margin: 6px 0;
}

.hero-sub, .section-intro {
    color: var(--muted);
    font-size: 1.08rem;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.moon {
    font-size: clamp(2.6rem, 6vw, 4rem);
    color: var(--gold);
    opacity: .9;
}

.countdown {
    margin: 22px auto;
    color: var(--gold-bright);
    font-size: .95rem;
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.magic-btn, .ghost-btn {
    display: inline-block;
    border: 1px solid var(--gold);
    border-radius: 999px;
    padding: 13px 26px;
    margin: 8px;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}

.magic-btn {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    color: var(--ink);
}

    .magic-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 24px -10px rgba(201, 162, 39, .55);
    }

    .magic-btn:active {
        transform: translateY(0);
    }

.ghost-btn {
    background: transparent;
    color: var(--gold-bright);
}

    .ghost-btn:hover {
        background: rgba(201, 162, 39, .08);
    }

/* =========================================================
   PANELS
   ========================================================= */

.glass {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: 0 20px 50px -25px rgba(0, 0, 0, .6);
    backdrop-filter: blur(16px);
}

.welcome {
    max-width: 640px;
    margin: 32px auto;
}

.hidden {
    display: none !important;
}

/* =========================================================
   ENTRANCE (single orchestrated reveal, not per-section fades)
   ========================================================= */

body.birthday-page, body.birthday-body {
    min-height: 0;
    height: 100vh;
    overflow: hidden;
}

.birthday-layout {
    width: 100%;
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .birthday-layout .birthday-nav {
        flex: 0 0 auto;
        margin: 0;
    }

    .birthday-layout .birthday-main {
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0 20px;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: stretch;
    }

        .birthday-layout .birthday-main > .hero {
            width: 100%;
            max-width: 1180px;
            height: 100%;
            min-height: 0;
            margin: 0 auto;
            padding: 10px 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

.birthday-entrance .moon {
    animation: riseIn .9s var(--ease) both;
}

.birthday-entrance .eyebrow,
.birthday-entrance h1,
.birthday-entrance h2,
.birthday-entrance p,
.birthday-entrance .countdown,
.birthday-entrance .magic-btn {
    animation: riseIn .8s var(--ease) both;
}

.birthday-entrance .eyebrow {
    animation-delay: .1s;
}

.birthday-entrance h1 {
    animation-delay: .18s;
}

.birthday-entrance h2 {
    animation-delay: .26s;
}

.birthday-entrance p {
    animation-delay: .32s;
}

.birthday-entrance .countdown {
    animation-delay: .4s;
}

.birthday-entrance .magic-btn {
    animation-delay: .48s;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome:not(.hidden) {
    animation: revealPanel .5s var(--ease) both;
}

@keyframes revealPanel {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* generic on-scroll reveal, applied once via IntersectionObserver */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}

    .reveal.in-view {
        opacity: 1;
        transform: translateY(0);
    }

/* =========================================================
   APPRECIATION WALL
   (was a "galaxy" of orbiting circles — now a legible,
   scannable grid of commendation cards)
   ========================================================= */

.galaxy {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    max-width: 900px;
    margin: 36px auto;
    text-align: left;
}

.central-star {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--panel-border);
    background: linear-gradient(90deg, rgba(201, 162, 39, .1), transparent);
    color: var(--paper);
    font-family: "Cormorant Garamond", serif;
}

    .central-star strong {
        font-size: 1.15rem;
        font-weight: 600;
    }

    .central-star small {
        color: var(--muted);
        font-family: "Inter", sans-serif;
        font-size: .8rem;
        display: block;
    }

.orbit-star {
    background: var(--panel-navy);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 18px;
    text-align: left;
    font-size: .98rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s var(--ease);
}

    .orbit-star:hover, .orbit-star:focus-visible {
        border-color: var(--gold);
        transform: translateY(-3px);
        background: #151c38;
    }

    .orbit-star::after {
        content: "→";
        float: right;
        color: var(--gold);
        opacity: .7;
    }

.appreciation-card {
    max-width: 700px;
    margin: 22px auto;
    text-align: left;
    animation: revealPanel .4s var(--ease) both;
}

    .appreciation-card h2 {
        font-family: "Cormorant Garamond", serif;
        color: var(--gold-bright);
        margin: 0 0 10px;
        font-size: 1.5rem;
    }

    .appreciation-card p {
        color: var(--muted);
        font-size: 1.02rem;
        line-height: 1.75;
        margin: 0;
    }

.quote-card {
    max-width: 700px;
    margin: 40px auto;
    text-align: left;
}

    .quote-card h2 {
        font-family: "Cormorant Garamond", serif;
        color: var(--gold-bright);
        font-size: 1.3rem;
        margin-top: 0;
    }

    .quote-card p {
        color: var(--muted);
        line-height: 1.75;
    }

/* =========================================================
   TREASURE HUNT
   ========================================================= */

.puzzle-card {
    max-width: 620px;
    margin: 26px auto;
    text-align: left;
}

#clueNumber {
    color: var(--gold);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .04em;
}

.puzzle-card h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.6rem;
    margin: 10px 0 20px;
}

.puzzle-card input {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--hairline);
    background: #070a14;
    color: var(--text);
    font-size: 1rem;
    margin: 4px 0 16px;
    transition: border-color .2s var(--ease);
}

    .puzzle-card input:focus {
        border-color: var(--gold);
        outline: none;
    }

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#clueFeedback {
    color: #e6a06a;
    min-height: 1.2em;
    margin: 14px 0 0;
    font-size: .92rem;
}

#hintText {
    color: var(--muted);
    font-size: .9rem;
    min-height: 1.2em;
}

.progress {
    height: 6px;
    background: var(--hairline);
    border-radius: 10px;
    max-width: 620px;
    margin: 0 auto 28px;
    overflow: hidden;
}

    .progress span {
        display: block;
        height: 100%;
        background: linear-gradient(90deg, var(--gold), var(--gold-bright));
        width: 0;
        border-radius: 10px;
        transition: width .5s var(--ease);
    }

/* =========================================================
   GAMES
   ========================================================= */

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    text-align: left;
}

.game-card h2 {
    font-family: "Cormorant Garamond", serif;
    color: var(--gold-bright);
    font-size: 1.35rem;
    margin-top: 0;
}

.game-card p {
    color: var(--muted);
    font-size: .95rem;
}

.game-stats {
    color: var(--muted);
    margin: 14px 0;
    font-size: .92rem;
    font-variant-numeric: tabular-nums;
}

.star-arena {
    height: 220px;
    background: #070a14;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.falling-star {
    position: absolute;
    background: none;
    border: 0;
    color: var(--gold-bright);
    font-size: 24px;
    cursor: pointer;
    transition: transform .15s var(--ease), opacity .15s var(--ease);
    filter: drop-shadow(0 0 6px rgba(201, 162, 39, .5));
}

    .falling-star:hover {
        transform: scale(1.15);
    }

    .falling-star.caught {
        opacity: 0;
        transform: scale(.4);
    }

.memory-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.memory-card {
    height: 62px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    background: var(--panel-navy);
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform .18s var(--ease), border-color .18s var(--ease);
}

    .memory-card:hover:not(.matched) {
        border-color: var(--gold);
    }

    .memory-card.matched {
        background: rgba(201, 162, 39, .14);
        border-color: var(--gold);
        cursor: default;
    }

.wish-wheel {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 22px auto;
    background: conic-gradient(var(--gold-bright), #6b4fb0, var(--gold), #6b4fb0, var(--gold-bright));
    display: grid;
    place-items: center;
    font-size: 3rem;
    color: var(--ink);
    transition: transform 1.4s cubic-bezier(.17, .67, .16, .99);
}

#wishResult {
    color: var(--muted);
    font-size: .95rem;
    min-height: 1.4em;
}

/* =========================================================
   CELEBRATION
   ========================================================= */

.cake {
    margin: 45px auto;
    width: 220px;
    position: relative;
}

.cake-top, .cake-bottom {
    background: linear-gradient(#ffdca0, #b86b54);
    border-radius: 16px;
    height: 60px;
}

.cake-bottom {
    margin-top: 5px;
    height: 84px;
}

.flames {
    display: flex;
    justify-content: space-around;
}

    .flames i {
        width: 16px;
        height: 32px;
        background: var(--gold-bright);
        border-radius: 50% 50% 50% 0;
        transform: rotate(45deg);
        margin-bottom: 10px;
        transition: opacity .5s var(--ease), transform .5s var(--ease);
    }

.blown .flames i {
    opacity: 0;
    transform: rotate(45deg) scale(.3);
}

.message {
    max-width: 760px;
    margin: 34px auto;
    text-align: left;
    line-height: 1.8;
    color: var(--muted);
}

/* =========================================================
   PARTICLES
   ========================================================= */

.particle {
    position: fixed;
    color: var(--gold-bright);
    animation: rise 1.6s var(--ease) forwards;
    z-index: 5;
    pointer-events: none;
}

@keyframes rise {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-160px) scale(1.6);
    }
}

/* =========================================================
   FOOTER
   ========================================================= */

.birthday-footer {
    text-align: center;
    padding: 26px;
    color: var(--muted);
    font-size: .82rem;
    border-top: 1px solid var(--hairline);
}

.birthday-layout .birthday-footer {
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
    padding: 12px 15px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 68px;
        right: 15px;
        background: var(--panel-navy);
        padding: 18px;
        border-radius: 14px;
        flex-direction: column;
        gap: 14px;
        border: 1px solid var(--panel-border);
    }

        .nav-links.open {
            display: flex;
        }

    .menu-toggle {
        display: block;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .galaxy {
        grid-template-columns: 1fr 1fr;
    }

    .hero, .section {
        padding: 34px 0;
    }

    .birthday-layout .birthday-main {
        padding: 0 15px;
    }

        .birthday-layout .birthday-main > .hero {
            padding: 8px 0;
        }

    .hero h1 {
        font-size: clamp(1.8rem, 7vw, 3rem);
    }

    .hero h2 {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition: none !important;
    }
}

/* =========================================================
   WISH HERO
   Container for the Three.js ribbon-knot animation, with a
   soft lavender field behind it (matches the reference clip's
   pastel background rather than the ink-navy used elsewhere).
   ========================================================= */

.wish-hero {
    position: relative;
    width: 100%;
    height: min(72vh, 640px);
    min-height: 420px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 10px auto 36px;
    background: radial-gradient(120% 100% at 50% 20%, #b9a8e6 0%, #8f7fd1 45%, #4d3f80 100%);
}

    .wish-hero canvas {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        display: block;
    }

    .wish-hero .wish-overlay {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 20px;
        pointer-events: none;
    }

    .wish-hero .eyebrow {
        color: #fff6e0;
        opacity: .85;
    }

    .wish-hero h1 {
        color: #fff;
        font-family: "Cormorant Garamond", serif;
        font-size: clamp(2rem, 5vw, 3.4rem);
        margin: 14px 0;
        text-shadow: 0 6px 30px rgba(30, 20, 60, .35);
    }

    .wish-hero p {
        color: #f1ecff;
        max-width: 480px;
        font-size: 1.02rem;
        line-height: 1.6;
    }

    /* staggered fade-up, same orchestrated-entrance pattern as the main hero */
    .wish-hero .wish-overlay > * {
        animation: riseIn .9s var(--ease) both;
    }

    .wish-hero .wish-overlay .eyebrow {
        animation-delay: .1s;
    }

    .wish-hero .wish-overlay h1 {
        animation-delay: .22s;
    }

    .wish-hero .wish-overlay p {
        animation-delay: .36s;
    }

@media (max-width: 800px) {
    .wish-hero {
        height: 56vh;
        min-height: 360px;
    }
}

/* =========================================================
   CANDLE / WISH SECTION
   ========================================================= */

.candle-section {
    max-width: 600px;
    margin: 0 auto;
}

#wishMessage {
    animation: revealPanel .5s var(--ease) both;
}



/* =========================================================
   FULL-SCREEN 3D BIRTHDAY CAKE
   ========================================================= */

body.cake-page {
    overflow: hidden;
}

    /* Hide footer only on the cake celebration page */
    body.cake-page .birthday-footer {
        display: none;
    }

    /* Full-width breakout from the main container */
    body.cake-page .birthday-main {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
        overflow: hidden;
        display: block;
        flex: 1;
        min-height: 0;
    }

/* Main cake hero */
.cake-fullscreen {
    position: relative;
    width: 100%;
    height: calc(100vh - 82px);
    min-height: 500px;
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient( ellipse at 65% 45%, rgba(100, 65, 160, 0.25), transparent 48% ), radial-gradient( ellipse at 50% 100%, rgba(255, 180, 80, 0.08), transparent 50% ), #050315;
}

/* Three.js canvas fills the entire hero */
#cakeCanvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Subtle atmospheric glow */
.cake-fullscreen::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient( ellipse at center, transparent 20%, rgba(3, 2, 13, 0.15) 65%, rgba(3, 2, 13, 0.65) 100% );
}

/* Text overlay */
.cake-content {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: clamp(25px, 7vw, 110px);
    transform: translateY(-50%);
    width: min(410px, 38vw);
    text-align: left;
    pointer-events: none;
}

    .cake-content .eyebrow {
        font-size: 0.7rem;
        letter-spacing: 3px;
        line-height: 1.8;
        margin-bottom: 20px;
    }

    .cake-content h1 {
        font-family: "Cinzel", serif;
        font-size: clamp(2.2rem, 4.3vw, 4.5rem);
        line-height: 1.15;
        color: var(--text);
        margin: 0 0 25px;
        text-shadow: 0 0 30px rgba(180, 130, 255, 0.2);
    }

        .cake-content h1::first-line {
            color: var(--text);
        }

.cake-subtitle {
    color: var(--muted);
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    line-height: 1.9;
    margin-bottom: 28px;
}

.cake-content .magic-btn,
.cake-content .wish-status {
    pointer-events: auto;
}

.cake-content .magic-btn {
    margin: 0;
    padding: 15px 28px;
    font-size: 0.95rem;
}

.wish-status {
    color: var(--gold);
    font-size: 0.8rem;
    line-height: 1.6;
    margin-top: 20px;
    max-width: 280px;
}

/* Decorative floating symbols */
.cake-decoration {
    position: absolute;
    z-index: 2;
    color: var(--gold);
    font-size: 2.5rem;
    opacity: 0.6;
    pointer-events: none;
    text-shadow: 0 0 25px var(--gold);
}

.decoration-left {
    top: 20%;
    left: 48%;
}

.decoration-right {
    top: 28%;
    right: 8%;
    font-size: 4rem;
    color: #bba0ff;
}

/* Bottom signature */
.cake-bottom-message {
    position: absolute;
    z-index: 3;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}

    .cake-bottom-message span {
        font-size: 0.6rem;
        letter-spacing: 4px;
        color: var(--gold);
    }

    .cake-bottom-message strong {
        color: var(--muted);
        font-size: 0.8rem;
        font-weight: 400;
    }

/* Responsive mobile */
@media (max-width: 800px) {

    body.cake-page {
        overflow: auto;
    }

        body.cake-page .birthday-main {
            overflow: hidden;
        }

    .cake-fullscreen {
        height: calc(100vh - 70px);
        min-height: 600px;
    }

    .cake-content {
        top: 35px;
        left: 20px;
        transform: none;
        width: calc(100% - 40px);
        text-align: center;
    }

        .cake-content .eyebrow {
            font-size: 0.6rem;
            letter-spacing: 2px;
        }

        .cake-content h1 {
            font-size: clamp(2rem, 8vw, 3rem);
            margin-bottom: 15px;
        }

    .cake-subtitle {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    .cake-content .magic-btn {
        padding: 12px 22px;
    }

    .wish-status {
        margin: 12px auto 0;
    }

    .decoration-left {
        top: 48%;
        left: 5%;
    }

    .decoration-right {
        top: 45%;
        right: 5%;
    }

    .cake-bottom-message {
        bottom: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .cake-fullscreen *,
    .cake-fullscreen::before {
        animation: none !important;
        transition: none !important;
    }
}


/* =========================================================
   FULL-SCREEN 3D BIRTHDAY CELEBRATION
   ========================================================= */

.birthday-celebration {
    position: relative;
    width: 100vw;
    min-height: calc(100vh - 150px);
    margin-left: calc(50% - 50vw);
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient( ellipse at 65% 48%, #30205e 0%, #120c2c 38%, #050313 78%, #020108 100% );
}

/* Three.js canvas fills the entire hero */

#birthdayCakeCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
    outline: none;
}

/* Decorative background stars */

.celebration-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

    .celebration-stars span {
        position: absolute;
        color: #d8b9ff;
        font-size: 2rem;
        text-shadow: 0 0 25px #b68cff;
        animation: celebrationTwinkle 3s ease-in-out infinite;
    }

        .celebration-stars span:nth-child(1) {
            top: 18%;
            left: 49%;
            color: #ffd778;
        }

        .celebration-stars span:nth-child(2) {
            top: 28%;
            right: 8%;
            font-size: 3rem;
            animation-delay: 1s;
        }

        .celebration-stars span:nth-child(3) {
            top: 58%;
            left: 42%;
            font-size: 1.5rem;
            animation-delay: 1.8s;
        }

        .celebration-stars span:nth-child(4) {
            bottom: 18%;
            right: 25%;
            animation-delay: .5s;
        }

        .celebration-stars span:nth-child(5) {
            top: 12%;
            right: 35%;
            font-size: 1.3rem;
            animation-delay: 2s;
        }

/* Left-side text */

.celebration-content {
    position: relative;
    z-index: 5;
    width: min(410px, 38%);
    padding: clamp(35px, 7vw, 100px) 0 30px clamp(25px, 7vw, 100px);
}

    .celebration-content .eyebrow {
        font-size: .68rem;
        letter-spacing: 3px;
        line-height: 1.8;
        margin-bottom: 25px;
    }

    .celebration-content h1 {
        font-family: Cinzel, serif;
        font-size: clamp(2.4rem, 4.7vw, 5rem);
        font-weight: 700;
        line-height: 1.12;
        letter-spacing: -1px;
        margin: 0 0 35px;
        color: #fffaf0;
    }

        .celebration-content h1 span {
            color: #fffaf0;
        }

.celebration-description {
    max-width: 280px;
    color: #bcb1dc;
    font-size: 1rem;
    line-height: 1.9;
    margin-bottom: 25px;
}

.celebration-content .magic-btn {
    border: none;
    padding: 14px 25px;
    margin: 0;
    background: linear-gradient(135deg, #ffe18b, #d3a72f);
    color: #25152d;
    box-shadow: 0 8px 30px #d3a72f22;
}

    .celebration-content .magic-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 40px #d3a72f55;
    }

.wish-instruction {
    color: #d3a72f;
    font-size: .78rem;
    margin-top: 20px;
}

/* Bottom signature */

.celebration-signature {
    position: absolute;
    z-index: 5;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: max-content;
    max-width: 90%;
}

    .celebration-signature span {
        color: #d3a72f;
        font-size: .6rem;
        letter-spacing: 5px;
    }

    .celebration-signature p {
        color: #aaa0cb;
        font-size: .75rem;
        margin: 7px 0 0;
    }

/* Birthday message after animation */

.celebration-message {
    position: absolute;
    z-index: 10;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(450px, 85%);
    padding: 35px;
    text-align: center;
    background: rgba(15, 9, 39, .94);
    border: 1px solid #ffd77866;
    border-radius: 25px;
    box-shadow: 0 0 80px #d3a72f33;
    backdrop-filter: blur(18px);
}

    .celebration-message h2 {
        font-family: Cinzel, serif;
        color: #ffd778;
        font-size: 1.7rem;
    }

    .celebration-message p {
        color: #c5bddf;
        line-height: 1.8;
    }

.hidden {
    display: none !important;
}

/* Animation */

@keyframes celebrationTwinkle {
    0%, 100% {
        opacity: .3;
        transform: scale(.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Tablet */

@media (max-width: 900px) {

    .birthday-celebration {
        min-height: calc(100vh - 145px);
    }

    .celebration-content {
        width: 45%;
        padding-left: 35px;
    }

        .celebration-content h1 {
            font-size: clamp(2rem, 5vw, 3.8rem);
        }
}

/* Mobile */

@media (max-width: 600px) {

    .birthday-celebration {
        min-height: calc(100vh - 130px);
    }

    .celebration-content {
        width: 100%;
        padding: 35px 25px;
        text-align: center;
    }

        .celebration-content .eyebrow {
            max-width: 300px;
            margin: 0 auto 18px;
        }

        .celebration-content h1 {
            font-size: clamp(2rem, 10vw, 3.2rem);
            margin-bottom: 20px;
        }

    .celebration-description {
        margin: 0 auto 20px;
    }

    .wish-instruction {
        margin-top: 15px;
    }

    .celebration-signature {
        bottom: 18px;
    }

    .celebration-stars span {
        font-size: 1.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    .celebration-stars span {
        animation: none;
    }
}



/* =========================================================
   FULL-SCREEN BIRTHDAY CELEBRATION
========================================================= */

.birthday-celebration {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    position: relative;
}

    .birthday-celebration .wish-hero {
        position: relative;
        width: 100%;
        height: calc(100vh - 82px);
        min-height: 600px;
        overflow: hidden;
        background: radial-gradient( ellipse at 65% 45%, #24184c 0%, #0b0720 50%, #03020d 100% );
    }

    .birthday-celebration #wishCanvas {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        display: block;
    }

    .birthday-celebration .wish-content {
        position: absolute;
        z-index: 2;
        top: 50%;
        left: 6%;
        transform: translateY(-50%);
        width: min(420px, 40%);
        text-align: left;
        pointer-events: none;
    }

        .birthday-celebration .wish-content .magic-btn {
            pointer-events: auto;
        }

        .birthday-celebration .wish-content h1 {
            font-family: Cinzel, serif;
            font-size: clamp(2.3rem, 4.5vw, 5rem);
            line-height: 1.12;
            margin: 24px 0;
            color: #fff8ed;
        }

        .birthday-celebration .wish-content .hero-sub {
            font-size: 1.05rem;
            line-height: 1.9;
            color: var(--muted);
            margin: 20px 0;
        }

    .birthday-celebration .wish-hint {
        color: var(--gold);
        font-size: 0.85rem;
        margin-top: 12px;
    }

    .birthday-celebration .wish-message {
        margin-top: 25px;
        color: var(--muted);
        line-height: 1.8;
    }

        .birthday-celebration .wish-message h2 {
            color: var(--gold);
            font-family: Cinzel, serif;
            font-size: 1.2rem;
        }

    .birthday-celebration .hidden {
        display: none !important;
    }

/* Hide footer on the full-screen celebration page */
body:has(.birthday-celebration) .birthday-footer {
    display: none;
}

/* Golden celebration particles */
.birthday-particle {
    position: fixed;
    z-index: 100;
    color: var(--gold);
    font-size: 1.6rem;
    pointer-events: none;
    animation: birthdayBurst 1.8s ease-out forwards;
}

@keyframes birthdayBurst {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-180px) scale(1.8);
    }
}

/* Responsive */
@media (max-width: 800px) {

    .birthday-celebration .wish-hero {
        height: calc(100vh - 70px);
        min-height: 650px;
    }

    .birthday-celebration .wish-content {
        top: 8%;
        left: 20px;
        transform: none;
        width: calc(100% - 40px);
        text-align: center;
    }

        .birthday-celebration .wish-content h1 {
            font-size: clamp(2rem, 9vw, 3.5rem);
        }

        .birthday-celebration .wish-content .hero-sub {
            font-size: 0.9rem;
        }
}



/* =========================================================
   APPRECIATION WALL - FULL CONTENT VISIBILITY
   ========================================================= */

/* Allow the page to grow with all its content */
.birthday-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.birthday-main {
    flex: 1 0 auto;
    min-height: 0;
    overflow: visible;
}

/* Appreciation Wall section */
.birthday-content-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 70px 30px 100px;
    box-sizing: border-box;
    overflow: visible;
}

    /* Make sure the bottom card is not clipped */
    .birthday-content-page .quote-card {
        position: relative;
        z-index: 2;
        margin-top: 34px;
        margin-bottom: 20px;
        min-height: 140px;
        height: auto;
        overflow: visible;
    }

        /* Keep the complete text visible */
        .birthday-content-page .quote-card h2,
        .birthday-content-page .quote-card p {
            overflow: visible;
            white-space: normal;
        }

/* Footer must remain below the content */
.birthday-footer {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .birthday-content-page {
        padding: 45px 18px 80px;
    }

        .birthday-content-page .quote-card {
            margin-top: 28px;
            padding: 24px;
        }
}


html,
body {
    min-height: 100%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
}

.birthday-page {
    min-height: 100vh;
    height: auto;
}

.birthday-layout {
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
}

.birthday-main {
    flex: 1 0 auto;
    min-height: 0;
    height: auto;
    overflow: visible;
}

/* Appreciation Wall content */

.appreciation-wall-page {
    min-height: calc(100vh - 150px);
    height: auto;
    padding-bottom: 100px;
    overflow: visible;
}

    /* Ensure the appreciation content can extend naturally */

    .appreciation-wall-page .galaxy {
        min-height: 0;
        height: auto;
        overflow: visible;
    }

    .appreciation-wall-page .quote-card {
        position: relative;
        z-index: 2;
        margin-top: 34px;
        margin-bottom: 30px;
        min-height: 140px;
        height: auto;
        overflow: visible;
    }

/* Footer must remain in normal document flow */

.birthday-footer {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: 100%;
    flex-shrink: 0;
    z-index: 5;
}

/* Responsive spacing */

@media (max-width: 768px) {
    .appreciation-wall-page {
        padding-bottom: 60px;
    }

        .appreciation-wall-page .quote-card {
            margin-top: 24px;
        }
}

/* Move Appreciation Wall slightly to the left */

.appreciation-wall-page {
    position: relative;
    left: -45px;
}

/* Keep the layout centered on smaller screens */

@media (max-width: 768px) {
    .appreciation-wall-page {
        left: 0;
    }
}