/* ============================================= */
/*  @HER — A Love Letter in Code                 */
/*  Complete Stylesheet                           */
/* ============================================= */

/* ---- CSS Custom Properties (Design Tokens) ---- */
:root {
    /* Color Palette — Deep romantic tones */
    --night-deep: #0a0a1a;
    --night-mid: #12122e;
    --night-soft: #1a1a3e;
    --rose-primary: #ff6b9d;
    --rose-light: #ffa8c5;
    --rose-soft: #ffcfe0;
    --rose-glow: rgba(255, 107, 157, 0.3);
    --gold-warm: #f4c87a;
    --gold-light: #ffe4b5;
    --cream: #fef5e7;
    --cream-dark: #f5e6d0;
    --white-soft: rgba(255, 255, 255, 0.9);
    --white-dim: rgba(255, 255, 255, 0.5);

    /* Typography */
    --font-elegant: 'Cormorant Garamond', Georgia, serif;
    --font-handwriting: 'Dancing Script', cursive;
    --font-modern: 'Outfit', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 5rem;

    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --duration-fast: 0.3s;
    --duration-normal: 0.6s;
    --duration-slow: 1.2s;
}

/* ---- Reset & Base Styles ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow: hidden; /* Scene-based navigation, no scroll */
}

body {
    font-family: var(--font-modern);
    background: var(--night-deep);
    color: var(--white-soft);
    overflow: hidden;
    cursor: default;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Utility Classes ---- */
.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(20px);
}

.fade-in {
    animation: fadeIn var(--duration-slow) var(--ease-smooth) forwards;
}

.fade-out {
    animation: fadeOut var(--duration-normal) var(--ease-smooth) forwards;
}

/* ---- Music Toggle Button ---- */
.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 107, 157, 0.3);
    background: rgba(10, 10, 26, 0.6);
    backdrop-filter: blur(10px);
    color: var(--rose-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-btn:hover {
    background: rgba(255, 107, 157, 0.15);
    border-color: var(--rose-primary);
    transform: scale(1.1);
}

.music-btn.playing .music-icon {
    animation: musicPulse 1s ease-in-out infinite;
}

/* ---- Scene Base Styles ---- */
.scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s var(--ease-smooth), visibility 0s 1.2s;
    z-index: 1;
}

.scene.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 1.2s var(--ease-smooth), visibility 0s 0s;
    z-index: 10;
}

/* ---- Scene Navigation Dots ---- */
.scene-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: opacity var(--duration-normal) var(--ease-smooth);
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--rose-light);
    background: transparent;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
    padding: 0;
}

.nav-dot:hover {
    background: var(--rose-light);
    transform: scale(1.3);
}

.nav-dot.active {
    background: var(--rose-primary);
    border-color: var(--rose-primary);
    box-shadow: 0 0 10px var(--rose-glow);
    transform: scale(1.2);
}


/* ============================================= */
/*  SCENE 1: THE STARRY BEGINNING                */
/* ============================================= */

.scene-intro {
    background: radial-gradient(ellipse at 50% 0%, var(--night-mid) 0%, var(--night-deep) 70%);
}

#starfield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Shooting stars */
.shooting-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.shooting-star {
    position: absolute;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), transparent);
    border-radius: 50%;
    opacity: 0;
}

.shooting-star:nth-child(1) {
    top: 15%;
    left: 60%;
    animation: shootingStar 4s 2s linear infinite;
    transform: rotate(-35deg);
}

.shooting-star:nth-child(2) {
    top: 30%;
    left: 80%;
    animation: shootingStar 5s 5s linear infinite;
    transform: rotate(-25deg);
}

.shooting-star:nth-child(3) {
    top: 10%;
    left: 40%;
    animation: shootingStar 6s 8s linear infinite;
    transform: rotate(-40deg);
}

/* Intro content */
.intro-content {
    position: relative;
    z-index: 5;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

/* Soft glowing orb behind the title */
.glow-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--rose-glow), transparent 70%);
    filter: blur(60px);
    animation: orbPulse 4s ease-in-out infinite;
    pointer-events: none;
}

