* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pink: #ff7eb6;
    --pink-light: #ffc1db;
    --purple: #bc8cff;
    --purple-dark: #6d47ff;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, .66);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow: hidden;
    font-family: "Tajawal", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 50% 120%, #42204f 0%, transparent 45%),
        #07050b;
}

/* =========================
   BACKGROUND
========================= */

.background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}

.orb {
    position: absolute;
    border-radius: 50%;
    opacity: .3;
    filter: blur(78px);
    transform: translate3d(0, 0, 0);
    animation: orbMove 14s ease-in-out infinite alternate;
    will-change: transform;
}

.orb-1 {
    width: 520px;
    height: 520px;
    background: #ff50a4;
    top: -220px;
    right: -170px;
}

.orb-2 {
    width: 610px;
    height: 610px;
    background: #713cff;
    left: -250px;
    bottom: -290px;
    animation-delay: -4s;
}

.orb-3 {
    width: 280px;
    height: 280px;
    background: #ff9ec7;
    left: 48%;
    top: 38%;
    opacity: .11;
    animation-delay: -8s;
}

@keyframes orbMove {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(60px, 45px, 0) scale(1.12);
    }
}

.grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black, transparent 75%);
}

.noise {
    position: absolute;
    inset: 0;
    opacity: .03;
    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

/* =========================
   CURSOR GLOW
========================= */

.cursor-glow {
    position: fixed;
    left: 0;
    top: 0;
    width: 430px;
    height: 430px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    background:
        radial-gradient(
            circle,
            rgba(255, 111, 174, .13) 0%,
            rgba(136, 77, 255, .05) 35%,
            transparent 70%
        );
    transition: none;
    transform: translate3d(-9999px, -9999px, 0);
    will-change: transform;
    contain: layout paint style;
}

/* =========================
   PARTICLES + HEARTS
========================= */

.particles,
.floating-hearts {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
    contain: strict;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    box-shadow: 0 0 8px rgba(255, 255, 255, .55);
    animation: particleFloat linear infinite;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
}

@keyframes particleFloat {
    0% {
        transform: translate3d(0, 20vh, 0) scale(.5);
        opacity: 0;
    }

    20% {
        opacity: .45;
    }

    80% {
        opacity: .25;
    }

    100% {
        transform: translate3d(0, -120vh, 0) scale(1.15);
        opacity: 0;
    }
}

.float-heart {
    position: absolute;
    bottom: -80px;
    color: rgba(255, 163, 204, .22);
    user-select: none;
    animation: heartFloat linear infinite;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
}

@keyframes heartFloat {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: .28;
    }

    100% {
        transform: translate3d(0, -120vh, 0) rotate(40deg);
        opacity: 0;
    }
}

/* =========================
   INTRO
========================= */

.intro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #07050b;
    transition: opacity .7s ease, visibility .7s ease;
}

.intro.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-content {
    text-align: center;
    animation: introAppear .8s ease forwards;
}

.intro-content p {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    letter-spacing: 3px;
}

.intro-content h1 {
    margin-top: 8px;
    font-size: clamp(42px, 8vw, 80px);
    font-weight: 900;
    color: transparent;
    background:
        linear-gradient(120deg, #fff, #ffd5e8, #c4a3ff);
    background-clip: text;
    -webkit-background-clip: text;
}

.tiny-heart {
    display: block;
    margin-bottom: 15px;
    font-size: 30px;
    color: var(--pink);
    animation: heartbeat 1.4s ease infinite;
}

.intro-line {
    width: 0;
    height: 1px;
    margin: 18px auto;
    background:
        linear-gradient(90deg, transparent, var(--pink), transparent);
    animation: lineOpen 1.3s .3s ease forwards;
}

@keyframes lineOpen {
    to {
        width: 220px;
    }
}

@keyframes introAppear {
    from {
        opacity: 0;
        transform: translate3d(0, 15px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* =========================
   PAGE
========================= */

.main-container {
    position: relative;
    min-height: 100vh;
    z-index: 5;
}

.screen {
    position: absolute;
    inset: 0;
    min-height: 100vh;
    padding: 40px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, 0, 0) scale(.97);
    transition:
        opacity .65s ease,
        transform .75s cubic-bezier(.16, 1, .3, 1),
        filter .65s ease,
        visibility .65s ease;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0) scale(1);
}

.screen.leaving {
    opacity: 0;
    transform: translate3d(0, -14px, 0) scale(1.04);
    filter: blur(7px);
}

/* =========================
   TOP LABEL
========================= */

.top-label {
    display: flex;
    gap: 9px;
    align-items: center;
    direction: ltr;
    margin-bottom: 16px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, .4);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pink);
    box-shadow: 0 0 10px var(--pink);
    animation: blink 2s infinite;
}

