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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior: none;
    position: fixed;
    top: 0;
    left: 0;
}

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    background: #010103;
    color: #fff;
}

#root {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
}

.canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.content-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    pointer-events: none;
}

.content-layer>* {
    pointer-events: auto;
}

/* Typography - all centered by default */
.text-hero {
    font-family: 'Lovers Quarrel', cursive;
    font-size: clamp(5rem, 18vw, 10rem);
    font-weight: 400;
    text-align: center;
    width: 100%;
    background: linear-gradient(135deg, #fff 0%, #f5e6ff 25%, #e8ccff 50%, #f5e6ff 75%, #fff 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 50px rgba(200, 150, 255, 0.45)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.text-main {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.3rem, 4.5vw, 2rem);
    text-align: center;
    width: 100%;
    line-height: 1.9;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.93);
    text-shadow: 0 0 25px rgba(200, 180, 255, 0.2);
}

.text-main em {
    font-style: italic;
    background: linear-gradient(135deg, #f0d0ff, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-small {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: clamp(0.75rem, 2.2vw, 0.9rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.58);
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
}

.text-whisper {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: clamp(0.65rem, 1.8vw, 0.75rem);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    width: 100%;
}

.text-instruction {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: clamp(0.7rem, 1.8vw, 0.78rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    text-shadow: 0 0 15px rgba(200, 180, 255, 0.3);
    position: absolute;
    bottom: max(2.5rem, env(safe-area-inset-bottom, 2.5rem));
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 85%;
    animation: fadeInOut 3s ease-in-out infinite;
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0.45;
    }

    50% {
        opacity: 0.75;
    }
}

/* Scene Base - always centered */
.scene {
    opacity: 0;
    transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.scene.active {
    opacity: 1;
}

.scene-content {
    text-align: center;
    max-width: 90vw;
    width: 100%;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 24px;
}

.scene.active .scene-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 170%;
    background: radial-gradient(ellipse at center, rgba(1, 1, 3, 0.7) 0%, rgba(1, 1, 3, 0.35) 45%, transparent 72%);
    pointer-events: none;
    z-index: -1;
    border-radius: 50%;
    filter: blur(30px);
}

/* Animations */
@keyframes animFadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(6px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes animNameIn {
    0% {
        opacity: 0;
        transform: scale(0.65) translateY(20px);
        filter: blur(15px);
    }

    45% {
        filter: blur(3px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

@keyframes shimmerName {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes animScaleIn {
    0% {
        opacity: 0;
        transform: scale(0.55);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes animCounterReveal {
    0% {
        opacity: 0;
        transform: scale(0.35) translateY(35px);
        filter: blur(12px);
    }

    55% {
        filter: blur(0);
    }

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

@keyframes animHeartIn {
    0% {
        opacity: 0;
        transform: scale(0.2) translateY(50px);
        filter: blur(18px);
    }

    35% {
        opacity: 1;
        filter: blur(4px);
    }

    65% {
        transform: scale(1.1) translateY(-8px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.anim-fade-up {
    animation: animFadeUp 1.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.anim-delay-1 {
    animation-delay: 0.35s;
}

.anim-delay-2 {
    animation-delay: 0.7s;
}

.anim-delay-3 {
    animation-delay: 1.05s;
}

.anim-name-reveal {
    animation: animNameIn 2.4s cubic-bezier(0.16, 1, 0.3, 1) both, shimmerName 5s ease-in-out 2.4s infinite;
}

.anim-scale-in {
    animation: animScaleIn 1.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.anim-counter-reveal {
    animation: animCounterReveal 1.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.anim-heart-entrance {
    animation: animHeartIn 2.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Intro */
.scene-intro .scene-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.scene-intro .intro-for {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: clamp(0.7rem, 2vw, 0.85rem);
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1.2rem;
    text-align: center;
}

.scene-intro .intro-tagline {
    margin-top: 2.2rem;
}

/* Birth */
.scene-birth {
    justify-content: center;
    padding-bottom: 0;
}

.scene-birth .birth-cta {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
    white-space: nowrap;
    text-align: center;
}

@keyframes birthHintPulse {

    0%,
    100% {
        opacity: 0;
    }

    30%,
    70% {
        opacity: 0.45;
    }
}

/* Zodiac */
.zodiac-signs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    border-radius: 20px;
}

.zodiac-sign {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.zodiac-icon-wrap {
    width: clamp(72px, 18vw, 105px);
    height: clamp(72px, 18vw, 105px);
    display: grid;
    place-items: center;
    border-radius: 50%;
    position: relative;
}

.zodiac-icon-wrap::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(200, 180, 255, 0.12);
    animation: zodiacRingPulse 4s ease-in-out infinite;
}

.zodiac-icon-wrap::after {
    content: '';
    position: absolute;
    inset: -22px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(180, 150, 255, 0.1) 0%, transparent 70%);
    animation: zodiacGlowPulse 5s ease-in-out infinite;
}

.zodiac-sign-his .zodiac-icon-wrap::after {
    animation-delay: 0s;
}

.zodiac-sign-her .zodiac-icon-wrap::after {
    animation-delay: 2.5s;
}

@keyframes zodiacRingPulse {

    0%,
    100% {
        border-color: rgba(200, 180, 255, 0.08);
        transform: scale(1);
    }

    50% {
        border-color: rgba(200, 180, 255, 0.22);
        transform: scale(1.06);
    }
}

@keyframes zodiacGlowPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

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

.zodiac-icon {
    width: clamp(36px, 10vw, 52px);
    height: clamp(36px, 10vw, 52px);
    display: block;
    color: rgba(230, 215, 255, 0.88);
    filter: drop-shadow(0 0 12px rgba(200, 180, 255, 0.5)) drop-shadow(0 0 30px rgba(180, 160, 240, 0.2));
    position: relative;
    z-index: 1;
}

@keyframes zodiacFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

.zodiac-name {
    font-family: 'Italiana', serif;
    font-weight: 400;
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(200, 180, 255, 0.68);
    text-align: center;
}

.zodiac-connector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 2rem;
}

.zodiac-line {
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 180, 255, 0.25), transparent);
}

.zodiac-star-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(220, 200, 255, 0.65);
    box-shadow: 0 0 8px rgba(200, 180, 255, 0.4), 0 0 20px rgba(180, 160, 240, 0.25);
    animation: starDotPulse 3s ease-in-out infinite;
}

@keyframes starDotPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.65;
    }

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

.zodiac-message {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: clamp(0.9rem, 3vw, 1.05rem);
    color: rgba(200, 180, 255, 0.62);
    letter-spacing: 0.05em;
    margin-top: 1.8rem;
    text-shadow: 0 0 18px rgba(200, 180, 255, 0.15);
    text-align: center;
}

/* Memories */
.memory-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.memory-container.visible {
    opacity: 1;
    pointer-events: auto;
}

.memory-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(8, 5, 20, 0.55) 0%, rgba(4, 2, 12, 0.6) 50%, rgba(2, 1, 5, 0.7) 100%);
    backdrop-filter: blur(6px) saturate(1.1);
    -webkit-backdrop-filter: blur(6px) saturate(1.1);
}

.memory-card {
    position: relative;
    z-index: 2;
    width: min(82vw, 420px);
    max-height: 70vh;
    overflow-y: auto;
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid rgba(200, 180, 255, 0.08);
    border-radius: 34px;
    background:
        radial-gradient(ellipse at 50% 35%, rgba(255, 255, 255, 0.08) 0%, rgba(200, 180, 255, 0.03) 42%, rgba(10, 8, 22, 0.0) 72%),
        linear-gradient(135deg, rgba(15, 10, 30, 0.55) 0%, rgba(10, 6, 20, 0.35) 100%);
}

.memory-date {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(200, 180, 255, 0.58);
    text-align: center;
}

.memory-divider {
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 180, 255, 0.25), transparent);
    margin: 1.3rem auto;
}

.memory-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    letter-spacing: 0.03em;
    text-align: center;
}

.memory-counter {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: clamp(0.6rem, 1.5vw, 0.65rem);
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: 2rem;
    text-align: center;
}

.memory-hint {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    position: fixed;
    bottom: max(5rem, calc(env(safe-area-inset-bottom) + 3rem));
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
    white-space: nowrap;
}

.memory-navigation {
    display: flex;
    gap: 0.6rem;
    position: fixed;
    bottom: max(3.5rem, calc(env(safe-area-inset-bottom) + 1.5rem));
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.memory-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.4s ease;
}

.memory-dot.active {
    background: rgba(200, 180, 255, 0.55);
    transform: scale(1.4);
}

.memory-dot.viewed {
    background: rgba(200, 180, 255, 0.2);
}

/* Confession */
.confession-question {
    font-family: 'Pinyon Script', cursive;
    font-size: clamp(1.8rem, 7vw, 3rem);
    margin-top: 2rem;
    color: #fff;
    text-shadow: 0 0 28px rgba(220, 180, 255, 0.5), 0 0 55px rgba(190, 150, 240, 0.25);
    animation: confessionShimmer 4s ease-in-out 1.6s infinite;
    text-align: center;
    width: 100%;
}

@keyframes confessionShimmer {

    0%,
    100% {
        text-shadow: 0 0 28px rgba(220, 180, 255, 0.5), 0 0 55px rgba(190, 150, 240, 0.25);
    }

    50% {
        text-shadow: 0 0 38px rgba(220, 180, 255, 0.75), 0 0 75px rgba(190, 150, 240, 0.4);
    }
}

.button-container {
    display: flex;
    gap: 1.5rem;
    margin-top: 2.5rem;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
    border-radius: 20px;
}

.btn-response {
    padding: 0.95rem 2.8rem;
    border: 1px solid rgba(200, 180, 255, 0.15);
    border-radius: 999px;
    background: rgba(200, 180, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(0.75rem, 2vw, 0.82rem);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.btn-response:active {
    transform: scale(0.96);
    background: rgba(200, 180, 255, 0.12);
    border-color: rgba(200, 180, 255, 0.3);
}

/* Promise */
.promise-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.2rem, 4.5vw, 1.8rem);
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.9;
    letter-spacing: 0.04em;
    text-align: center;
    max-width: min(90vw, 700px);
    margin: 0 auto;
}

/* Finale */
.finale-container {
    position: relative;
    z-index: 3;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.finale-text {
    margin-bottom: 2rem;
}

.finale-heart {
    margin: 0 auto;
    position: relative;
}

.finale-subtitle {
    margin-top: 2.2rem;
}

.finale-date {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: clamp(0.6rem, 1.5vw, 0.7rem);
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    margin-top: 2.5rem;
    text-align: center;
}

.counter-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    border-radius: 20px;
}

.counter-item {
    text-align: center;
    border-radius: 16px;
}

.counter-number {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-size: clamp(3rem, 10vw, 4.5rem);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1;
}

.counter-label {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: clamp(0.6rem, 1.5vw, 0.7rem);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.6rem;
}

/* Vignette & Nebula */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(1, 1, 3, 0.35) 78%, rgba(1, 1, 3, 0.65) 100%);
}

.nebula-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 5s ease;
}

.nebula-overlay.intense {
    opacity: 1;
    animation: nebulaBreath 10s ease-in-out infinite;
    background: radial-gradient(ellipse at 20% 20%, rgba(130, 70, 190, 0.15) 0%, transparent 50%), radial-gradient(ellipse at 80% 25%, rgba(110, 55, 170, 0.13) 0%, transparent 45%), radial-gradient(ellipse at 75% 80%, rgba(120, 60, 180, 0.11) 0%, transparent 50%), radial-gradient(ellipse at 25% 75%, rgba(100, 50, 160, 0.09) 0%, transparent 45%), radial-gradient(ellipse at 50% 50%, rgba(140, 90, 200, 0.06) 0%, transparent 60%);
}

@keyframes nebulaBreath {

    0%,
    100% {
        filter: hue-rotate(0deg) brightness(1);
    }

    33% {
        filter: hue-rotate(8deg) brightness(1.05);
    }

    66% {
        filter: hue-rotate(-5deg) brightness(0.95);
    }
}

/* Loading - 3 second timed progress bar */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: min(80vw, 280px);
    border-radius: 20px;
}