.intro-title {
    font-family: var(--font-handwriting);
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: 500;
    color: var(--white-soft);
    text-shadow: 0 0 40px var(--rose-glow);
    opacity: 0;
    animation: fadeSlideUp 1.5s 0.5s var(--ease-smooth) forwards;
}

.intro-subtitle {
    font-family: var(--font-elegant);
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 300;
    color: var(--white-dim);
    font-style: italic;
    letter-spacing: 0.05em;
    opacity: 0;
    animation: fadeSlideUp 1.5s 1.5s var(--ease-smooth) forwards;
}

/* Animated Envelope */
.envelope {
    margin-top: var(--space-md);
    cursor: pointer;
    opacity: 0;
    animation: fadeSlideUp 1.5s 2.5s var(--ease-smooth) forwards;
    transition: transform var(--duration-fast) var(--ease-smooth);
}

.envelope:hover {
    transform: scale(1.08);
}

.envelope:hover .envelope-body {
    box-shadow: 0 10px 40px rgba(255, 107, 157, 0.3);
}

.envelope-body {
    width: 100px;
    height: 70px;
    background: linear-gradient(135deg, var(--cream), var(--cream-dark));
    border-radius: 4px;
    position: relative;
    margin: 0 auto;
    transition: all var(--duration-fast) var(--ease-smooth);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.envelope-flap {
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 40px;
    background: linear-gradient(135deg, var(--cream-dark), var(--cream));
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    transition: transform 0.6s var(--ease-smooth);
    transform-origin: top center;
    z-index: 2;
}

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

.envelope-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    color: var(--rose-primary);
    animation: heartbeat 1.5s ease-in-out infinite;
    z-index: 1;
}

.envelope-hint {
    font-family: var(--font-elegant);
    font-size: 0.9rem;
    color: var(--white-dim);
    margin-top: var(--space-sm);
    font-style: italic;
    animation: gentlePulse 2s ease-in-out infinite;
}


/* ============================================= */
/*  SCENE 2: THE LOVE LETTER                     */
/* ============================================= */

.scene-letter {
    background: linear-gradient(180deg, #1a0a1e 0%, #2d1b33 40%, #1a0a1e 100%);
}

#petals-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.letter-container {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    max-height: 100vh;
}

.letter-paper {
    width: min(600px, 90vw);
    max-height: 70vh;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--cream) 0%, #fdf3e4 100%);
    border-radius: 8px;
    padding: clamp(1.5rem, 4vw, 3rem);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(244, 200, 122, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    overflow-x: hidden;
    color: #3d2c2c;
    transform: scale(0.95);
    opacity: 0;
    animation: letterAppear 1s 0.3s var(--ease-smooth) forwards;

    /* Custom scrollbar for the letter */
    scrollbar-width: thin;
    scrollbar-color: var(--rose-light) transparent;
}

.letter-paper::-webkit-scrollbar {
    width: 4px;
}

.letter-paper::-webkit-scrollbar-track {
    background: transparent;
}

.letter-paper::-webkit-scrollbar-thumb {
    background: var(--rose-light);
    border-radius: 4px;
}

/* Watermark heart in background */
.letter-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15rem;
    color: rgba(255, 107, 157, 0.05);
    pointer-events: none;
    z-index: 0;
}

.letter-header {
    text-align: right;
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 1;
}

.letter-date {
    font-family: var(--font-elegant);
    font-size: 0.95rem;
    color: #8a7060;
    font-style: italic;
}

.letter-body {
    font-family: var(--font-handwriting);
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    line-height: 1.9;
    color: #3d2c2c;
    position: relative;
    z-index: 1;
    min-height: 200px;
}

/* Typing cursor */
.letter-body .cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--rose-primary);
    margin-left: 2px;
    animation: blink 0.8s step-end infinite;
    vertical-align: text-bottom;
}

.letter-signature {
    margin-top: var(--space-lg);
    text-align: right;
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s var(--ease-smooth);
}