@keyframes blink {
    50% {
        opacity: .3;
    }
}

/* =========================
   LOVE CARD
========================= */

.love-card {
    position: relative;
    width: min(920px, 100%);
    min-height: 520px;
    display: grid;
    grid-template-columns: 43% 57%;
    overflow: hidden;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, .11);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .095), rgba(255, 255, 255, .025));
    box-shadow:
        0 36px 100px rgba(0, 0, 0, .5),
        inset 0 1px 0 rgba(255, 255, 255, .07),
        0 0 70px rgba(255, 82, 164, .06);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    animation: cardFloat 5s ease-in-out infinite;
    transform: translate3d(0, 0, 0);
}

@keyframes cardFloat {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(0, -6px, 0);
    }
}

.shine {
    position: absolute;
    width: 260px;
    height: 820px;
    left: -420px;
    top: -140px;
    z-index: 20;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, .035), transparent);
    transform: rotate(28deg);
    animation: shine 7s infinite;
}

@keyframes shine {
    0%,
    72% {
        left: -420px;
    }

    100% {
        left: 130%;
    }
}

/* =========================
   PHOTO
========================= */

.photo-section {
    padding: 17px;
}

.photo-frame {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 485px;
    overflow: hidden;
    border-radius: 25px;
    background:
        radial-gradient(circle at 50% 35%, #66305d, #251329 55%, #120b16);
}

.photo-frame img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 5s ease;
    transform: translate3d(0, 0, 0) scale(1);
}

.love-card:hover .photo-frame img {
    transform: translate3d(0, 0, 0) scale(1.035);
}

.photo-placeholder,
.birthday-placeholder {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 90px;
    color: rgba(255, 255, 255, .08);
}

.photo-gradient {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        linear-gradient(to top, rgba(10, 5, 13, .75), transparent 50%);
}

.photo-badge {
    position: absolute;
    bottom: 19px;
    left: 19px;
    z-index: 5;
    direction: ltr;
    padding: 8px 13px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(10, 7, 15, .36);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 11px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, .77);
}

/* =========================
   QUESTION CONTENT
========================= */

.question-content {
    padding: 60px 55px 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.eyebrow {
    padding: 7px 13px;
    margin-bottom: 24px;
    border-radius: 100px;
    font-size: 11px;
    color: #ffc1df;
    border: 1px solid rgba(255, 126, 182, .16);
    background: rgba(255, 107, 174, .08);
}

.question-content h1 {
    font-size: clamp(34px, 5vw, 57px);
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -2px;
}

.question-content h1 span {
    display: inline-block;
    margin-top: 5px;
    color: transparent;
    background:
        linear-gradient(90deg, #fff, #ffb5d5, #c3a3ff);
    background-size: 200%;
    background-clip: text;
    -webkit-background-clip: text;
    animation: textGradient 5s linear infinite;
}

@keyframes textGradient {
    to {
        background-position: 200%;
    }
}

.subtitle {
    margin-top: 18px;
    line-height: 1.9;
    font-size: 14px;
    color: var(--muted);
}

/* =========================
   BUTTONS
========================= */

.buttons-area {
    position: relative;
    width: 100%;
    min-height: 105px;
    margin-top: 28px;
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

button {
    font-family: inherit;
}

.yes-btn {
    position: relative;
    width: 145px;
    height: 57px;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    cursor: pointer;
    color: #fff;
    background:
        linear-gradient(120deg, #ff5ca4, #be6cff);
    box-shadow:
        0 13px 35px rgba(255, 77, 164, .24);
    transition:
        transform .28s cubic-bezier(.16, 1, .3, 1),
        box-shadow .28s ease;
    transform: translate3d(0, 0, 0);
}

.yes-btn:hover {
    transform: translate3d(0, -4px, 0) scale(1.05);
    box-shadow:
        0 18px 42px rgba(255, 77, 164, .38);
}

.yes-btn:active {
    transform: translate3d(0, 0, 0) scale(.96);
}

.yes-glow {
    position: absolute;
    width: 60px;
    height: 130px;
    top: -40px;
    left: -100px;
    transform: rotate(25deg);
    background: rgba(255, 255, 255, .24);
    filter: blur(8px);
    animation: yesShine 3s infinite;
}

@keyframes yesShine {
    60%,
    100% {
        left: 180%;
    }
}

.button-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;
}

.button-icon {
    font-size: 19px;
    animation: heartbeat 1.3s infinite;
}

@keyframes heartbeat {
    0%,
    100% {
        transform: scale(1);
    }

    20% {
        transform: scale(1.25);
    }

    40% {
        transform: scale(1);
    }

    60% {
        transform: scale(1.15);
    }
}

/* =========================
   NO BUTTON
========================= */

.no-btn {
    position: relative;
    z-index: 100;
    width: 125px;
    height: 57px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .13);
    background: rgba(255, 255, 255, .045);
    color: rgba(255, 255, 255, .78);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background .2s ease, border-color .2s ease;
}

.no-btn:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 150, 200, .28);
}

