* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #08050c;
    --pink: #ff4f83;
    --pink-light: #ffabc5;
    --purple: #a855f7;
    --gold: #ffd166;
    --text: #ffffff;
    --muted: #cdb0bc;
    --dim: #80616e;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family:
        "Segoe UI",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    overflow-x: hidden;
}

button {
    font-family: inherit;
}

button:focus-visible {
    outline: 3px solid white;
    outline-offset: 5px;
}

#app {
    min-height: 100vh;
    overflow: hidden;
}

#particle-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

#flash-overlay {
    position: fixed;
    inset: 0;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 100;
}

#toast {
    position: fixed;
    z-index: 200;
    left: 50%;
    bottom: 35px;
    transform: translate(-50%, 20px);
    opacity: 0;
    padding: 12px 20px;
    border-radius: 30px;
    color: white;
    background: rgba(25, 10, 22, .92);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(15px);
    pointer-events: none;
    transition: .3s ease;
}

#toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}


/* MUSIC */

.music-button {
    position: fixed;
    z-index: 150;
    top: 22px;
    right: 22px;
    width: 43px;
    height: 43px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.06);
    color: white;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.music-button.playing {
    color: var(--pink-light);
    box-shadow: 0 0 25px rgba(255,79,131,.4);
}


/* SCENES */

.scene {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.scene.active {
    display: flex;
}

.scene-content {
    position: relative;
    z-index: 5;
    width: min(92%, 1000px);
    text-align: center;
}

.scene-background {
    position: absolute;
    inset: 0;
}

.welcome-background {
    background:
        radial-gradient(
            circle at 50% 45%,
            #351327,
            #170914 45%,
            #08050c 85%
        );
}

.balloon-background {
    background:
        radial-gradient(
            circle at 50% 40%,
            #35142d,
            #180a18 45%,
            #08050c
        );
}

.cake-background {
    background:
        radial-gradient(
            circle at 50% 45%,
            #392018,
            #1b0d15 45%,
            #08050c
        );
}

.memories-background {
    background:
        radial-gradient(
            circle at 50% 40%,
            #211337,
            #100817 50%,
            #08050c
        );
}

.letter-background {
    background:
        radial-gradient(
            circle at 50% 40%,
            #3a1429,
            #180914 50%,
            #08050c
        );
}

.finale-background {
    background:
        radial-gradient(
            circle at 50% 50%,
            #4b122d,
            #1d0818 40%,
            #08050c 80%
        );
}

.big-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .15;
}

.glow-pink {
    background: #ff2d75;
    top: 10%;
    left: 10%;
}

.glow-purple {
    background: #9b2cff;
    right: 5%;
    bottom: 5%;
}

.glow-gold {
    background: #ffb52e;
    left: 50%;
    top: 20%;
    transform: translateX(-50%);
}


/* TYPOGRAPHY */

.eyebrow,
.scene-eyebrow {
    color: var(--pink-light);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 25px;
}

.scene-content h2 {
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-weight: 400;
    font-size: clamp(40px, 6vw, 70px);
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 15px;
}

.scene-description {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px;
}


/* WELCOME */

.welcome-content {
    position: relative;
    z-index: 5;
    width: min(90%, 760px);
    text-align: center;
}

