* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    font-family: "Poppins", sans-serif;
    background: #05010d;
    color: white;
    overflow: hidden;
}

button,
input {
    font-family: inherit;
}

.space {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;

    background:
        radial-gradient(circle at 20% 20%, rgba(125,70,255,.25), transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(255,70,180,.18), transparent 30%),
        linear-gradient(135deg,#05010d,#100520,#05010d);
}


/* ==============================
   STARS
============================== */

.stars {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.8) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: .35;
    animation: starsMove 60s linear infinite;
    pointer-events: none;
}

.stars-2 {
    background-size: 130px 130px;
    opacity: .2;
    animation-duration: 90s;
}

.stars-3 {
    background-size: 200px 200px;
    opacity: .12;
    animation-duration: 120s;
}

@keyframes starsMove {
    to {
        transform: translate(-120px,-160px);
    }
}


/* ==============================
   ORBS
============================== */

.orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;

    box-shadow:
        inset -15px -15px 30px rgba(0,0,0,.4),
        inset 10px 10px 25px rgba(255,255,255,.2),
        0 0 60px rgba(160,100,255,.3);

    animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
    width: 140px;
    height: 140px;
    left: 7%;
    top: 18%;
    background: radial-gradient(circle at 30% 25%,#d9b8ff,#7d3cff 40%,#25005c);
}

.orb-2 {
    width: 90px;
    height: 90px;
    right: 10%;
    top: 18%;
    background: radial-gradient(circle at 30% 25%,#ffd3ed,#ff5bbd 40%,#6c003f);
    animation-delay: -2s;
}

.orb-3 {
    width: 60px;
    height: 60px;
    left: 17%;
    bottom: 15%;
    background: radial-gradient(circle at 30% 25%,#fff,#6ec8ff 40%,#123a75);
    animation-delay: -4s;
}

.orb-4 {
    width: 180px;
    height: 180px;
    right: -60px;
    bottom: -50px;
    background: radial-gradient(circle at 30% 25%,#ffc9f2,#a92cff 40%,#270047);
    opacity: .5;
    animation-delay: -6s;
}

@keyframes orbFloat {
    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-25px);
    }
}


/* ==============================
   SUBTLE FLOATING HEARTS
============================== */

#heartContainer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

.floating-heart {
    position: absolute;
    bottom: -30px;

    font-size: 12px;

    opacity: 0;

    animation:
        heartFloat linear forwards;

    filter:
        drop-shadow(0 0 6px rgba(255,150,220,.5));
}

@keyframes heartFloat {

    0% {
        transform:
            translate3d(0,0,0)
            rotate(0deg)
            scale(.7);

        opacity: 0;
    }

    10% {
        opacity: .5;
    }

    50% {
        transform:
            translate3d(25px,-50vh,0)
            rotate(15deg)
            scale(1);
    }

    90% {
        opacity: .25;
    }

    100% {
        transform:
            translate3d(-20px,-110vh,0)
            rotate(-15deg)
            scale(.8);

        opacity: 0;
    }
}


/* ==============================
   SCENES
============================== */

.scene {
    position: absolute;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 30px;

    opacity: 0;
    visibility: hidden;

    transform: scale(1.06) translateY(20px);

    transition:
        opacity .9s ease,
        transform .9s ease,
        visibility .9s ease;

    z-index: 5;
}

.scene.active {
    opacity: 1;
    visibility: visible;

    transform: scale(1) translateY(0);
}


/* ==============================
   COMMON CARDS
============================== */

.glass-card,
.message-card,
.wish-card,
.final-card,
.ending-card {

    width: min(600px,94%);

    padding: 45px 35px;

    text-align: center;

    border-radius: 30px;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.13),
            rgba(255,255,255,.035)
        );

    border: 1px solid rgba(255,255,255,.16);

    backdrop-filter: blur(18px);

    box-shadow:
        0 30px 100px rgba(0,0,0,.5),
        inset 0 1px rgba(255,255,255,.15);

    animation: cardFloat 5s ease-in-out infinite;
}