.no-btn.runaway {
    position: fixed;
    margin: 0;
    z-index: 9998;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    transition:
        left .22s cubic-bezier(.22, 1, .36, 1),
        top .22s cubic-bezier(.22, 1, .36, 1),
        transform .2s cubic-bezier(.22, 1, .36, 1),
        background .2s ease;
    will-change: left, top, transform;
}

.no-btn.teasing {
    box-shadow: 0 0 24px rgba(255, 100, 170, .18);
}

/* =========================
   HINTS
========================= */

.hint {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    color: rgba(255, 255, 255, .27);
}

.hint span {
    color: rgba(255, 167, 205, .45);
}

.bottom-note {
    direction: ltr;
    margin-top: 17px;
    font-size: 8px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, .18);
}

/* =========================
   BIRTHDAY
========================= */

.birthday-card {
    position: relative;
    width: min(820px, 100%);
    max-height: calc(100vh - 70px);
    display: grid;
    grid-template-columns: 45% 55%;
    overflow: hidden;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, .13);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .035));
    box-shadow:
        0 36px 100px rgba(0, 0, 0, .52),
        0 0 90px rgba(255, 95, 167, .1);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.birthday-light {
    position: absolute;
    width: 300px;
    height: 300px;
    right: -150px;
    top: -150px;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(255, 100, 172, .18);
    filter: blur(75px);
}

.birthday-photo {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    background:
        radial-gradient(circle at center, #643054, #1a0d1d);
}

.birthday-photo img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate3d(0, 0, 0) scale(1.08);
}

.birthday-screen.active .birthday-photo img {
    animation: birthdayPhoto 8s ease forwards;
}

@keyframes birthdayPhoto {
    from {
        transform: translate3d(0, 0, 0) scale(1.08);
    }

    to {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.birthday-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background:
        linear-gradient(to top, rgba(8, 4, 12, .75), transparent 65%);
}

.birthday-date {
    position: absolute;
    z-index: 4;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 9px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, .58);
}

