/* ============================
   VALENTINE'S DAY WEBSITE
   For Baisah 💜
   ============================ */

/* === ROOT VARIABLES === */
:root {
    --deep-purple: #4a0e4e;
    --violet: #8b5cf6;
    --violet-dark: #6d28d9;
    --violet-light: #a78bfa;
    --lavender: #c4b5fd;
    --lavender-soft: #ede9fe;
    --rose: #f472b6;
    --rose-dark: #ec4899;
    --rose-light: #f9a8d4;
    --gold: #fbbf24;
    --gold-soft: #fde68a;
    --dark-bg: #0a0015;
    --dark-bg2: #110022;
    --dark-card: rgba(30, 10, 60, 0.7);
    --white: #ffffff;
    --text-soft: #e8d5f5;
    --glass-bg: rgba(139, 92, 246, 0.1);
    --glass-border: rgba(139, 92, 246, 0.3);
}

/* === RESET & BASE === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--dark-bg);
    color: var(--white);
    overflow-x: hidden;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ctext y='18' font-size='18'%3E💜%3C/text%3E%3C/svg%3E") 12 12, auto;
}

/* === PRELOADER === */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-heart {
    font-size: 60px;
    animation: heartPulse 1s ease-in-out infinite;
}

.preloader-text {
    margin-top: 20px;
    font-family: 'Dancing Script', cursive;
    font-size: 1.4rem;
    color: var(--lavender);
    animation: fadeInOut 2s ease-in-out infinite;
}

/* === GLOBAL CANVAS === */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* === MUSIC BUTTON === */
.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--lavender);
    padding: 10px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeIn 1s ease 2s forwards;
}

.music-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.music-btn.playing {
    border-color: var(--violet);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.music-btn.playing .music-icon {
    animation: musicBounce 0.6s ease infinite;
}

/* === SCROLL INDICATOR === */
.scroll-indicator {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    opacity: 0;
    animation: fadeIn 1s ease 3s forwards;
}

.scroll-dots {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--violet);
    box-shadow: 0 0 10px var(--violet);
    transform: scale(1.3);
}

.dot:hover {
    background: var(--violet-light);
    transform: scale(1.2);
}

/* === SCENES GENERAL === */
.scene {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* === SCENE 1: ENVELOPE === */
.scene-envelope {
    background: radial-gradient(ellipse at center, #1a0030 0%, var(--dark-bg) 70%);
}

.stars-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--white);
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
    opacity: 0;
}

.floating-petals {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.petal {
    position: absolute;
    font-size: var(--size, 20px);
    opacity: 0.6;
    animation: floatPetal var(--duration, 8s) linear infinite;
    animation-delay: var(--delay, 0s);
    top: -30px;
    left: var(--left, 50%);
}

/* Envelope */
.envelope-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    z-index: 10;
}

.envelope {
    position: relative;
    width: 280px;
    height: 200px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.envelope:hover {
    transform: scale(1.05) translateY(-5px);
}

.envelope-back {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.4),
        0 0 80px rgba(139, 92, 246, 0.2);
}

.envelope-front {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 65%;
    background: linear-gradient(180deg, #6d28d9, #4c1d95);
    border-radius: 0 0 12px 12px;
    clip-path: polygon(0 30%, 50% 0, 100% 30%, 100% 100%, 0 100%);
    z-index: 2;
}

.envelope-flap {
    position: absolute;
    top: 0;
    width: 100%;
    height: 55%;
    background: linear-gradient(180deg, #8b5cf6, #7c3aed);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    z-index: 3;
    transform-origin: top center;
    transition: transform 0.8s ease;
}

.envelope-flap.open {
    transform: rotateX(180deg);
    z-index: 0;
}

.envelope-seal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    z-index: 4;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.8));
    animation: heartPulse 1.5s ease-in-out infinite;
    transition: opacity 0.5s ease;
}