.letter-signature.visible {
    opacity: 1;
}

.signature-text {
    font-family: var(--font-handwriting);
    font-size: 1.8rem;
    color: var(--rose-primary);
    display: block;
}

.signature-heart {
    font-size: 1.5rem;
    color: var(--rose-primary);
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}


/* ============================================= */
/*  SCENE 3: REASONS I ADORE YOU                 */
/* ============================================= */

.scene-reasons {
    background: radial-gradient(ellipse at 50% 50%, #1a1a3e 0%, #0d0d20 100%);
}

#fireflies-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.reasons-container {
    position: relative;
    z-index: 5;
    text-align: center;
    width: min(900px, 92vw);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.reasons-title {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.reasons-title-line {
    font-family: var(--font-elegant);
    font-size: clamp(1.4rem, 4vw, 2.5rem);
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white-dim);
}

.reasons-title-line.accent {
    font-family: var(--font-handwriting);
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-transform: none;
    letter-spacing: normal;
    color: var(--rose-primary);
    text-shadow: 0 0 30px var(--rose-glow);
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-sm);
    width: 100%;
    max-height: 55vh;
    overflow-y: auto;
    padding: var(--space-xs);

    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--rose-light) transparent;
}

.reasons-grid::-webkit-scrollbar {
    width: 4px;
}

.reasons-grid::-webkit-scrollbar-thumb {
    background: var(--rose-light);
    border-radius: 4px;
}

/* Individual reason cards */
.reason-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 107, 157, 0.12);
    border-radius: 16px;
    padding: var(--space-sm) var(--space-md);
    backdrop-filter: blur(10px);
    transition: all var(--duration-fast) var(--ease-smooth);
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    cursor: default;
}

.reason-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.reason-card:hover {
    background: rgba(255, 107, 157, 0.08);
    border-color: rgba(255, 107, 157, 0.3);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 107, 157, 0.15);
}

.reason-card .reason-emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--space-xs);
}

.reason-card .reason-text {
    font-family: var(--font-elegant);
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--white-soft);
    font-style: italic;
}


/* ============================================= */
/*  SCENE 4: CONSTELLATION                       */
/* ============================================= */

.scene-constellation {
    background: var(--night-deep);
}

#constellation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.constellation-content {
    position: relative;
    z-index: 5;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.constellation-title {
    font-family: var(--font-handwriting);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--white-soft);
    text-shadow: 0 0 40px var(--rose-glow);
    transition: all 1.5s var(--ease-smooth);
}

.constellation-title:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

.constellation-subtitle {
    font-family: var(--font-elegant);
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--white-dim);
    font-style: italic;
    transition: all 1.5s var(--ease-smooth) 0.5s;
}

.constellation-subtitle:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}


/* ============================================= */
/*  SCENE 5: GALLERY / MEMORY                    */
/* ============================================= */

.scene-gallery {
    background: linear-gradient(180deg, #1a0a1e 0%, #170d24 50%, #1a0a1e 100%);
}

.gallery-bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

/* Floating sparkle particles */
.gallery-bg-particles .sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--rose-light);
    border-radius: 50%;
    animation: sparkleFloat var(--spark-duration) var(--spark-delay) linear infinite;
    opacity: 0;
}

.gallery-container {
    position: relative;
    z-index: 5;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
}

.gallery-title {
    font-family: var(--font-handwriting);
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--rose-light);
    text-shadow: 0 0 30px var(--rose-glow);
}

.gallery-frame {
    position: relative;
    width: min(500px, 80vw);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 2px rgba(255, 168, 197, 0.2),
        0 0 80px rgba(255, 107, 157, 0.1);
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 8s var(--ease-smooth);
}

.gallery-frame:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-frame-border {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255, 168, 197, 0.15);
    border-radius: 12px;
    pointer-events: none;
}

.gallery-caption {
    font-family: var(--font-elegant);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--white-dim);
    font-style: italic;
    max-width: 500px;
    line-height: 1.6;
}