.birthday-content {
    padding: 60px 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.mini-title {
    direction: ltr;
    margin-bottom: 17px;
    font-size: 9px;
    letter-spacing: 4px;
    color: #ffaed1;
}

.birthday-content h1 {
    direction: ltr;
    font-size: clamp(38px, 5vw, 60px);
    line-height: .95;
    font-weight: 900;
    letter-spacing: -3px;
}

.birthday-content h1 span {
    display: block;
    margin-top: 12px;
    color: transparent;
    background:
        linear-gradient(100deg, #ff8cbd, #fff, #c5a4ff, #ff8cbd);
    background-size: 300%;
    background-clip: text;
    -webkit-background-clip: text;
    animation: textGradient 5s linear infinite;
}

.heart-divider {
    width: 100%;
    margin: 30px 0 23px;
    display: flex;
    gap: 13px;
    align-items: center;
    justify-content: center;
    color: var(--pink);
}

.heart-divider span {
    width: 65px;
    height: 1px;
    background:
        linear-gradient(90deg, transparent, rgba(255, 160, 205, .5));
}

.heart-divider span:last-child {
    transform: rotate(180deg);
}

.birthday-message {
    max-width: 430px;
    font-size: 14px;
    line-height: 2;
    color: rgba(255, 255, 255, .76);
}

.signature {
    margin-top: 22px;
    font-size: 11px;
    color: rgba(255, 183, 215, .58);
}

.birthday-footer {
    direction: ltr;
    margin-top: 36px;
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 8px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, .26);
}

/* =========================
   CONFETTI
========================= */

.confetti {
    position: fixed;
    top: -30px;
    z-index: 99999;
    border-radius: 2px;
    pointer-events: none;
    animation: confettiFall linear forwards;
    will-change: transform, opacity;
}

@keyframes confettiFall {
    from {
        transform: translate3d(0, -20px, 0) rotate(0deg);
        opacity: 1;
    }

    to {
        transform: translate3d(0, 110vh, 0) rotate(720deg);
        opacity: 0;
    }
}

/* =========================
   CLICK HEARTS
========================= */

.click-heart {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    font-size: 25px;
    animation: clickHeart .9s ease forwards;
    will-change: transform, opacity;
}

@keyframes clickHeart {
    from {
        opacity: 1;
        transform: translate3d(-50%, -50%, 0) scale(.3);
    }

    to {
        opacity: 0;
        transform: translate3d(-50%, -140px, 0) scale(1.6) rotate(20deg);
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 750px) {
    body {
        overflow-y: auto;
    }

    .screen {
        min-height: 100svh;
        padding: 25px 15px;
    }

    .love-card,
    .birthday-card {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .love-card {
        width: min(450px, 100%);
        animation: none;
    }

    .photo-section {
        padding: 12px 12px 0;
    }

    .photo-frame {
        min-height: 245px;
        max-height: 290px;
    }

    .question-content {
        padding: 34px 25px 30px;
    }

    .question-content h1 {
        font-size: 39px;
    }

    .birthday-card {
        width: min(450px, 100%);
    }

    .birthday-photo {
        min-height: 280px;
        max-height: 310px;
    }

    .birthday-content {
        padding: 38px 27px;
    }

    .birthday-content h1 {
        font-size: 44px;
    }

    .cursor-glow {
        display: none;
    }
}

/* يحافظ على التأثيرات الأساسية، ويخفف الحركات الثقيلة فقط للمستخدم الذي طلب ذلك من النظام */
@media (prefers-reduced-motion: reduce) {
    .orb,
    .particle,
    .float-heart,
    .shine,
    .tiny-heart,
    .button-icon,
    .yes-glow,
    .love-card {
        animation: none !important;
    }
}

/* =========================================================
   EXTRA BIRTHDAY JOURNEY + 10 ROMANTIC MINI GAMES
   ========================================================= */

.continue-surprise-btn {
    margin-top: 24px;
    width: min(270px, 100%);
    min-height: 66px;
    padding: 12px 18px;
    border: 1px solid rgba(255, 164, 205, .2);
    border-radius: 20px;
    color: #fff;
    background:
        linear-gradient(120deg, rgba(255, 92, 164, .16), rgba(188, 108, 255, .13));
    box-shadow:
        0 15px 36px rgba(0, 0, 0, .24),
        inset 0 1px 0 rgba(255, 255, 255, .05);
    cursor: pointer;
    transition:
        transform .25s cubic-bezier(.16, 1, .3, 1),
        border-color .25s ease,
        background .25s ease;
}

.continue-surprise-btn:hover {
    transform: translate3d(0, -3px, 0);
    border-color: rgba(255, 178, 214, .38);
    background:
        linear-gradient(120deg, rgba(255, 92, 164, .24), rgba(188, 108, 255, .2));
}

.continue-surprise-btn span {
    display: block;
    font-size: 14px;
    font-weight: 800;
}

.continue-surprise-btn small {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, .46);
    font-size: 10px;
    font-weight: 500;
}

.games-screen {
    overflow: hidden;
}

.games-shell {
    width: min(900px, 100%);
    max-height: calc(100svh - 58px);
    padding: 28px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 139, 190, .28) transparent;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 32px;
    background:
        radial-gradient(circle at 95% 0%, rgba(255, 102, 171, .11), transparent 26%),
        linear-gradient(145deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .025));
    box-shadow:
        0 32px 90px rgba(0, 0, 0, .48),
        inset 0 1px 0 rgba(255, 255, 255, .055);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.games-shell::-webkit-scrollbar {
    width: 7px;
}

.games-shell::-webkit-scrollbar-thumb {
    border-radius: 100px;
    background: rgba(255, 139, 190, .25);
}

.games-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.games-head-copy {
    min-width: 0;
}

.games-kicker {
    display: block;
    direction: ltr;
    margin-bottom: 7px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #ffa8d0;
}

.games-head h2 {
    font-size: clamp(25px, 4vw, 38px);
    font-weight: 900;
    letter-spacing: -.8px;
}

.games-head p {
    margin-top: 5px;
    color: rgba(255, 255, 255, .5);
    font-size: 12px;
    line-height: 1.7;
}

.game-counter {
    direction: ltr;
    flex: 0 0 auto;
    min-width: 78px;
    padding: 10px 13px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 16px;
    background: rgba(255, 255, 255, .035);
}

.game-counter strong {
    font-size: 22px;
    color: #ffacd0;
}

.game-counter span {
    margin-left: 3px;
    color: rgba(255, 255, 255, .35);
    font-size: 11px;
}

.games-progress {
    height: 5px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 100px;
    background: rgba(255, 255, 255, .05);
}

.games-progress span {
    display: block;
    width: 10%;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(90deg, #ff70af, #be79ff);
    box-shadow: 0 0 18px rgba(255, 92, 164, .3);
    transition: width .5s cubic-bezier(.16, 1, .3, 1);
}

.game-stage {
    position: relative;
    min-height: 390px;
    margin-top: 20px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .085);
    border-radius: 25px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 120, 180, .06), transparent 34%),
        rgba(5, 3, 8, .28);
}

