/* ===================================
   CSS Variables & Root Configuration
   =================================== */
:root {
    /* Color Palette */
    --deep-red: #B3002D;
    --rose-pink: #FF4F81;
    --soft-pink: #FFD6E7;
    --white: #FFFFFF;
    --gold: #FFD700;
    --dark-bg: #1a0a10;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    
    /* Typography */
    --font-script: 'Great Vibes', cursive;
    --font-body: 'Poppins', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.6s ease;
    --transition-slow: 1s ease;
    
    /* Shadows */
    --shadow-soft: 0 8px 32px rgba(179, 0, 45, 0.2);
    --shadow-glow: 0 0 20px rgba(255, 79, 129, 0.5);
    --shadow-gold: 0 0 30px rgba(255, 215, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--dark-bg);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

body.no-scroll {
    overflow: hidden;
}

body.reduce-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    outline: none;
}

button:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

/* ===================================
   Loading Screen
   =================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #2d0a15 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.loading-heart {
    width: 60px;
    height: 60px;
    position: relative;
    margin: 0 auto var(--spacing-md);
}

.loading-heart::before,
.loading-heart::after {
    content: '';
    position: absolute;
    width: 35px;
    height: 55px;
    background: linear-gradient(135deg, var(--rose-pink) 0%, var(--deep-red) 100%);
    border-radius: 35px 35px 0 0;
    transform: rotate(-45deg);
    left: 10px;
    top: 0;
    animation: loadingPulse 1s ease-in-out infinite;
}

.loading-heart::after {
    left: 25px;
    transform: rotate(45deg);
    animation-delay: 0.1s;
}

@keyframes loadingPulse {
    0%, 100% { transform: scale(1) rotate(-45deg); }
    50% { transform: scale(1.1) rotate(-45deg); }
}

.loading-text {
    font-size: 1.1rem;
    color: var(--soft-pink);
    animation: textFade 2s ease-in-out infinite;
}

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

/* ===================================
   Floating Background Elements
   =================================== */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.6;
    animation: floatHeart linear infinite;
}

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    animation: particleFloat linear infinite;
    box-shadow: 0 0 10px var(--gold);
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    20% { opacity: 1; }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--white);
    border-radius: 50%;
    animation: twinkle ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

.rose-petals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.petal {
    position: absolute;
    font-size: 2rem;
    animation: petalFall linear infinite;
    opacity: 0.8;
}

@keyframes petalFall {
    0% {
        transform: translateY(-50px) rotate(0deg) translateX(0);
        opacity: 0;
    }
    10% { opacity: 0.8; }
    100% {
        transform: translateY(100vh) rotate(720deg) translateX(100px);
        opacity: 0;
    }
}

/* ===================================
   Section Base Styles
   =================================== */
.section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===================================
   Landing Section
   =================================== */
.landing-section {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #2d0a15 50%, var(--dark-bg) 100%);
    overflow: hidden;
}

.aurora-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(179, 0, 45, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 79, 129, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 60%);
    animation: auroraShift 15s ease-in-out infinite;
}

@keyframes auroraShift {
    0%, 100% {
        background: 
            radial-gradient(ellipse at 20% 80%, rgba(179, 0, 45, 0.3) 0%, transparent 50%),
            radial-gradient(ellipse at 80% 20%, rgba(255, 79, 129, 0.2) 0%, transparent 50%),
            radial-gradient(ellipse at 50% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 60%);
    }
    33% {
        background: 
            radial-gradient(ellipse at 80% 80%, rgba(179, 0, 45, 0.3) 0%, transparent 50%),
            radial-gradient(ellipse at 20% 20%, rgba(255, 79, 129, 0.2) 0%, transparent 50%),
            radial-gradient(ellipse at 50% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 60%);
    }
    66% {
        background: 
            radial-gradient(ellipse at 50% 80%, rgba(179, 0, 45, 0.3) 0%, transparent 50%),
            radial-gradient(ellipse at 50% 20%, rgba(255, 79, 129, 0.2) 0%, transparent 50%),
            radial-gradient(ellipse at 80% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 60%);
    }
}