.envelope-letter {
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 60%;
    background: linear-gradient(to bottom, #faf5ff, #ede9fe);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: transform 1s ease 0.3s;
}

.envelope-letter p {
    color: var(--deep-purple);
    font-family: 'Dancing Script', cursive;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.5s ease 1s;
}

.envelope.opened .envelope-letter {
    transform: translateY(-120px);
    z-index: 5;
}

.envelope.opened .envelope-letter p {
    opacity: 1;
}

.envelope.opened .envelope-seal {
    opacity: 0;
}

.whisper-text {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    color: var(--lavender);
    text-align: center;
    opacity: 0;
    animation: fadeInUp 1.5s ease 0.5s forwards;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.open-btn {
    position: relative;
    padding: 16px 48px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--violet), var(--rose));
    color: var(--white);
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 1s ease 1.5s forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 10;
}

.open-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.5);
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: btnGlow 2s ease-in-out infinite;
    pointer-events: none;
}

.open-btn.hidden,
.whisper-text.hidden {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Confetti */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.confetti-piece {
    position: absolute;
    width: var(--size, 10px);
    height: var(--size, 10px);
    background: var(--color);
    top: var(--top, 50%);
    left: var(--left, 50%);
    opacity: 0;
    animation: confettiFall var(--duration, 3s) ease-out forwards;
    animation-delay: var(--delay, 0s);
}

.confetti-piece.circle {
    border-radius: 50%;
}

.confetti-piece.heart {
    background: none;
    font-size: var(--size, 14px);
}

/* === SCENE 2: ACROSS THE MILES === */
.scene-miles {
    background: radial-gradient(ellipse at 30% 50%, #1a0040 0%, #0d0025 40%, var(--dark-bg) 70%);
    overflow: hidden;
}

/* Shooting Stars Canvas */
#shootingStarsCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Aurora Borealis Effect */
.aurora-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(244, 114, 182, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(167, 139, 250, 0.06) 0%, transparent 50%);
    animation: auroraPulse 8s ease-in-out infinite alternate;
    z-index: 2;
    pointer-events: none;
}

/* Nebula effect */
.miles-nebula {
    position: absolute;
    width: 600px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, rgba(244, 114, 182, 0.03) 40%, transparent 70%);
    border-radius: 50%;
    animation: nebulaRotate 20s linear infinite;
    z-index: 2;
    pointer-events: none;
}

.floating-clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.cloud {
    position: absolute;
    font-size: var(--size, 40px);
    opacity: 0.08;
    animation: cloudFloat var(--duration, 30s) linear infinite;
    top: var(--top, 30%);
    left: -100px;
}

.miles-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    z-index: 10;
    padding: 20px;
    width: 100%;
    max-width: 900px;
}

.miles-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

.miles-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.title-word {
    background: linear-gradient(135deg, var(--violet-light), var(--rose-light), var(--gold-soft));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 4s ease-in-out infinite;
    display: inline-block;
}

.title-word:nth-child(1) {
    animation-delay: 0s;
}

.title-word:nth-child(2) {
    animation-delay: 0.3s;
}

.title-word:nth-child(3) {
    animation-delay: 0.6s;
}

.miles-subtitle {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--lavender);
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease 0.3s;
    letter-spacing: 1px;
}

.miles-subtitle.visible,
.miles-title.visible~.miles-subtitle {
    opacity: 0.8;
    transform: translateY(0);
}

.map-container {
    width: 100%;
    max-width: 800px;
    opacity: 0;
    transform: scale(0.9);
    transition: all 1s ease 0.3s;
    position: relative;
}

.map-container.visible {
    opacity: 1;
    transform: scale(1);
}

/* Glowing ring behind the map */
.map-glow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(139, 92, 246, 0.1);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.08), inset 0 0 60px rgba(139, 92, 246, 0.04);
    animation: ringPulse 4s ease-in-out infinite;
}

.world-map {
    width: 100%;
    height: auto;
    position: relative;
    z-index: 2;
}

.pulse-dot {
    animation: pulseDot 2s ease-in-out infinite;
}

/* Ripple rings on map markers */
.ripple-ring {
    animation: rippleExpand 3s ease-out infinite;
}

.ripple-1 {
    animation-delay: 0s;
}

.ripple-2 {
    animation-delay: 1.5s;
}

/* Animated dashed path */
.animated-path {
    stroke-dashoffset: 0;
    animation: dashFlow 2s linear infinite;
}