.game-intro {
    max-width: 560px;
    margin: 42px auto 0;
    text-align: center;
}

.game-intro-icon {
    display: grid;
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    place-items: center;
    border: 1px solid rgba(255, 151, 200, .18);
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(255, 108, 176, .11), rgba(188, 108, 255, .08));
    font-size: 32px;
    box-shadow: 0 17px 45px rgba(0, 0, 0, .22);
}

.game-intro h3 {
    font-size: 27px;
    font-weight: 900;
}

.game-intro p {
    margin-top: 9px;
    color: rgba(255, 255, 255, .54);
    line-height: 1.8;
    font-size: 13px;
}

.primary-game-btn {
    min-width: 165px;
    min-height: 49px;
    margin-top: 21px;
    padding: 10px 19px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background:
        linear-gradient(120deg, #ff5ca4, #a96cff);
    box-shadow: 0 13px 33px rgba(255, 80, 166, .2);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    transition:
        transform .2s cubic-bezier(.16, 1, .3, 1),
        box-shadow .2s ease;
}

.primary-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(255, 80, 166, .28);
}

.game-bottom {
    min-height: 58px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.game-status {
    min-width: 0;
    color: rgba(255, 255, 255, .54);
    font-size: 12px;
}

.game-status.success {
    color: #ffb9d8;
}

.next-game-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 163, 205, .2);
    border-radius: 15px;
    color: #fff;
    background: rgba(255, 114, 177, .11);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    transition:
        transform .2s ease,
        background .2s ease;
}

.next-game-btn:hover {
    transform: translateX(-3px);
    background: rgba(255, 114, 177, .18);
}

.next-game-btn span {
    margin-right: 6px;
}

/* GAME 1 — HEART HUNT */

.heart-hunt-wrap {
    text-align: center;
}

.hunt-topline,
.memory-topline,
.reaction-topline,
.stars-topline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 13px;
    color: rgba(255, 255, 255, .47);
    font-size: 11px;
}

.heart-hunt-area {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .06);
    background:
        radial-gradient(circle at center, rgba(255, 119, 181, .08), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, .015), rgba(255, 255, 255, .03));
}

.hunt-heart {
    position: absolute;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 169, 209, .2);
    border-radius: 18px;
    color: #ff93c2;
    background: rgba(255, 112, 177, .09);
    box-shadow: 0 10px 27px rgba(255, 72, 157, .14);
    cursor: pointer;
    font-size: 26px;
    animation: huntPop .2s cubic-bezier(.16, 1, .3, 1);
}

