/* ==========================================================================
   KIDS PARTY — PREMIUM REDESIGN
   ========================================================================== */

:root {
    --bg: #f0f0ff;
    --blob-rose: #ffb3c1;
    --blob-peach: #ffd6a5;
    --blob-mint: #a8e6cf;
    --blob-sky: #a0d2f5;
    --blob-lavender: #c4b5fd;

    --text-dark: #2d2b3d;
    --text-body: #5a5775;
    --highlight: #ff5e7d;
    --highlight-glow: rgba(255, 94, 125, 0.35);

    --font-head: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;

    --radius: 28px;
    --radius-sm: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text-dark);
    font-family: var(--font-body);
    overflow-x: hidden;
    cursor: none;
}

@media (max-width: 768px) {
    body { cursor: auto; }
}

.wrapper {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 5vw;
}

/* ==========================================================================
   BACKGROUND
   ========================================================================== */
.mesh-bg {
    position: fixed;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 179, 193, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(160, 210, 245, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(168, 230, 207, 0.35) 0%, transparent 50%),
        radial-gradient(circle at 30% 80%, rgba(196, 181, 253, 0.3) 0%, transparent 35%);
    filter: blur(50px);
}

.blobs-wrap {
    position: fixed;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(35px);
    border-radius: 50%;
    opacity: 0.55;
    animation: blobFloat 25s infinite ease-in-out alternate;
}

.blob-1 { width: 350px; height: 350px; background: var(--blob-rose); top: -8%; left: -8%; }
.blob-2 { width: 400px; height: 400px; background: var(--blob-peach); bottom: -15%; right: -8%; animation-delay: -6s; }
.blob-3 { width: 300px; height: 300px; background: var(--blob-mint); top: 45%; left: 55%; animation-delay: -12s; }
.blob-4 { width: 280px; height: 280px; background: var(--blob-lavender); top: 65%; left: 8%; animation-delay: -18s; }

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1) rotate(0); }
    33% { transform: translate(80px, 40px) scale(1.08) rotate(30deg); }
    66% { transform: translate(-40px, 80px) scale(0.95) rotate(-15deg); }
    100% { transform: translate(60px, -30px) scale(1.05) rotate(25deg); }
}

/* ==========================================================================
   MAGIC CURSOR
   ========================================================================== */
.magic-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--highlight);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px var(--highlight-glow);
    transition: transform 0.1s, opacity 0.2s, visibility 0.2s;
}

body:has(.game-area:hover) #magic-cursor {
    opacity: 0;
    visibility: hidden;
}

body:has(.game-area:hover) .sparkle {
    display: none !important;
}


.sparkle {
    position: absolute;
    width: 5px; height: 5px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .magic-cursor { display: none; }
}

/* ==========================================================================
   GLASSMORPHISM
   ========================================================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255,255,255,0.6);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8vh 0 4vh;
}

.hero-card {
    width: 100%;
    max-width: 750px;
    padding: 3.5rem 3rem;
    text-align: center;
    position: relative;
    overflow: visible;
}

@media (max-width: 600px) {
    .hero-card { padding: 2.5rem 1.5rem; }
}

.age-badge {
    position: absolute;
    top: -30px;
    right: -20px;
    width: 90px; height: 90px;
    background: linear-gradient(135deg, var(--highlight), #ff8fa3);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-family: var(--font-head);
    transform: rotate(12deg);
    box-shadow: 0 8px 25px var(--highlight-glow);
    border: 4px solid #fff;
    z-index: 5;
}

.age-badge span { font-size: 2rem; font-weight: 700; line-height: 1; }
.age-badge small { font-size: 0.7rem; font-weight: 600; }

.hero-title {
    font-family: var(--font-head);
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.word { display: inline-block; }

.hero-name {
    color: var(--highlight);
    position: relative;
}

.hero-name::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--blob-rose), var(--blob-sky), var(--blob-mint));
    border-radius: 2px;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-body);
    max-width: 460px;
    margin: 0 auto 1rem;
    line-height: 1.6;
}

.hero-mascot {
    margin-top: -1rem;
    pointer-events: none;
}

.mascot-img {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    border-radius: var(--radius);
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1));
}

.scroll-hint {
    margin-top: 3rem;
    text-align: center;
    font-family: var(--font-head);
    color: var(--text-body);
    animation: bounce 2s infinite;
}

.bounce-arrow {
    width: 18px; height: 18px;
    border-right: 3px solid var(--text-body);
    border-bottom: 3px solid var(--text-body);
    transform: rotate(45deg);
    margin: 8px auto 0;
    opacity: 0.5;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ==========================================================================
   COUNTDOWN
   ========================================================================== */