/* === DISTANCE CARD (Glassmorphism) === */
.distance-card {
    position: relative;
    padding: 30px 50px;
    background: rgba(20, 5, 50, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 24px;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease 0.6s;
    overflow: hidden;
}

.distance-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.distance-card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(139, 92, 246, 0.08) 90deg, transparent 180deg, rgba(244, 114, 182, 0.06) 270deg, transparent 360deg);
    animation: rotateGradient 10s linear infinite;
    pointer-events: none;
}

.distance-top {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.distance-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: var(--lavender);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
}

.distance-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.distance-num {
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-soft), #fcd34d);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 3s ease-in-out infinite;
    font-family: 'Outfit', sans-serif;
}

.distance-unit {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--lavender);
    opacity: 0.6;
}

.distance-divider {
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--violet), var(--rose), transparent);
    margin: 16px auto;
    opacity: 0.4;
    position: relative;
    z-index: 1;
}

.distance-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.distance-quote {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--violet-light);
}

.distance-emoji {
    font-size: 1.2rem;
    animation: heartPulse 1.5s ease-in-out infinite;
}

/* Rotating Quotes */
.miles-quotes {
    position: relative;
    height: 40px;
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease 1s;
}

.miles-quotes.visible {
    opacity: 1;
    transform: translateY(0);
}

.miles-quote {
    position: absolute;
    width: 100%;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.85rem, 2vw, 1rem);
    color: var(--text-soft);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
    font-style: italic;
}

.miles-quote.active {
    opacity: 0.7;
    transform: translateY(0);
}

.highlight {
    color: var(--violet-light);
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.4rem, 4vw, 2rem);
}

/* === SCENE 3: LOVE CARDS === */
.scene-cards {
    background: radial-gradient(ellipse at 70% 30%, #200040 0%, var(--dark-bg) 60%);
    flex-direction: column;
    padding: 60px 20px;
    gap: 40px;
    min-height: 100vh;
}

.cards-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 5vw, 3rem);
    background: linear-gradient(135deg, var(--lavender), var(--rose-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.cards-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1000px;
    padding: 0 20px;
}

/* Flip Card */
.flip-card {
    perspective: 1000px;
    height: 320px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(50px) rotateX(10deg);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.flip-card.visible {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    overflow: hidden;
}

.flip-card-front {
    background: var(--dark-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 60px rgba(139, 92, 246, 0.05);
}

.flip-card-front::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(139, 92, 246, 0.1) 60deg, transparent 120deg);
    animation: rotateGradient 8s linear infinite;
}

.card-emoji {
    font-size: 64px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.4));
    animation: floatEmoji 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.card-decoration {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.tiny-heart,
.tiny-star,
.tiny-flower {
    font-size: 14px;
    animation: twinkleDecor 2s ease-in-out infinite;
}

.tiny-heart:nth-child(2) {
    animation-delay: 0.3s;
}

.tiny-heart:nth-child(3) {
    animation-delay: 0.6s;
}

.tiny-star:nth-child(2) {
    animation-delay: 0.4s;
}

.tiny-star:nth-child(3) {
    animation-delay: 0.8s;
}

.tiny-flower:nth-child(2) {
    animation-delay: 0.5s;
}

.tiny-flower:nth-child(3) {
    animation-delay: 1s;
}

.card-label {
    font-family: 'Dancing Script', cursive;
    font-size: 1rem;
    color: var(--lavender);
    opacity: 0.7;
    position: relative;
    z-index: 1;
}

.flip-card-back {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(244, 114, 182, 0.15));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.4);
    transform: rotateY(180deg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 80px rgba(139, 92, 246, 0.08);
}

.card-message {
    font-family: 'Dancing Script', cursive;
    font-size: 1.25rem;
    color: var(--lavender-soft);
    text-align: center;
    line-height: 1.7;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Card color themes */
.card-teddy {
    --card-accent: #d97706;
}

.card-balloon {
    --card-accent: #ef4444;
}

.card-violet {
    --card-accent: #8b5cf6;
}

.card-letter {
    --card-accent: #ec4899;
}

.card-moon {
    --card-accent: #fbbf24;
}

.card-time {
    --card-accent: #06b6d4;
}

.flip-card-front::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--card-accent, var(--violet)), transparent);
}

/* === SCENE 4: GARDEN === */
.scene-garden {
    background: linear-gradient(180deg, #0a0020 0%, #150030 40%, #1a0a2e 100%);
    flex-direction: column;
    position: relative;
}

#gardenCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.garden-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    pointer-events: none;
}