@keyframes huntPop {
    from {
        opacity: 0;
        transform: scale(.4) rotate(-18deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

/* GAME 2 — MEMORY */

.memory-grid {
    max-width: 610px;
    margin: 5px auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.memory-card {
    position: relative;
    aspect-ratio: 1 / .86;
    border: 0;
    border-radius: 17px;
    color: transparent;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025));
    cursor: pointer;
    font-size: 24px;
    transform: translateZ(0);
    transition:
        transform .25s cubic-bezier(.16, 1, .3, 1),
        background .25s ease,
        color .2s ease;
}

.memory-card::before {
    content: "♡";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 158, 201, .35);
    font-size: 21px;
    transition: opacity .18s ease;
}

.memory-card.open,
.memory-card.matched {
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255, 105, 173, .17), rgba(180, 113, 255, .12));
    transform: translateY(-2px);
}

.memory-card.open::before,
.memory-card.matched::before {
    opacity: 0;
}

.memory-card.matched {
    box-shadow: inset 0 0 0 1px rgba(255, 166, 207, .18);
}

/* GAME 3 — CHOICES */

.choice-wrap {
    max-width: 650px;
    margin: 18px auto 0;
    text-align: center;
}

.choice-question-count {
    color: rgba(255, 255, 255, .34);
    font-size: 10px;
    letter-spacing: 2px;
}

.choice-wrap h3 {
    margin-top: 15px;
    font-size: clamp(23px, 4vw, 31px);
    line-height: 1.35;
}

.choice-options {
    margin-top: 26px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.choice-option {
    min-height: 110px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    color: #fff;
    background: rgba(255, 255, 255, .035);
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    transition:
        transform .2s cubic-bezier(.16, 1, .3, 1),
        border-color .2s ease,
        background .2s ease;
}

.choice-option:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 149, 199, .25);
    background: rgba(255, 109, 174, .08);
}

.choice-summary {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.choice-chip {
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 100px;
    color: rgba(255, 255, 255, .64);
    background: rgba(255, 255, 255, .03);
    font-size: 10px;
}

/* GAME 4 — REACTION */

.reaction-wrap {
    max-width: 600px;
    margin: 15px auto 0;
    text-align: center;
}

.reaction-arena {
    height: 250px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 22px;
    background:
        radial-gradient(circle, rgba(255, 92, 164, .06), transparent 48%),
        rgba(255, 255, 255, .015);
}

.reaction-heart {
    width: 95px;
    height: 95px;
    border: 0;
    border-radius: 32px;
    color: #ff91c2;
    background:
        linear-gradient(145deg, rgba(255, 98, 169, .14), rgba(181, 107, 255, .1));
    box-shadow: 0 20px 50px rgba(255, 82, 165, .17);
    cursor: pointer;
    font-size: 50px;
    animation: reactionPulse .7s ease infinite alternate;
}

@keyframes reactionPulse {
    to {
        transform: scale(1.08);
        box-shadow: 0 24px 60px rgba(255, 82, 165, .25);
    }
}

.reaction-wait {
    color: rgba(255, 255, 255, .47);
    font-size: 13px;
}

/* GAME 5 — SIMON */

.simon-wrap {
    max-width: 540px;
    margin: 8px auto 0;
    text-align: center;
}

.simon-info {
    margin-bottom: 14px;
    color: rgba(255, 255, 255, .48);
    font-size: 11px;
}

.simon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}

.simon-pad {
    min-height: 120px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 22px;
    color: rgba(255, 255, 255, .7);
    background: rgba(255, 255, 255, .03);
    cursor: pointer;
    font-size: 31px;
    transition:
        transform .14s ease,
        background .14s ease,
        box-shadow .14s ease;
}

.simon-pad.active {
    transform: scale(.96);
    background: rgba(255, 113, 178, .18);
    box-shadow:
        inset 0 0 0 1px rgba(255, 177, 213, .22),
        0 0 30px rgba(255, 100, 172, .16);
}

/* GAME 6 — SENTENCE */

.sentence-wrap {
    max-width: 720px;
    margin: 12px auto 0;
    text-align: center;
}

.memorize-box {
    min-height: 170px;
    display: grid;
    place-items: center;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 22px;
    background: rgba(255, 255, 255, .025);
}