.heart-wrapper {
    width: 105px;
    height: 105px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.heart {
    color: var(--pink);
    font-size: 82px;
    filter:
        drop-shadow(
            0 0 28px
            rgba(255,79,131,.55)
        );
}

.welcome-content h1 {
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: clamp(45px, 7vw, 80px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -3px;
    margin-bottom: 25px;
}

.welcome-content h1 span {
    color: var(--pink-light);
    font-style: italic;
}

.subtitle {
    color: #d8b9c5;
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 32px;
}

.headphone-hint {
    margin-top: 17px;
    color: var(--dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bottom-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
    align-items: center;
    color: #765766;
    font-size: 9px;
    letter-spacing: 3px;
    white-space: nowrap;
}

.bottom-hint span {
    width: 35px;
    height: 1px;
    background: #563c48;
}


/* BUTTON */

.primary-button {
    min-width: 235px;
    padding: 16px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,.15);
    background:
        linear-gradient(
            135deg,
            #ff477e,
            #d82e68
        );
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    box-shadow:
        0 12px 35px
        rgba(255,50,110,.25);
    transition: .25s ease;
}

.primary-button:hover {
    transform: translateY(-3px);
    box-shadow:
        0 17px 45px
        rgba(255,50,110,.4);
}

.arrow {
    font-size: 20px;
}


/* BALLOONS */

.balloon-area {
    width: min(100%, 700px);
    min-height: 350px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    align-items: center;
    justify-items: center;
}

.birthday-balloon {
    width: 100px;
    height: 132px;
    border: none;
    border-radius: 50% 50% 48% 48%;
    cursor: pointer;
    position: relative;
    box-shadow:
        inset -15px -20px 25px rgba(0,0,0,.16),
        0 15px 35px rgba(0,0,0,.25);
}

.birthday-balloon::before {
    content: "";
    position: absolute;
    width: 13px;
    height: 18px;
    left: 50%;
    bottom: -7px;
    transform: translateX(-50%) rotate(45deg);
    background: inherit;
}

.birthday-balloon::after {
    content: "";
    position: absolute;
    width: 1px;
    height: 75px;
    left: 50%;
    top: 100%;
    background: rgba(255,255,255,.35);
}

.balloon-1 {
    background: linear-gradient(145deg,#ff86a8,#d72d67);
}

.balloon-2 {
    background: linear-gradient(145deg,#d19aff,#7c3aed);
}

.balloon-3 {
    background: linear-gradient(145deg,#ff8b9d,#df244c);
}

.balloon-4 {
    background: linear-gradient(145deg,#f8a8d0,#cf2470);
}

.balloon-5 {
    background: linear-gradient(145deg,#ffa4ad,#be123c);
}

.balloon-6 {
    background: linear-gradient(145deg,#d8b4fe,#8b32df);
}

.counter {
    color: #e7cad4;
    font-size: 12px;
    letter-spacing: 3px;
}

.message {
    min-height: 30px;
    color: #ffabc5;
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 17px;
    margin-top: 10px;
}

.complete {
    display: none;
    margin-top: 20px;
}

.complete.visible {
    display: block;
}

.complete-icon {
    font-size: 42px;
    margin-bottom: 7px;
}

.complete h3 {
    font-family: Georgia, serif;
    font-size: 27px;
    font-weight: 400;
}

.complete p {
    color: var(--muted);
    margin: 7px 0 20px;
}


/* CAKE */

.cake-wrapper {
    width: 420px;
    height: 360px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.cake {
    position: relative;
    width: 300px;
    height: 230px;
}

.cake-plate {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 350px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(#eee,#aaa);
}

.cake-body {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 270px;
    height: 130px;
    border-radius: 18px 18px 25px 25px;
    background:
        linear-gradient(
            90deg,
            #8e3f4c,
            #c96877,
            #8e3f4c
        );
}

.cake-top {
    position: absolute;
    z-index: 2;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    width: 285px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(#ffb7c8,#e97691);
}

.drip {
    position: absolute;
    bottom: -25px;
    width: 35px;
    height: 40px;
    border-radius: 0 0 20px 20px;
    background: #e97691;
}

.drip1 {
    left: 35px;
}

.drip2 {
    left: 105px;
}

.drip3 {
    right: 100px;
}

.drip4 {
    right: 35px;
}

.decoration {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gold);
}

.d1 {
    top: 45px;
    left: 55px;
}

.d2 {
    top: 75px;
    left: 130px;
}

.d3 {
    top: 40px;
    right: 55px;
}

.candles {
    position: absolute;
    z-index: 5;
    bottom: 195px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 27px;
}

.candle {
    position: relative;
    width: 18px;
    height: 75px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.candle-body {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 18px;
    height: 65px;
    border-radius: 5px 5px 3px 3px;
    background:
        repeating-linear-gradient(
            -45deg,
            #f5a5ba,
            #f5a5ba 8px,
            #fff 8px,
            #fff 12px
        );
}

.wick {
    position: absolute;
    z-index: 4;
    width: 2px;
    height: 8px;
    left: 50%;
    top: 2px;
    transform: translateX(-50%);
    background: #222;
}

.flame {
    position: absolute;
    z-index: 6;
    width: 17px;
    height: 25px;
    left: 50%;
    top: -24px;
    transform: translateX(-50%);
    border-radius: 50%;
    background:
        radial-gradient(
            circle at 50% 70%,
            #fff,
            #ffd166 35%,
            #ff7b22 65%,
            transparent 70%
        );
}

.candle.blown .flame {
    opacity: 0;
    transform:
        translateX(-50%)
        scale(0);
}

.candle.blown .candle-body {
    opacity: .55;
}


/* MEMORIES */

.memory-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 20px;
    max-width: 900px;
    margin: 35px auto;
}

.memory-card {
    min-height: 230px;
    padding: 30px 25px;
    text-align: left;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 22px;
    background: rgba(255,255,255,.045);
    color: white;
    cursor: pointer;
    transition: .3s ease;
}

.memory-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255,159,189,.4);
    background: rgba(255,255,255,.09);
}

.memory-number {
    color: #7e6470;
    font-size: 11px;
    letter-spacing: 2px;
}

.memory-symbol {
    display: block;
    margin: 20px 0;
    color: var(--pink-light);
    font-size: 30px;
}

.memory-card h3 {
    font-family: Georgia, serif;
    font-size: 23px;
    font-weight: 400;
    margin-bottom: 10px;
}

.memory-card p {
    color: #b99ba8;
    line-height: 1.6;
    font-size: 14px;
}

.memory-popup {
    position: fixed;
    z-index: 100;
    left: 50%;
    top: 50%;
    width: min(90%, 520px);
    padding: 45px;
    transform: translate(-50%,-45%) scale(.95);
    opacity: 0;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 25px;
    background: rgba(25,10,22,.95);
    backdrop-filter: blur(25px);
    transition: .3s ease;
}

.memory-popup.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%,-50%) scale(1);
}

.close-button {
    position: absolute;
    right: 18px;
    top: 15px;
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: white;
    font-size: 25px;
    cursor: pointer;
}

.popup-symbol {
    color: var(--pink-light);
    font-size: 45px;
}

.memory-popup h3 {
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 400;
    margin: 15px 0;
}

.memory-popup p {
    color: #d4b8c4;
    line-height: 1.8;
}


/* LETTER */

.envelope {
    position: relative;
    width: 330px;
    height: 220px;
    margin: 45px auto 20px;
    cursor: pointer;
}

.envelope-back {
    position: absolute;
    inset: 0;
    border-radius: 5px;
    background: linear-gradient(135deg,#d98ba2,#8f3f59);
    box-shadow: 0 25px 60px rgba(0,0,0,.4);
}

.envelope-front {
    position: absolute;
    z-index: 4;
    left: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border-left: 165px solid transparent;
    border-right: 165px solid transparent;
    border-bottom: 125px solid #a44f69;
}

.envelope-flap {
    position: absolute;
    z-index: 5;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border-left: 165px solid transparent;
    border-right: 165px solid transparent;
    border-top: 120px solid #c7758d;
    transform-origin: top center;
    transition: .8s ease;
}

.envelope.open .envelope-flap {
    transform: rotateX(180deg);
}

.envelope-heart {
    position: absolute;
    z-index: 8;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    color: white;
    font-size: 30px;
}

.envelope.open .envelope-heart {
    opacity: 0;
}

.letter-paper {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 15px;
    width: 250px;
    height: 170px;
    transform: translateX(-50%);
    background: #fff7f1;
    color: #5c3341;
    transition: .8s ease;
}

.envelope.open .letter-paper {
    bottom: 90px;
}

.letter-paper-content {
    padding: 25px;
    text-align: left;
}

.letter-paper h3 {
    font-family: Georgia, serif;
    font-weight: 400;
    margin: 15px 0 5px;
}

.letter-paper p {
    font-size: 12px;
}

.envelope-hint {
    color: #9f7b89;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.letter-text {
    max-width: 650px;
    margin: 35px auto;
    padding: 30px;
    text-align: left;
    display: none;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    background: rgba(255,255,255,.035);
}

.letter-text.visible {
    display: block;
}

.letter-text p {
    color: #d6bdc7;
    font-family: Georgia, serif;
    font-size: 17px;
    line-height: 1.9;
    margin-bottom: 20px;
}

.signature {
    color: var(--pink-light) !important;
    text-align: right;
    font-style: italic;
}

.hidden-button {
    display: none;
}

.hidden-button.visible {
    display: inline-flex;
}


/* FINALE */

.finale-content {
    position: relative;
    z-index: 5;
    width: min(90%,850px);
    text-align: center;
}

.finale-stars {
    color: var(--pink-light);
    font-size: 25px;
    margin-bottom: 25px;
}

.finale-content h2 {
    font-family: Georgia, serif;
    font-weight: 400;
    font-size: clamp(45px,7vw,80px);
}

.finale-content h1 {
    font-family: Georgia, serif;
    font-weight: 400;
    font-size: clamp(55px,9vw,100px);
    margin-bottom: 25px;
}

.finale-content h1 span {
    color: var(--pink-light);
    font-style: italic;
}

.final-message {
    max-width: 650px;
    margin: auto;
    color: #d4b6c2;
    font-family: Georgia, serif;
    font-size: 19px;
    line-height: 1.8;
}

.final-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 35px auto;
    color: var(--pink-light);
}

.final-divider span {
    width: 80px;
    height: 1px;
    background: rgba(255,159,189,.3);
}

.final-small {
    color: #8c6a78;
    font-size: 12px;
    margin-bottom: 25px;
}

.secondary-button {
    padding: 12px 22px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.05);
    color: #e4cbd4;
    cursor: pointer;
}

.finale-heart {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    color: #ff3e78;
    font-size: 500px;
    opacity: .025;
}