.garden-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, var(--violet-light), var(--rose), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

.garden-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.garden-subtitle {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: var(--lavender);
    opacity: 0.7;
    animation: fadeInOut 3s ease-in-out infinite;
}

.garden-message-box {
    margin-top: 20px;
    padding: 30px 50px;
    background: rgba(30, 10, 60, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.2);
    opacity: 0;
    transform: scale(0.9);
    transition: all 1s ease 0.5s;
}

.garden-message-box.visible {
    opacity: 1;
    transform: scale(1);
}

.garden-main-text {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.3rem, 4vw, 2.2rem);
    color: var(--lavender-soft);
    text-align: center;
    line-height: 1.6;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
}

/* Garden Animated Elements */
.garden-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.garden-teddy {
    position: absolute;
    font-size: clamp(30px, 5vw, 50px);
    animation: peekaboo 4s ease-in-out infinite;
}

.teddy-1 {
    bottom: 10%;
    left: 8%;
    animation-delay: 0s;
}

.teddy-2 {
    bottom: 15%;
    right: 10%;
    animation-delay: 2s;
}

.garden-balloon {
    position: absolute;
    font-size: clamp(24px, 4vw, 40px);
    animation: floatBalloon 6s ease-in-out infinite;
}

.balloon-1 {
    bottom: 30%;
    left: 15%;
    animation-delay: 0s;
}

.balloon-2 {
    bottom: 40%;
    left: 50%;
    animation-delay: 1s;
}

.balloon-3 {
    bottom: 35%;
    right: 20%;
    animation-delay: 2.5s;
}

.garden-flower {
    position: absolute;
    font-size: clamp(18px, 3vw, 30px);
    animation: bloomFlower 3s ease-in-out infinite;
}

.flower-1 {
    bottom: 5%;
    left: 5%;
    animation-delay: 0s;
}

.flower-2 {
    bottom: 3%;
    left: 18%;
    animation-delay: 0.5s;
}

.flower-3 {
    bottom: 7%;
    left: 30%;
    animation-delay: 1s;
}

.flower-4 {
    bottom: 4%;
    left: 45%;
    animation-delay: 1.5s;
}

.flower-5 {
    bottom: 6%;
    left: 58%;
    animation-delay: 2s;
}

.flower-6 {
    bottom: 3%;
    left: 70%;
    animation-delay: 0.8s;
}

.flower-7 {
    bottom: 5%;
    left: 82%;
    animation-delay: 1.3s;
}

.flower-8 {
    bottom: 7%;
    right: 5%;
    animation-delay: 1.8s;
}

/* Spawned flower */
.spawned-flower {
    position: absolute;
    pointer-events: none;
    z-index: 8;
    animation: spawnFlower 2s ease-out forwards;
}

/* === SCENE 5: FINALE === */
.scene-finale {
    background: radial-gradient(ellipse at 50% 40%, #2d0050 0%, var(--dark-bg) 70%);
    flex-direction: column;
}

#finaleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.finale-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 40px 20px;
}

.heartbeat-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.heartbeat-container.visible {
    opacity: 1;
    transform: scale(1);
}

.big-heart {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: heartBeat 1.2s ease-in-out infinite;
}

.heart-symbol {
    font-size: 80px;
    filter: drop-shadow(0 0 30px rgba(244, 114, 182, 0.6));
}

.big-heart::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.15) 0%, transparent 70%);
    animation: heartGlow 1.2s ease-in-out infinite;
}

.names-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
}

.name-chris {
    background: linear-gradient(135deg, var(--violet-light), var(--lavender));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.name-baisah {
    background: linear-gradient(135deg, var(--rose), var(--rose-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.name-ampersand {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    animation: heartPulse 1.5s ease-in-out infinite;
}

.finale-message {
    max-width: 600px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease 0.5s;
}

.finale-message.visible {
    opacity: 1;
    transform: translateY(0);
}

.finale-text {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--lavender-soft);
    line-height: 1.8;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.finale-text .cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--violet-light);
    margin-left: 2px;
    animation: blink 0.8s step-end infinite;
}

.forever-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 20px 40px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(244, 114, 182, 0.1));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease 1s;
}