.loading-text {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: 0.72rem;
    letter-spacing: 0.35em;
    color: rgba(255, 255, 255, 0.42);
    text-transform: uppercase;
    text-align: center;
}

.loading-bar {
    width: 100%;
    max-width: 180px;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    margin: 1.5rem auto 0;
    overflow: hidden;
}

.loading-bar::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(200, 180, 255, 0.45), rgba(200, 180, 255, 0.6));
    transform-origin: left;
    animation: loadingProgress 3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes loadingProgress {
    0% {
        transform: scaleX(0);
    }

    100% {
        transform: scaleX(1);
    }
}

/* Audio */
.audio-toggle {
    position: fixed;
    top: max(1.5rem, env(safe-area-inset-top));
    right: 1.5rem;
    z-index: 100;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.28;
    transition: all 0.4s ease;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.audio-toggle:active {
    opacity: 0.8;
    transform: scale(0.92);
}

.audio-toggle svg {
    width: 16px;
    height: 16px;
    fill: rgba(255, 255, 255, 0.55);
}

/* Hyperspace 3D Tunnel */
.hyper-scene {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 4px;
    perspective-origin: 50% 50%;
    z-index: 1;
    overflow: hidden;
    contain: strict;
}

.hyper-wrap {
    position: absolute;
    width: 1000px;
    height: 1000px;
    left: 50%;
    top: 50%;
    margin-left: -500px;
    margin-top: -500px;
    transform-style: preserve-3d;
    animation: hyperMove 8s infinite linear;
    will-change: transform;
}

.hyper-wrap-2 {
    animation-delay: 4s;
}

.hyper-wall {
    width: 100%;
    height: 100%;
    position: absolute;
    opacity: 0;
    animation: hyperFade 8s infinite linear;
    will-change: opacity;
    background:
        radial-gradient(1px 1px at 8% 20%, rgba(255, 255, 255, 0.8) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 25% 50%, rgba(200, 170, 255, 0.7) 0%, transparent 100%),
        radial-gradient(1px 1px at 42% 12%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 58% 68%, rgba(255, 230, 255, 0.7) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 35%, rgba(220, 200, 255, 0.5) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 90% 78%, rgba(200, 170, 255, 0.6) 0%, transparent 100%),
        radial-gradient(ellipse at center, rgba(100, 60, 180, 0.08) 0%, rgba(60, 30, 140, 0.2) 40%, rgba(30, 15, 80, 0.5) 70%, rgba(10, 5, 40, 0.7) 100%);
}

.hyper-wrap-2 .hyper-wall {
    animation-delay: 4s;
}

.hyper-wall-right {
    transform: rotateY(90deg) translateZ(500px);
}

.hyper-wall-left {
    transform: rotateY(-90deg) translateZ(500px);
}

.hyper-wall-top {
    transform: rotateX(90deg) translateZ(500px);
}

.hyper-wall-bottom {
    transform: rotateX(-90deg) translateZ(500px);
}

.hyper-wall-back {
    transform: rotateX(180deg) translateZ(500px);
}

@keyframes hyperMove {
    0% {
        transform: translateZ(-500px) rotate(0deg);
    }

    100% {
        transform: translateZ(500px) rotate(1deg);
    }
}

@keyframes hyperFade {
    0% {
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Void scene */
.void-text {
    color: rgba(255, 255, 255, 0.82);
}

/* New Star memory card - matches memory-card glass style */
.newstar-memory {
    text-align: center;
    max-width: min(85vw, 420px);
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    border-radius: 34px;
    border: 1px solid rgba(200, 180, 255, 0.08);
    background:
        radial-gradient(ellipse at 50% 35%, rgba(255, 255, 255, 0.08) 0%, rgba(200, 180, 255, 0.03) 42%, rgba(10, 8, 22, 0.0) 72%),
        linear-gradient(135deg, rgba(15, 10, 30, 0.55) 0%, rgba(10, 6, 20, 0.35) 100%);
    backdrop-filter: blur(20px) saturate(1.1);
    -webkit-backdrop-filter: blur(20px) saturate(1.1);
}

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

/* Small phones */
@media (max-width: 380px) {
    .scene {
        padding: 1.2rem;
    }

    .memory-card {
        width: 94vw;
        padding: 2.5rem 1.5rem;
    }

    .button-container {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .btn-response {
        width: 100%;
        max-width: 220px;
    }

    .counter-grid {
        gap: 1.5rem;
    }

    .zodiac-signs {
        gap: 1.5rem;
    }

    .confession-question {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
    }
}

/* Mobile - optimized hyperspace */
@media (max-width: 768px) {
    .hyper-wrap {
        width: 400px;
        height: 400px;
        margin-left: -200px;
        margin-top: -200px;
    }

    /* Hide the back wall on mobile — invisible anyway, saves a composited layer */
    .hyper-wall-back {
        display: none;
    }

    .hyper-wall {
        background:
            radial-gradient(1px 1px at 15% 30%, rgba(255, 255, 255, 0.8) 0%, transparent 100%),
            radial-gradient(1.5px 1.5px at 45% 60%, rgba(200, 170, 255, 0.7) 0%, transparent 100%),
            radial-gradient(1px 1px at 75% 25%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
            radial-gradient(ellipse at center, rgba(80, 50, 160, 0.1) 0%, rgba(30, 15, 80, 0.5) 60%, rgba(10, 5, 40, 0.7) 100%);
    }

    .hyper-wall-right {
        transform: rotateY(90deg) translateZ(200px);
    }

    .hyper-wall-left {
        transform: rotateY(-90deg) translateZ(200px);
    }

    .hyper-wall-top {
        transform: rotateX(90deg) translateZ(200px);
    }

    .hyper-wall-bottom {
        transform: rotateX(-90deg) translateZ(200px);
    }

    @keyframes hyperMove {
        0% {
            transform: translateZ(-200px) rotate(0deg);
        }

        100% {
            transform: translateZ(200px) rotate(1deg);
        }
    }

    .newstar-memory {
        max-width: 90vw;
        padding: 1.5rem;
    }

}

/* Tablet */
@media (min-width: 768px) {
    .memory-card {
        width: min(70vw, 500px);
        padding: 4rem 3rem;
    }

    .text-main {
        font-size: 1.8rem;
    }

    .memory-text {
        font-size: 1.5rem;
    }

    .promise-text {
        white-space: nowrap;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .text-hero {
        font-size: 10rem;
    }

    .confession-question {
        font-size: 3rem;
    }
}

/* Safe areas (notch phones) */
@supports (padding: max(0px)) {
    .content-layer {
        padding-top: max(2rem, env(safe-area-inset-top));
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
        padding-left: max(2rem, env(safe-area-inset-left));
        padding-right: max(2rem, env(safe-area-inset-right));
    }
}