/* ============================================= */
/*  SCENE 6: MOVIE NIGHT                         */
/* ============================================= */

.scene-movies {
    background: radial-gradient(ellipse at 50% 50%, #1a1428 0%, #0d0a15 100%);
}

#popcorn-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.movies-container {
    position: relative;
    z-index: 5;
    text-align: center;
    width: min(950px, 94vw);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.movies-title {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.movies-title-line {
    font-family: var(--font-elegant);
    font-size: clamp(1.4rem, 4vw, 2.5rem);
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white-dim);
}

.movies-title-line.accent {
    font-family: var(--font-handwriting);
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-transform: none;
    letter-spacing: normal;
    color: var(--gold-warm);
    text-shadow: 0 0 30px rgba(244, 200, 122, 0.3);
}

.movies-subtitle {
    font-family: var(--font-elegant);
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: var(--white-dim);
    font-style: italic;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-sm);
    width: 100%;
    max-height: 52vh;
    overflow-y: auto;
    padding: var(--space-xs);

    scrollbar-width: thin;
    scrollbar-color: var(--gold-warm) transparent;
}

.movies-grid::-webkit-scrollbar {
    width: 4px;
}

.movies-grid::-webkit-scrollbar-thumb {
    background: var(--gold-warm);
    border-radius: 4px;
}

/* Individual movie card */
.movie-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(244, 200, 122, 0.1);
    border-radius: 16px;
    padding: var(--space-sm) var(--space-md);
    backdrop-filter: blur(8px);
    text-align: left;
    transition: all var(--duration-fast) var(--ease-smooth);
    opacity: 0;
    transform: translateY(25px) scale(0.95);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.movie-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-warm), transparent);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-smooth);
}

.movie-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.movie-card:hover {
    background: rgba(244, 200, 122, 0.06);
    border-color: rgba(244, 200, 122, 0.25);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 30px rgba(244, 200, 122, 0.1);
}

.movie-card:hover::before {
    opacity: 1;
}

.movie-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
}

.movie-emoji {
    font-size: 1.6rem;
    flex-shrink: 0;
    line-height: 1;
}

.movie-info {
    flex: 1;
}

.movie-title {
    font-family: var(--font-elegant);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--gold-light);
    line-height: 1.3;
}

.movie-year {
    font-family: var(--font-modern);
    font-size: 0.75rem;
    color: var(--white-dim);
    font-weight: 200;
    margin-left: 6px;
}

.movie-reason {
    font-family: var(--font-elegant);
    font-size: 0.92rem;
    color: var(--white-dim);
    font-style: italic;
    line-height: 1.4;
    margin-top: 4px;
}

.movie-genre {
    display: inline-block;
    margin-top: 6px;
    font-family: var(--font-modern);
    font-size: 0.7rem;
    font-weight: 300;
    padding: 2px 10px;
    border-radius: 20px;
    background: rgba(244, 200, 122, 0.08);
    color: var(--gold-warm);
    border: 1px solid rgba(244, 200, 122, 0.15);
}

/* ============================================= */
/*  SCENE 7: THE FINALE / PROMISE                */
/* ============================================= */

.scene-finale {
    background: radial-gradient(ellipse at 50% 30%, #2d1028 0%, #0a0a1a 70%);
}

#hearts-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.finale-container {
    position: relative;
    z-index: 5;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    max-height: 100vh;
    overflow-y: auto;

    scrollbar-width: thin;
    scrollbar-color: var(--rose-light) transparent;
}

.finale-container::-webkit-scrollbar {
    width: 4px;
}

.finale-container::-webkit-scrollbar-thumb {
    background: var(--rose-light);
    border-radius: 4px;
}

/* Infinity heart SVG */
.infinity-heart {
    width: 120px;
    height: 60px;
}

.infinity-svg {
    width: 100%;
    height: 100%;
}

.infinity-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: drawInfinity 3s ease-in-out forwards infinite;
}

.finale-title {
    font-family: var(--font-elegant);
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white-soft);
}

/* Promise Cards */
.promise-cards {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
    max-width: 700px;
}