@keyframes cardFloat {

    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.small-text {
    font-size: 10px;
    letter-spacing: 4px;
    color: rgba(255,255,255,.55);
    margin-bottom: 14px;
}

h1,
h2,
h3 {
    font-family: "Cinzel", serif;
}

h1 {
    font-size: clamp(30px,6vw,50px);

    background:
        linear-gradient(90deg,#fff,#e5c4ff,#ffb8e9,#fff);

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h2 {
    font-size: clamp(27px,5vw,46px);

    background:
        linear-gradient(90deg,#fff,#e4c9ff,#ffb8e9);

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    margin-bottom: 15px;
}

.divider,
.final-divider {
    width: 80px;
    height: 1px;
    margin: 20px auto;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.8),
            transparent
        );
}

.description {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255,255,255,.68);
    margin: 20px 0;
}


/* ==============================
   DATE
============================== */

.birthday-date,
.date-card {
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
}

.birthday-date {
    padding: 17px;
    margin: 25px 0;
}

.birthday-date span,
.date-card span {
    display: block;
    font-size: 8px;
    letter-spacing: 3px;
    color: rgba(255,255,255,.5);
    margin-bottom: 7px;
}

.birthday-date strong,
.date-card strong {
    font-family: "Cinzel",serif;
    color: #f0d8ff;
    letter-spacing: 2px;
}


/* ==============================
   BUTTON
============================== */

.magic-button {
    border: none;
    padding: 14px 28px;

    border-radius: 50px;

    color: white;

    background:
        linear-gradient(135deg,#8c4dff,#d23cff);

    cursor: pointer;

    box-shadow:
        0 0 25px rgba(160,80,255,.4),
        0 10px 30px rgba(0,0,0,.3);

    transition: .25s ease;

    font-size: 13px;
}

.magic-button:hover {
    transform: translateY(-4px) scale(1.04);

    box-shadow:
        0 0 40px rgba(190,100,255,.8),
        0 15px 40px rgba(0,0,0,.4);
}

.magic-button:active {
    transform: scale(.96);
}

.hint {
    margin-top: 17px;
    font-size: 10px;
    color: rgba(255,255,255,.4);
}


/* ==============================
   PASSWORD
============================== */

.lock-icon {
    font-size: 45px;
    margin-bottom: 15px;
    animation: lockPulse 2s infinite;
}

@keyframes lockPulse {
    50% {
        transform: scale(1.08);
    }
}

.password-box {
    display: flex;
    gap: 10px;
    margin: 25px auto 10px;
    max-width: 430px;
}

.password-box input {
    flex: 1;

    border: 1px solid rgba(255,255,255,.15);
    border-radius: 30px;

    background: rgba(255,255,255,.07);

    padding: 14px 18px;

    outline: none;

    color: white;
}

.password-box input::placeholder {
    color: rgba(255,255,255,.4);
}

.password-box button {
    border: none;
    border-radius: 30px;
    padding: 0 20px;

    color: white;
    background: linear-gradient(135deg,#8c4dff,#d23cff);

    cursor: pointer;
}

#passwordMessage {
    min-height: 20px;
    font-size: 12px;
}


/* ==============================
   COUNTDOWN
============================== */

.countdown-container {
    width: min(950px,95%);
    text-align: center;
}

.countdown-top {
    font-size: 10px;
    letter-spacing: 5px;
    color: rgba(255,255,255,.5);
    margin-bottom: 15px;
}

.countdown-subtitle {
    color: rgba(255,255,255,.6);
    margin-bottom: 35px;
}

.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.time-box {
    width: 125px;
    height: 130px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    border-radius: 24px;

    background: rgba(255,255,255,.07);

    border: 1px solid rgba(255,255,255,.14);

    backdrop-filter: blur(15px);

    box-shadow: 0 20px 60px rgba(0,0,0,.35);

    animation: boxFloat 4s ease-in-out infinite;
}

.time-box span {
    font-family: "Cinzel",serif;
    font-size: 40px;
    text-shadow: 0 0 20px rgba(200,140,255,.7);
}

.time-box small {
    margin-top: 6px;
    font-size: 8px;
    letter-spacing: 3px;
    color: rgba(255,255,255,.5);
}

.colon {
    font-size: 32px;
    animation: blink 1s infinite;
}

@keyframes boxFloat {
    50% {
        transform: translateY(-9px) rotateX(5deg);
    }
}

@keyframes blink {
    50% {
        opacity: .2;
    }
}

.date-card {
    display: inline-flex;
    align-items: center;
    gap: 15px;

    padding: 13px 22px;
    margin: 30px 0;
}

.cake {
    font-size: 30px;
}


/* ==============================
   GIFT
============================== */

.gift-container {
    text-align: center;
}

.gift-subtitle {
    color: rgba(255,255,255,.6);
    margin-bottom: 25px;
}

.gift-wrapper {
    position: relative;

    width: 300px;
    height: 300px;

    margin: auto;

    perspective: 1000px;
}

.gift-box {
    position: absolute;

    width: 180px;
    height: 150px;

    left: 60px;
    top: 75px;

    transform-style: preserve-3d;

    transition: 1.2s cubic-bezier(.2,.8,.2,1);
}

.gift-body {
    position: absolute;
    width: 180px;
    height: 130px;

    bottom: 0;

    border-radius: 5px;

    background:
        linear-gradient(135deg,#a329ff,#4c087c);

    box-shadow:
        0 25px 60px rgba(170,50,255,.4);
}

.ribbon-vertical {
    position: absolute;

    width: 28px;
    height: 100%;

    left: 76px;

    background: #f7b8ed;
}

.ribbon-horizontal {
    position: absolute;

    width: 100%;
    height: 25px;

    top: 52px;

    background: #f7b8ed;
}

.gift-lid {
    position: absolute;

    width: 200px;
    height: 35px;

    left: -10px;
    top: -15px;

    z-index: 4;

    border-radius: 6px;

    background:
        linear-gradient(135deg,#d43aff,#7020a8);

    box-shadow:
        0 10px 30px rgba(210,50,255,.4);

    transition:
        transform 1.3s cubic-bezier(.2,.8,.2,1);
}

.ribbon-lid {
    position: absolute;

    width: 28px;
    height: 100%;

    left: 86px;

    background: #f7b8ed;
}

.gift-bow {
    position: absolute;

    width: 90px;
    height: 55px;

    left: 45px;
    top: -55px;

    z-index: 5;

    transition:
        transform 1.3s cubic-bezier(.2,.8,.2,1);
}

.bow-left,
.bow-right {
    position: absolute;

    width: 48px;
    height: 35px;

    background: #ffb6eb;

    border-radius: 50%;
}

.bow-left {
    transform: rotate(-25deg);
    left: 0;
}

.bow-right {
    transform: rotate(25deg);
    right: 0;
}

.bow-center {
    position: absolute;

    width: 25px;
    height: 25px;

    left: 32px;
    top: 8px;

    border-radius: 50%;

    background: #e66bd0;
}

.gift-glow {
    position: absolute;

    width: 220px;
    height: 220px;

    left: 40px;
    top: 45px;

    border-radius: 50%;

    background: rgba(205,80,255,.15);

    filter: blur(35px);

    animation: giftGlow 2.5s ease-in-out infinite;
}

@keyframes giftGlow {
    50% {
        transform: scale(1.25);
        opacity: .8;
    }
}

.gift-sparkles span {
    position: absolute;
    opacity: .5;
    animation: sparkle 2s ease-in-out infinite;
}

.gift-sparkles span:nth-child(1) {
    left: 20px;
    top: 90px;
}

.gift-sparkles span:nth-child(2) {
    right: 20px;
    top: 80px;
}

.gift-sparkles span:nth-child(3) {
    left: 45px;
    bottom: 40px;
}

.gift-sparkles span:nth-child(4) {
    right: 40px;
    bottom: 50px;
}

.gift-sparkles span:nth-child(5) {
    left: 100px;
    top: 20px;
}

.gift-sparkles span:nth-child(6) {
    right: 80px;
    top: 25px;
}

@keyframes sparkle {
    50% {
        transform: scale(1.5) rotate(90deg);
        opacity: 1;
    }
}

.gift-hint {
    color: rgba(255,255,255,.5);
    margin-bottom: 15px;
}

.gift-open .gift-lid {
    transform:
        translateY(-95px)
        rotateX(20deg)
        rotateZ(-3deg);
}

.gift-open .gift-bow {
    transform:
        translateY(-95px)
        rotateZ(-5deg);
}

.gift-open .gift-glow {
    transform: scale(1.5);
}


/* ==============================
   MESSAGE
============================== */

.message-text {
    max-width: 550px;
    margin: 20px auto;

    line-height: 1.9;

    color: rgba(255,255,255,.72);
}

.message-ending {
    font-family: "Cinzel",serif;
    color: #f0d8ff;
    margin: 25px 0;
}


/* ==============================
   WISH
============================== */

.big-cake {
    font-size: 70px;

    animation:
        cakeFloat 2s ease-in-out infinite;
}

@keyframes cakeFloat {
    50% {
        transform:
            translateY(-12px)
            rotate(4deg);
    }
}

.birthday-glow {
    font-size: 25px;
    margin: 25px;
    animation: glowText 2s infinite;
}

@keyframes glowText {
    50% {
        text-shadow: 0 0 25px #e89cff;
    }
}


/* ==============================
   MEMORIES
============================== */

.memory-container {
    width: min(1000px,95%);
    text-align: center;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 18px;

    margin: 30px 0;
}

.memory-card {
    padding: 25px 18px;

    min-height: 190px;

    border-radius: 22px;

    background: rgba(255,255,255,.07);

    border: 1px solid rgba(255,255,255,.13);

    backdrop-filter: blur(12px);

    transition: .3s;
}

.memory-card:hover {
    transform:
        translateY(-10px)
        rotateX(5deg)
        rotateY(-5deg);

    box-shadow:
        0 20px 50px rgba(160,70,255,.25);
}

.memory-card span {
    font-size: 10px;
    letter-spacing: 3px;
    color: rgba(255,255,255,.4);
}

.memory-card h3 {
    margin: 15px 0;
    color: #f0d8ff;
}

.memory-card p {
    font-size: 12px;
    line-height: 1.7;
    color: rgba(255,255,255,.6);
}


/* ==============================
   HEART SCENE
============================== */

.heart-scene {
    text-align: center;
}

.heart-3d {
    font-size: 130px;

    margin: 20px;

    animation:
        heartBeat 1.5s infinite;

    filter:
        drop-shadow(0 0 30px rgba(255,130,220,.8));
}

@keyframes heartBeat {
    0%,100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }
}


/* ==============================
   PORTAL
============================== */

.portal {
    position: relative;

    width: 170px;
    height: 170px;

    margin: 0 auto 25px;
}

.portal-ring {
    position: absolute;
    inset: 0;

    border: 2px solid rgba(220,150,255,.7);

    border-radius: 50%;

    box-shadow:
        0 0 30px rgba(180,90,255,.6);

    animation:
        portalSpin 5s linear infinite;
}

.ring2 {
    inset: 20px;

    border-style: dashed;

    animation-direction: reverse;
}

.portal-core {
    position: absolute;

    inset: 55px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        radial-gradient(circle,#fff,#b05cff 35%,#26004e);

    box-shadow:
        0 0 50px rgba(190,100,255,.8);
}

@keyframes portalSpin {
    to {
        transform: rotate(360deg);
    }
}

.special-text {
    font-family: "Cinzel",serif;
    font-size: 25px;
    line-height: 1.6;
}

.floating-stars {
    margin: 25px;
    opacity: .7;
}


/* ==============================
   ENDING
============================== */

.ending-card {
    width: min(650px,94%);
}

.ending-heart {
    font-size: 65px;

    animation:
        heartBeat 1.5s infinite;
}

.coming-text {
    font-family: "Cinzel",serif;
    font-size: 23px;
    margin: 20px;
}

.coming-text strong {
    color: #e8c5ff;
}

.ready-text {
    font-size: 16px;
    color: rgba(255,255,255,.7);
}

.final-emojis {
    margin: 30px;
    font-size: 20px;
}

.final-note {
    font-size: 11px;
    color: rgba(255,255,255,.4);
}

.signature {
    margin-top: 25px;
    font-family: "Cinzel",serif;
    color: #f1d8ff;
}


/* ==============================
   FOOTER
============================== */

footer {
    position: absolute;

    bottom: 14px;
    left: 0;

    width: 100%;

    text-align: center;

    font-size: 9px;

    color: rgba(255,255,255,.3);

    letter-spacing: 1px;

    z-index: 20;
}


/* ==============================
   MOBILE
============================== */

@media(max-width:700px) {

    .scene {
        padding: 18px;
        overflow-y: auto;
    }

    .glass-card,
    .message-card,
    .wish-card,
    .final-card,
    .ending-card {
        padding: 35px 22px;
    }

    .countdown {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .colon {
        display: none;
    }

    .time-box {
        width: 100%;
        height: 100px;
    }

    .time-box span {
        font-size: 30px;
    }

    .memory-grid {
        grid-template-columns: 1fr;
    }

    .memory-card {
        min-height: auto;
    }

    .password-box {
        flex-direction: column;
    }

    .password-box button {
        padding: 12px;
    }

    .orb-1 {
        width: 80px;
        height: 80px;
        left: -25px;
    }

    .orb-2 {
        width: 60px;
        height: 60px;
        right: -15px;
    }
}