.memorize-box strong {
    font-size: clamp(23px, 4vw, 34px);
    line-height: 1.7;
}

.sentence-answer {
    min-height: 76px;
    margin-top: 12px;
    padding: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px dashed rgba(255, 159, 202, .16);
    border-radius: 18px;
    color: rgba(255, 255, 255, .28);
    font-size: 11px;
}

.sentence-pool {
    margin-top: 13px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.word-chip {
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 13px;
    color: rgba(255, 255, 255, .75);
    background: rgba(255, 255, 255, .04);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.word-chip:disabled {
    opacity: .22;
    cursor: default;
}

.sentence-reset {
    margin-top: 12px;
    border: 0;
    color: rgba(255, 255, 255, .42);
    background: transparent;
    cursor: pointer;
    font-size: 10px;
}

/* GAME 7 — BOUQUET */

.bouquet-wrap {
    max-width: 650px;
    margin: 6px auto 0;
    text-align: center;
}

.bouquet-preview {
    min-height: 150px;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 1px;
    font-size: 46px;
}

.bouquet-preview span {
    animation: flowerIn .3s cubic-bezier(.16, 1, .3, 1);
}

@keyframes flowerIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.5);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.flower-picker {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
}

.flower-btn {
    min-height: 70px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
    cursor: pointer;
    font-size: 28px;
    transition: transform .18s ease, background .18s ease;
}

.flower-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 122, 183, .08);
}

.flower-btn.used {
    opacity: .25;
    cursor: default;
}

/* GAME 8 — ENVELOPES */

.envelope-grid {
    max-width: 680px;
    margin: 17px auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.envelope {
    min-height: 112px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 18px;
    color: rgba(255, 255, 255, .78);
    background: rgba(255, 255, 255, .03);
    cursor: pointer;
    font-size: 13px;
    line-height: 1.65;
    transition: transform .22s ease, background .22s ease;
}

.envelope:hover {
    transform: translateY(-2px);
}

.envelope.revealed {
    background:
        linear-gradient(145deg, rgba(255, 104, 173, .13), rgba(184, 111, 255, .08));
}

.envelope .closed {
    display: block;
    font-size: 28px;
}

.envelope.revealed .closed {
    display: none;
}

/* GAME 9 — STARS */

.stars-wrap {
    text-align: center;
}

.stars-area {
    position: relative;
    height: 300px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 22px;
    background:
        radial-gradient(circle at 40% 30%, rgba(182, 124, 255, .08), transparent 32%),
        radial-gradient(circle at 70% 70%, rgba(255, 98, 171, .06), transparent 34%),
        rgba(4, 3, 8, .32);
}

.star-button {
    position: absolute;
    width: 42px;
    height: 42px;
    border: 0;
    color: rgba(255, 229, 244, .82);
    background: transparent;
    cursor: pointer;
    font-size: 25px;
    text-shadow: 0 0 13px rgba(255, 154, 202, .4);
    animation: starTwinkle 1.5s ease infinite alternate;
}

@keyframes starTwinkle {
    to {
        opacity: .45;
        transform: scale(.82);
    }
}

/* GAME 10 — HOLD HEART */

.hold-wrap {
    max-width: 540px;
    margin: 12px auto 0;
    text-align: center;
}

.hold-heart-shell {
    position: relative;
    width: 190px;
    height: 190px;
    margin: 25px auto 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(#ff75b2 0deg, rgba(255, 255, 255, .06) 0deg);
    box-shadow: 0 25px 70px rgba(255, 76, 162, .12);
}

.hold-heart-shell::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: #100b13;
}

.hold-heart-btn {
    position: relative;
    z-index: 2;
    width: 144px;
    height: 144px;
    border: 0;
    border-radius: 50%;
    color: #ff8ebe;
    background:
        radial-gradient(circle, rgba(255, 114, 177, .12), rgba(255, 255, 255, .025));
    cursor: pointer;
    touch-action: none;
    user-select: none;
    font-size: 67px;
    transition: transform .15s ease;
}

.hold-heart-btn.holding {
    transform: scale(.96);
}

.hold-copy {
    margin-top: 18px;
    color: rgba(255, 255, 255, .47);
    font-size: 12px;
}

.hold-seconds {
    margin-top: 6px;
    color: #ffb3d5;
    font-size: 11px;
}

/* FINAL */

.final-screen {
    overflow-y: auto;
}

.final-card {
    width: min(720px, 100%);
    padding: 54px 48px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 34px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 97, 169, .14), transparent 33%),
        linear-gradient(145deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .025));
    box-shadow:
        0 34px 100px rgba(0, 0, 0, .5),
        inset 0 1px 0 rgba(255, 255, 255, .06);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.final-sparkle {
    display: block;
    color: #ff9ac8;
    font-size: 24px;
    animation: heartbeat 1.4s ease infinite;
}