.landing-content {
    text-align: center;
    z-index: 10;
    padding: var(--spacing-md);
}

.main-title {
    font-family: var(--font-script);
    font-size: clamp(2.5rem, 8vw, 6rem);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    opacity: 0;
    animation: titleReveal 1.5s ease forwards 0.5s;
}

.title-line {
    display: block;
    text-shadow: 
        0 0 20px rgba(255, 79, 129, 0.5),
        0 0 40px rgba(255, 79, 129, 0.3);
}

.title-line.accent {
    color: var(--rose-pink);
    font-size: clamp(3rem, 10vw, 8rem);
}

.heart-emoji {
    display: inline-block;
    animation: heartBeat 1.5s ease-in-out infinite;
    font-size: clamp(3rem, 8vw, 5rem);
    margin-top: var(--spacing-sm);
}

@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 titleReveal {
    0% {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--soft-pink);
    margin-bottom: var(--spacing-lg);
    opacity: 0;
    animation: subtitleReveal 1s ease forwards 1s;
    font-weight: 300;
    letter-spacing: 2px;
}

@keyframes subtitleReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.glow-btn {
    position: relative;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--white);
    background: linear-gradient(135deg, var(--deep-red) 0%, var(--rose-pink) 100%);
    border-radius: 50px;
    overflow: hidden;
    opacity: 0;
    animation: btnReveal 1s ease forwards 1.5s;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: var(--shadow-glow);
}

.glow-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(255, 79, 129, 0.7);
}

.glow-btn:active {
    transform: scale(0.98);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: btnShine 3s ease-in-out infinite;
}

@keyframes btnShine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

@keyframes btnReveal {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.scroll-hint {
    position: absolute;
    bottom: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s ease-in-out infinite;
    opacity: 0;
    animation: scrollHint 1s ease forwards 2s, bounce 2s ease-in-out infinite 2s;
}

@keyframes scrollHint {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

.scroll-hint span {
    font-size: 2rem;
    color: var(--soft-pink);
}

/* ===================================
   Story Section
   =================================== */
.story-section {
    min-height: 100vh;
    padding: var(--spacing-lg) var(--spacing-md);
    background: linear-gradient(180deg, var(--dark-bg) 0%, #150810 100%);
}

.story-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(179, 0, 45, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 0% 50%, rgba(255, 79, 129, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 50%, rgba(255, 79, 129, 0.1) 0%, transparent 50%);
}

.progress-container {
    position: fixed;
    top: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    text-align: center;
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: var(--spacing-xs);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--deep-red), var(--rose-pink), var(--gold));
    border-radius: 2px;
    width: 7.69%;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--soft-pink);
    font-weight: 500;
}

.cards-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.card {
    position: absolute;
    width: 90%;
    max-width: 500px;
    padding: var(--spacing-lg);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

.card.prev {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-100%) rotateY(90deg);
}

.card.next {
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%) rotateY(-90deg);
}