.countdown-section {
    padding: 10vh 0;
    text-align: center;
}

.section-heading {
    font-family: var(--font-head);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 2.5rem;
}

.countdown-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.orb {
    width: 130px; height: 130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow:
        0 12px 30px rgba(0,0,0,0.04),
        inset 0 0 20px rgba(255,255,255,0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.orb:hover {
    transform: scale(1.12) translateY(-8px);
}

.orb[data-color="rose"] { border-color: var(--blob-rose); }
.orb[data-color="sky"] { border-color: var(--blob-sky); }
.orb[data-color="mint"] { border-color: var(--blob-mint); }

.orb-val {
    font-family: var(--font-head);
    font-size: 2.8rem;
    line-height: 1;
    color: var(--highlight);
    font-weight: 700;
}

.orb-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.7rem;
    margin-top: 0.3rem;
    color: var(--text-body);
}

/* ==========================================================================
   BALLOON GAME
   ========================================================================== */
.game-section {
    padding: 5vh 0 10vh;
}

.game-card {
    padding: 2.5rem;
    text-align: center;
}

.game-subtitle {
    color: var(--text-body);
    margin-bottom: 1.5rem;
}

.game-area {
    position: relative;
    width: 100%;
    height: 350px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(255,255,255,0.3);
    border: 2px dashed rgba(0,0,0,0.06);
    margin-bottom: 1rem;
    cursor: default;
}

#balloon-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.game-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.game-hud {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    z-index: 4;
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
}

.hud-score { color: var(--highlight); }
.hud-timer { color: var(--text-dark); }

.game-result {
    padding: 2rem 0;
}

.game-result h3 {
    font-family: var(--font-head);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.game-result p {
    font-size: 1.1rem;
    color: var(--text-body);
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   DETAILS CARDS
   ========================================================================== */
.details-section {
    padding: 10vh 0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.detail-card {
    padding: 2.5rem;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.detail-card:hover {
    transform: translateY(-8px) rotate(0deg) !important;
}

.detail-card[data-tilt="left"] { transform: rotate(-2deg); }
.detail-card[data-tilt="right"] { transform: rotate(2.5deg); }
.detail-card[data-tilt="center"] { transform: rotate(-1deg); }

.card-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.detail-card h3 {
    font-family: var(--font-head);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.detail-accent {
    font-weight: 800;
    color: var(--highlight);
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}

.detail-card p {
    color: var(--text-body);
    line-height: 1.6;
}

.gift-tags {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.gift-tag {
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.pill-btn {
    display: inline-block;
    text-decoration: none;
    margin-top: 1.25rem;
    background: var(--highlight);
    color: #fff;
    border: none;
    padding: 0.75rem 1.8rem;
    border-radius: 50px;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 18px var(--highlight-glow);
}

.pill-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 25px var(--highlight-glow);
}

.jelly-btn {
    background: var(--text-dark);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s;
}

.jelly-btn:hover {
    transform: scale(1.05);
    background: #1a1830;
}

.jelly-btn:active {
    transform: scale(0.95);
}

.game-start-btn {
    background: linear-gradient(135deg, var(--highlight), #ff8fa3);
    font-size: 1.3rem;
    padding: 1.2rem 3rem;
    box-shadow: 0 8px 25px var(--highlight-glow);
}

/* ==========================================================================
   RSVP
   ========================================================================== */
.rsvp-section {
    padding: 5vh 0 15vh;
    display: flex;
    justify-content: center;
}

.rsvp-card {
    width: 100%;
    max-width: 550px;
    padding: 3.5rem 2.5rem;
}

.rsvp-head {
    text-align: center;
    margin-bottom: 2rem;
}

.rsvp-head h2 {
    font-family: var(--font-head);
    font-size: 1.8rem;
    color: var(--highlight);
}

.rsvp-head p {
    color: var(--text-body);
    margin-top: 0.25rem;
}

.party-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-field input, .form-field select {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.5);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.form-field input:focus, .form-field select:focus {
    transform: scale(1.02);
    border-color: var(--highlight);
    background: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.submit-party {
    width: 100%;
    margin-top: 0.5rem;
}

.rsvp-done {
    text-align: center;
    padding: 2rem 0;
}

.done-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.rsvp-done h3 {
    font-family: var(--font-head);
    font-size: 1.8rem;
    color: var(--highlight);
}

.rsvp-done p {
    color: var(--text-body);
    margin-top: 0.25rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.fun-footer {
    text-align: center;
    padding: 2rem 0;
    font-weight: 600;
}

.back-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--highlight);
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.2s;
}

.back-link:hover {
    transform: translateX(-3px);
}

/* Keep decorative animation inside the mobile viewport. */
html { overflow-x: clip; }