.final-mini {
    margin-top: 12px;
    direction: ltr;
    font-size: 8px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, .34);
}

.final-card h1 {
    margin-top: 7px;
    font-size: clamp(49px, 8vw, 76px);
    font-weight: 900;
    color: transparent;
    background:
        linear-gradient(100deg, #fff, #ff9bc8, #c2a4ff, #fff);
    background-size: 250%;
    background-clip: text;
    -webkit-background-clip: text;
    animation: textGradient 5s linear infinite;
}

.final-lead {
    max-width: 560px;
    margin: 15px auto 0;
    color: rgba(255, 255, 255, .65);
    line-height: 1.9;
    font-size: 14px;
}

.final-letter {
    max-width: 590px;
    margin: 26px auto 0;
    padding: 23px;
    border: 1px solid rgba(255, 166, 207, .1);
    border-radius: 21px;
    background: rgba(255, 255, 255, .025);
}

.final-letter p {
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
    line-height: 2;
}

.final-letter p + p {
    margin-top: 13px;
}

.final-heart-btn {
    width: 73px;
    height: 73px;
    margin-top: 25px;
    border: 1px solid rgba(255, 160, 204, .19);
    border-radius: 50%;
    color: #ff8fbe;
    background: rgba(255, 104, 173, .08);
    cursor: pointer;
    font-size: 34px;
    transition: transform .22s cubic-bezier(.16, 1, .3, 1);
}

.final-heart-btn:hover {
    transform: scale(1.08);
}

.final-note {
    display: block;
    margin-top: 9px;
    color: rgba(255, 255, 255, .31);
    font-size: 9px;
}

/* Small completion burst */

.mini-burst {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    animation: miniBurst .75s ease-out forwards;
    font-size: 18px;
}

@keyframes miniBurst {
    from {
        opacity: 1;
        transform: translate3d(-50%, -50%, 0) scale(.5);
    }

    to {
        opacity: 0;
        transform: translate3d(var(--bx), var(--by), 0) scale(1.2) rotate(var(--br));
    }
}

@media (max-width: 750px) {
    .birthday-content {
        padding: 34px 25px 31px;
    }

    .birthday-footer {
        margin-top: 24px;
    }

    .games-screen {
        padding: 14px;
    }

    .games-shell {
        max-height: calc(100svh - 28px);
        padding: 18px;
        border-radius: 26px;
    }

    .games-head {
        gap: 12px;
    }

    .game-counter {
        min-width: 65px;
        padding: 8px 10px;
    }

    .game-stage {
        min-height: 420px;
        padding: 15px;
    }

    .memory-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .memory-card {
        aspect-ratio: 1 / .75;
    }

    .choice-options {
        grid-template-columns: 1fr;
    }

    .choice-option {
        min-height: 75px;
    }

    .flower-picker {
        grid-template-columns: repeat(4, 1fr);
    }

    .envelope-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .next-game-btn {
        width: 100%;
    }

    .final-card {
        padding: 38px 24px;
    }
}

@media (max-width: 450px) {
    .games-head p {
        font-size: 11px;
    }

    .game-stage {
        min-height: 445px;
    }

    .heart-hunt-area,
    .stars-area {
        height: 315px;
    }

    .simon-pad {
        min-height: 100px;
    }

    .envelope {
        min-height: 100px;
        font-size: 11px;
    }

    .bouquet-preview {
        min-height: 130px;
        font-size: 41px;
    }

    .hold-heart-shell {
        width: 170px;
        height: 170px;
    }

    .hold-heart-btn {
        width: 128px;
        height: 128px;
        font-size: 59px;
    }
}

/* No runaway button survives beyond page 1 */
body.after-yes .no-btn,
body.after-yes #noBtn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