/* Card Animations */
.card.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.card.slide-in {
    animation: slideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.card.scale-in {
    animation: scaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.card.rotate-in {
    animation: rotateIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.card.blur-in {
    animation: blurIn 1s ease forwards;
}

.card.flip-in {
    animation: flipIn 1s ease forwards;
}

.card.floating-in {
    animation: floatingIn 1s ease forwards;
}

.card.glow-in {
    animation: glowIn 1s ease forwards;
}

.card.zoom-rotate-in {
    animation: zoomRotateIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.card.unfold-in {
    animation: unfoldIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.card.heartbeat-in {
    animation: heartbeatIn 1s ease forwards;
}

.card.spiral-in {
    animation: spiralIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.card.drop-in {
    animation: dropIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.card.swing-in {
    animation: swingIn 1s ease forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes slideIn {
    0% { opacity: 0; transform: translateX(100px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes rotateIn {
    0% { opacity: 0; transform: rotate(-180deg); }
    100% { opacity: 1; transform: rotate(0); }
}

@keyframes blurIn {
    0% { opacity: 0; filter: blur(20px); }
    100% { opacity: 1; filter: blur(0); }
}

@keyframes flipIn {
    0% { opacity: 0; transform: rotateY(180deg); }
    100% { opacity: 1; transform: rotateY(0); }
}

@keyframes floatingIn {
    0% { opacity: 0; transform: translateY(-50px) rotate(5deg); }
    50% { transform: translateY(10px) rotate(-3deg); }
    100% { opacity: 1; transform: translateY(0) rotate(0); }
}

@keyframes glowIn {
    0% { opacity: 0; box-shadow: 0 0 0 rgba(255, 79, 129, 0); }
    50% { box-shadow: 0 0 60px rgba(255, 79, 129, 0.8); }
    100% { opacity: 1; box-shadow: var(--shadow-glow); }
}

@keyframes zoomRotateIn {
    0% { opacity: 0; transform: scale(0) rotate(-360deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes unfoldIn {
    0% { opacity: 0; transform: scaleY(0) scaleX(0.5); }
    100% { opacity: 1; transform: scaleY(1) scaleX(1); }
}

@keyframes heartbeatIn {
    0% { opacity: 0; transform: scale(0.5); }
    30% { transform: scale(1.2); }
    50% { transform: scale(0.95); }
    70% { transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes spiralIn {
    0% { opacity: 0; transform: translateY(-100px) rotate(-720deg) scale(0); }
    100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

@keyframes dropIn {
    0% { opacity: 0; transform: translateY(-200px); }
    60% { transform: translateY(20px); }
    80% { transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes swingIn {
    0% { opacity: 0; transform: rotate(-15deg) translateX(-50px); }
    40% { transform: rotate(10deg) translateX(30px); }
    70% { transform: rotate(-5deg) translateX(-15px); }
    100% { opacity: 1; transform: rotate(0) translateX(0); }
}

/* Glass Card Styling */
.glass-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    box-shadow: 
        0 8px 32px rgba(179, 0, 45, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.glass-card:hover {
    transform: translateY(-5px) rotateX(2deg);
    box-shadow: 
        0 15px 45px rgba(179, 0, 45, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.card-decoration {
    margin-bottom: var(--spacing-md);
}

.heart-icon {
    width: 60px;
    height: 60px;
    fill: var(--rose-pink);
    filter: drop-shadow(0 0 15px rgba(255, 79, 129, 0.5));
    animation: heartFloat 3s ease-in-out infinite;
}

@keyframes heartFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

.card-number {
    display: block;
    font-size: 0.9rem;
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
}

.card-title {
    font-family: var(--font-script);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 400;
    color: var(--white);
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.card-sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 24px;
}

.card-sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    animation: sparkle 2s ease-in-out infinite;
}

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

/* ===================================
   Navigation
   =================================== */
.navigation {
    position: fixed;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    z-index: 100;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
    background: rgba(179, 0, 45, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    transition: all var(--transition-fast);
}

.nav-btn:hover {
    background: rgba(255, 79, 129, 0.4);
    transform: scale(1.05);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn:disabled:hover {
    transform: none;
    background: rgba(179, 0, 45, 0.3);
}

.nav-btn svg {
    width: 20px;
    height: 20px;
}

.nav-hearts {
    animation: navHeartBeat 1.5s ease-in-out infinite;
}

.nav-heart {
    font-size: 1.5rem;
}

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

/* ===================================
   Music Toggle
   =================================== */
.music-toggle {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-md);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(179, 0, 45, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 100;
    transition: all var(--transition-fast);
}

.music-toggle:hover {
    background: rgba(255, 79, 129, 0.4);
    transform: scale(1.1);
}

.music-icon {
    width: 24px;
    height: 24px;
    fill: var(--white);
    transition: opacity var(--transition-fast);
}

.music-icon.muted {
    display: none;
}

.music-toggle.playing .music-icon:not(.muted) {
    display: block;
}

.music-toggle.playing .music-icon.muted {
    display: none;
}

.music-toggle:not(.playing) .music-icon:not(.muted) {
    display: none;
}

.music-toggle:not(.playing) .music-icon.muted {
    display: block;
}

/* ===================================
   Final Section
   =================================== */
.final-section {
    min-height: 100vh;
    background: linear-gradient(180deg, #150810 0%, #0a0510 100%);
    flex-direction: column;
    padding: var(--spacing-xl) var(--spacing-md);
}

.final-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.glowing-roses {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(179, 0, 45, 0.3) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 80%, rgba(179, 0, 45, 0.3) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 100%, rgba(255, 79, 129, 0.2) 0%, transparent 50%);
    animation: rosesGlow 4s ease-in-out infinite;
}

@keyframes rosesGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.confession-container {
    position: relative;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all 1s ease;
}

.confession-container.visible {
    opacity: 1;
    visibility: visible;
}

.letter {
    background: linear-gradient(135deg, #fff9f0 0%, #fff5e6 100%);
    padding: var(--spacing-lg);
    border-radius: 4px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    transform-style: preserve-3d;
    animation: letterFloat 4s ease-in-out infinite;
}

@keyframes letterFloat {
    0%, 100% { transform: translateY(0) rotateX(0); }
    50% { transform: translateY(-10px) rotateX(2deg); }
}

.letter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 28px,
            rgba(200, 180, 160, 0.3) 28px,
            rgba(200, 180, 160, 0.3) 29px
        );
    pointer-events: none;
    border-radius: 4px;
}

.letter-content {
    color: #4a3728;
    font-family: 'Courier New', monospace;
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 2;
    position: relative;
}

.letter-line {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    margin-bottom: 0.5rem;
}

.letter-line.visible {
    opacity: 1;
    transform: translateY(0);
}

.letter-line.highlight {
    color: var(--deep-red);
    font-weight: bold;
}

.letter-line.signature {
    font-family: var(--font-script);
    font-size: 1.8rem;
    color: var(--deep-red);
    margin-top: var(--spacing-md);
    text-align: right;
}

.letter-line.final {
    font-weight: bold;
    color: var(--deep-red);
}

/* ===================================
   Declaration
   =================================== */
.declaration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    background: radial-gradient(ellipse at center, #1a0a10 0%, #000 100%);
    transition: all 1s ease;
}

.declaration.visible {
    opacity: 1;
    visibility: visible;
}

.beating-heart {
    font-size: 5rem;
    animation: beatingHeart 1s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(255, 79, 129, 0.8));
}

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

.declaration-text {
    font-family: var(--font-script);
    font-size: clamp(3rem, 12vw, 8rem);
    background: linear-gradient(135deg, var(--rose-pink) 0%, var(--gold) 50%, var(--rose-pink) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite;
    text-shadow: none;
    filter: drop-shadow(0 0 30px rgba(255, 79, 129, 0.5));
}

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

.declaration-heart {
    font-size: 3rem;
    animation: heartBeat 1.5s ease-in-out infinite;
    margin-top: var(--spacing-md);
}

/* ===================================
   Replay Button
   =================================== */
.replay-btn {
    position: fixed;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
    background: linear-gradient(135deg, var(--deep-red) 0%, var(--rose-pink) 100%);
    border-radius: 30px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-glow);
}

.replay-btn.visible {
    opacity: 1;
    visibility: visible;
}

.replay-btn:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 0 40px rgba(255, 79, 129, 0.7);
}

.replay-btn svg {
    width: 20px;
    height: 20px;
}

/* ===================================
   Confetti Container
   =================================== */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ===================================
   Fireworks Container
   =================================== */
.fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 998;
    overflow: hidden;
}

.firework {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    animation: fireworkExplode 1.5s ease-out forwards;
}

@keyframes fireworkExplode {
    0% {
        transform: scale(0);
        opacity: 1;
        box-shadow: 
            0 0 0 0 currentColor,
            0 -30px 0 0 currentColor,
            30px 0 0 0 currentColor,
            0 30px 0 0 currentColor,
            -30px 0 0 0 currentColor,
            21px -21px 0 0 currentColor,
            21px 21px 0 0 currentColor,
            -21px 21px 0 0 currentColor,
            -21px -21px 0 0 currentColor;
    }
    50% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 
            0 0 0 0 currentColor,
            0 -60px 0 0 currentColor,
            60px 0 0 0 currentColor,
            0 60px 0 0 currentColor,
            -60px 0 0 0 currentColor,
            42px -42px 0 0 currentColor,
            42px 42px 0 0 currentColor,
            -42px 42px 0 0 currentColor,
            -42px -42px 0 0 currentColor;
    }
    100% {
        transform: scale(2);
        opacity: 0;
        box-shadow: 
            0 0 0 0 currentColor,
            0 -100px 0 -2px currentColor,
            100px 0 0 -2px currentColor,
            0 100px 0 -2px currentColor,
            -100px 0 0 -2px currentColor,
            70px -70px 0 -2px currentColor,
            70px 70px 0 -2px currentColor,
            -70px 70px 0 -2px currentColor,
            -70px -70px 0 -2px currentColor;
    }
}

/* ===================================
   Mouse Trail & Cursor Glow
   =================================== */
.mouse-trail {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

.trail-heart {
    position: absolute;
    font-size: 1rem;
    opacity: 0;
    animation: trailFade 1s ease forwards;
}

@keyframes trailFade {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0) translateY(-20px); }
}

.cursor-glow {
    position: fixed;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 79, 129, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

/* ===================================
   Ripple Effect
   =================================== */
.ripple {
    position: fixed;
    border-radius: 50%;
    background: rgba(255, 79, 129, 0.4);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
    z-index: 9997;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===================================
   Love Quotes Rotation
   =================================== */
.love-quotes {
    position: fixed;
    top: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: var(--soft-pink);
    font-style: italic;
    opacity: 0.7;
    text-align: center;
    z-index: 50;
    max-width: 90%;
}

/* ===================================
   Responsive Styles
   =================================== */
@media (max-width: 768px) {
    .navigation {
        bottom: var(--spacing-md);
        gap: var(--spacing-sm);
    }
    
    .nav-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.9rem;
    }
    
    .nav-btn span {
        display: none;
    }
    
    .music-toggle {
        bottom: var(--spacing-md);
        right: var(--spacing-sm);
        width: 44px;
        height: 44px;
    }
    
    .card {
        padding: var(--spacing-md);
    }
    
    .letter {
        padding: var(--spacing-md);
        margin: 0 var(--spacing-sm);
    }
    
    .progress-container {
        top: var(--spacing-sm);
    }
    
    .progress-bar {
        width: 150px;
    }
    
    .declaration-text {
        font-size: clamp(2.5rem, 10vw, 6rem);
    }
    
    .beating-heart {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .title-line.accent {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .glow-btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 1.6rem;
    }
    
    .heart-icon {
        width: 50px;
        height: 50px;
    }
}

/* ===================================
   Reduced Motion Support
   =================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading-heart::before,
    .loading-heart::after {
        animation: none;
    }
}

/* ===================================
   Scrollbar Styling
   =================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--deep-red), var(--rose-pink));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--rose-pink);
}

/* ===================================
   Selection Styling
   =================================== */
::selection {
    background: var(--rose-pink);
    color: var(--white);
}

::-moz-selection {
    background: var(--rose-pink);
    color: var(--white);
}

/* ===================================
   Utility Classes
   =================================== */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