.forever-badge.visible {
    opacity: 1;
    transform: translateY(0);
}

.badge-text {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-year {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--lavender);
    letter-spacing: 4px;
}

.finale-footer {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: all 1s ease 1.5s;
}

.finale-footer.visible {
    opacity: 1;
}

.footer-note {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: var(--lavender);
    opacity: 0.7;
    text-align: center;
}

.footer-flowers {
    display: flex;
    gap: 10px;
    font-size: 24px;
}

.footer-flowers span {
    animation: floatEmoji 3s ease-in-out infinite;
}

.footer-flowers span:nth-child(2) {
    animation-delay: 0.3s;
}

.footer-flowers span:nth-child(3) {
    animation-delay: 0.6s;
}

.footer-flowers span:nth-child(4) {
    animation-delay: 0.9s;
}

.footer-flowers span:nth-child(5) {
    animation-delay: 1.2s;
}

/* ============================
   KEYFRAME ANIMATIONS
   ============================ */

@keyframes heartPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.15);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.1);
    }

    60% {
        transform: scale(1);
    }
}

@keyframes heartGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes floatPetal {
    0% {
        transform: translateY(0) rotate(0deg) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 0.7;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(100vh) rotate(360deg) translateX(var(--drift, 100px));
        opacity: 0;
    }
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(var(--fall-distance, 400px)) rotate(var(--rotation, 720deg)) scale(0.5) translateX(var(--drift, 100px));
    }
}

@keyframes cloudFloat {
    from {
        left: -100px;
    }

    to {
        left: calc(100% + 100px);
    }
}

@keyframes pulseDot {

    0%,
    100% {
        r: 8;
        opacity: 1;
    }

    50% {
        r: 12;
        opacity: 0.7;
    }
}

@keyframes rotateGradient {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes floatEmoji {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes twinkleDecor {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes musicBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

@keyframes btnGlow {

    0%,
    100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(0.8);
    }

    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes peekaboo {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }

    25% {
        transform: translateY(-20px) rotate(-5deg);
        opacity: 1;
    }

    75% {
        transform: translateY(-10px) rotate(5deg);
        opacity: 0.9;
    }
}

@keyframes floatBalloon {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-40px) rotate(5deg);
    }

    66% {
        transform: translateY(-20px) rotate(-3deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes bloomFlower {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.3) rotate(10deg);
    }
}

@keyframes spawnFlower {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }

    40% {
        opacity: 1;
        transform: scale(1.4) rotate(180deg);
    }

    100% {
        opacity: 0;
        transform: scale(0.8) rotate(360deg) translateY(-60px);
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes auroraPulse {
    0% {
        opacity: 0.6;
        background-position: 0% 0%;
    }

    100% {
        opacity: 1;
        background-position: 100% 100%;
    }
}

@keyframes nebulaRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes shimmerText {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes ringPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

@keyframes rippleExpand {
    0% {
        r: 30;
        opacity: 0.3;
    }

    100% {
        r: 70;
        opacity: 0;
    }
}

@keyframes dashFlow {
    to {
        stroke-dashoffset: -36;
    }
}

/* ============================
   RESPONSIVE DESIGN
   ============================ */

@media (max-width: 768px) {
    .envelope {
        width: 220px;
        height: 160px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .flip-card {
        height: 280px;
    }

    .card-emoji {
        font-size: 48px;
    }

    .garden-message-box {
        padding: 20px 25px;
        margin: 0 15px;
    }

    .scroll-indicator {
        right: 8px;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .music-btn {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 0.75rem;
    }

    .distance-card {
        padding: 20px 25px;
        margin: 0 10px;
    }

    .miles-quotes {
        height: 50px;
    }

    .big-heart {
        width: 90px;
        height: 90px;
    }

    .heart-symbol {
        font-size: 60px;
    }

    .forever-badge {
        padding: 15px 30px;
    }

    .footer-flowers {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .scene-cards {
        padding: 40px 10px;
    }

    .cards-grid {
        padding: 0 10px;
    }

    .flip-card {
        height: 260px;
    }

    .garden-teddy {
        font-size: 28px;
    }

    .garden-balloon {
        font-size: 22px;
    }
}

/* === PERFORMANCE === */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}