.promise-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 107, 157, 0.1);
    border-radius: 16px;
    padding: var(--space-sm) var(--space-md);
    backdrop-filter: blur(6px);
    flex: 1 1 280px;
    max-width: 320px;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--duration-normal) var(--ease-smooth);
}

.promise-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.promise-card:hover {
    background: rgba(255, 107, 157, 0.06);
    border-color: rgba(255, 107, 157, 0.25);
    transform: translateY(-4px);
}

.promise-icon {
    font-size: 1.6rem;
    display: block;
    margin-bottom: var(--space-xs);
}

.promise-card p {
    font-family: var(--font-elegant);
    font-size: 1.05rem;
    color: var(--white-soft);
    font-style: italic;
    line-height: 1.5;
}

/* Final big message */
.finale-message {
    margin-top: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.finale-big-text {
    font-family: var(--font-handwriting);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--rose-primary);
    text-shadow: 0 0 60px var(--rose-glow), 0 0 120px rgba(255, 107, 157, 0.15);
    animation: heartbeat 2s ease-in-out infinite;
}

.finale-small-text {
    font-family: var(--font-elegant);
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    color: var(--white-dim);
    font-style: italic;
}

/* Restart button */
.restart-btn {
    margin-top: var(--space-sm);
    padding: 14px 36px;
    background: transparent;
    border: 1px solid var(--rose-primary);
    border-radius: 50px;
    color: var(--rose-primary);
    font-family: var(--font-elegant);
    font-size: 1.05rem;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
    letter-spacing: 0.05em;
}

.restart-btn:hover {
    background: var(--rose-primary);
    color: var(--night-deep);
    box-shadow: 0 0 30px var(--rose-glow);
    transform: scale(1.05);
}


/* ---- Continue Button (shared) ---- */
.continue-btn {
    padding: 14px 36px;
    background: transparent;
    border: 1px solid rgba(255, 168, 197, 0.3);
    border-radius: 50px;
    color: var(--rose-light);
    font-family: var(--font-elegant);
    font-size: 1.05rem;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.03em;
}

.continue-btn:hover {
    background: rgba(255, 107, 157, 0.1);
    border-color: var(--rose-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.2);
}

.continue-btn .btn-arrow {
    animation: bounceDown 1.5s ease-in-out infinite;
    font-size: 1.2rem;
}


/* ============================================= */
/*  KEYFRAME ANIMATIONS                          */
/* ============================================= */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
    45% { transform: scale(1.1); }
    60% { transform: scale(1); }
}

@keyframes orbPulse {
    0%, 100% { 
        opacity: 0.4; 
        transform: translate(-50%, -50%) scale(1); 
    }
    50% { 
        opacity: 0.7; 
        transform: translate(-50%, -50%) scale(1.3); 
    }
}

@keyframes shootingStar {
    0% {
        opacity: 0;
        transform: translateX(0) rotate(-35deg);
    }
    5% {
        opacity: 1;
    }
    15% {
        opacity: 0;
        transform: translateX(-300px) rotate(-35deg);
    }
    100% {
        opacity: 0;
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

@keyframes letterAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

@keyframes gentlePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes musicPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes drawInfinity {
    0% { stroke-dashoffset: 500; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -500; }
}

@keyframes sparkleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateY(80vh) scale(1);
    }
    90% {
        opacity: 0.6;
        transform: translateY(-10vh) scale(0.5);
    }
    100% {
        opacity: 0;
        transform: translateY(-20vh) scale(0);
    }
}


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

@media (max-width: 768px) {
    .scene-nav {
        right: 10px;
    }

    .nav-dot {
        width: 8px;
        height: 8px;
    }

    .reasons-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .promise-cards {
        gap: 0.6rem;
    }

    .promise-card {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .envelope-body {
        width: 80px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .reasons-grid {
        grid-template-columns: 1fr;
    }

    .letter-paper {
        padding: 1.2rem;
    }

    .gallery-frame {
        width: 90vw;
    }
}
