/* ========================================
   Valentine Website - Core Styles
   For Sarika 💕
   ======================================== */

/* CSS Variables - Design System */
:root {
    /* Colors */
    --deep-rose: #FF1E56;
    --soft-pink: #FFBCD9;
    --romantic-red: #C41E3A;
    --gold-shimmer: #FFD700;
    --deep-purple: #2D132C;
    --darker-purple: #1a0a1a;
    --cream-white: #FFF8E7;
    --blush: #FF6B8A;
    --lavender: #E8D5E8;
    
    /* Gradients */
    --gradient-romantic: linear-gradient(135deg, #FF1E56 0%, #FF6B8A 50%, #FFB6C1 100%);
    --gradient-sunset: linear-gradient(180deg, #2D132C 0%, #C41E3A 50%, #FF6B8A 100%);
    --gradient-dark: linear-gradient(180deg, #1a0a1a 0%, #2D132C 100%);
    --gradient-glow: radial-gradient(circle, rgba(255, 30, 86, 0.4) 0%, transparent 70%);
    
    /* Typography */
    --font-display: 'Great Vibes', cursive;
    --font-body: 'Cormorant Garamond', serif;
    --font-modern: 'Outfit', sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s ease;
    --transition-slow: 0.8s ease;
    --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--gradient-dark);
    color: var(--cream-white);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--deep-purple);
}

::-webkit-scrollbar-thumb {
    background: var(--deep-rose);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--romantic-red);
}

/* Utility Classes */
.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ========================================
   Loading Screen
   ======================================== */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-content {
    text-align: center;
}

.loading-heart {
    font-size: 4rem;
    animation: pulse 1s ease-in-out infinite;
}

.loading-text {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--soft-pink);
    margin: var(--space-md) 0;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: var(--gradient-romantic);
    border-radius: 2px;
    animation: loadProgress 2s ease-out forwards;
}

/* ========================================
   Particles Container
   ======================================== */
#particles-container {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    pointer-events: none;
    animation: float-up linear forwards;
}

.particle-heart {
    font-size: 1.5rem;
    opacity: 0.6;
}

.particle-star {
    width: 4px;
    height: 4px;
    background: var(--gold-shimmer);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--gold-shimmer);
}

/* ========================================
   Section Base
   ======================================== */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-lg) var(--space-md);
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    background: var(--gradient-dark);
    overflow: hidden;
}

.video-container {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(45, 19, 44, 0.7) 0%,
        rgba(45, 19, 44, 0.5) 50%,
        rgba(45, 19, 44, 0.9) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 15vw, 10rem);
    color: var(--cream-white);
    text-shadow: 
        0 0 20px rgba(255, 30, 86, 0.5),
        0 0 40px rgba(255, 30, 86, 0.3),
        0 0 60px rgba(255, 30, 86, 0.2);
    margin-bottom: var(--space-md);
}

.hero-title .letter-animate {
    display: inline-block;
    animation: letterFloat 3s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 0.1s);
}

.hero-title .letter-animate:nth-child(1) { --i: 0; }
.hero-title .letter-animate:nth-child(2) { --i: 1; }
.hero-title .letter-animate:nth-child(3) { --i: 2; }
.hero-title .letter-animate:nth-child(4) { --i: 3; }
.hero-title .letter-animate:nth-child(5) { --i: 4; }
.hero-title .letter-animate:nth-child(6) { --i: 5; }

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-style: italic;
    color: var(--soft-pink);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 1s;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 2s;
}

.scroll-indicator span {
    font-family: var(--font-modern);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--soft-pink);
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    margin: var(--space-sm) auto 0;
    border-right: 2px solid var(--deep-rose);
    border-bottom: 2px solid var(--deep-rose);
    transform: rotate(45deg);
    animation: bounceDown 1.5s ease-in-out infinite;
}

/* ========================================
   Message / Envelope Section
   ======================================== */
.message-section {
    background: var(--gradient-dark);
    perspective: 1000px;
}

.message-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.envelope {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/3;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform var(--transition-slow);
}

.envelope:hover {
    transform: scale(1.02);
}

.envelope-body {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d5c4 100%);
    border-radius: 8px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.4),
        inset 0 -5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.envelope-body::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(135deg, #ede0d4 0%, #ddd0c4 100%);
    clip-path: polygon(0 100%, 50% 30%, 100% 100%);
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, #e8d5c4 0%, #f5e6d3 100%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    transform-origin: top center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.envelope-flap::after {
    content: '💌';
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    transition: opacity var(--transition-normal);
}

.envelope.opened .envelope-flap {
    transform: rotateX(-180deg);
}

.envelope.opened .envelope-flap::after {
    opacity: 0;
}

.letter {
    position: absolute;
    inset: 10%;
    background: linear-gradient(180deg, #fff 0%, #f8f5f0 100%);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(20%);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
    overflow: hidden;
    z-index: 1;
}

.envelope.opened .letter {
    transform: translateY(-120%);
}

.letter-content {
    padding: var(--space-md);
    height: 100%;
    display: flex;
    flex-direction: column;
    color: var(--deep-purple);
}

.letter-greeting {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--romantic-red);
    margin-bottom: var(--space-sm);
}

.letter-text {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    flex: 1;
    color: #333;
}

.letter-signature {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--deep-rose);
    text-align: right;
    margin-top: var(--space-sm);
}

.envelope-hint {
    margin-top: var(--space-md);
    font-family: var(--font-modern);
    font-size: 0.9rem;
    color: var(--soft-pink);
    text-align: center;
    animation: pulse 2s ease-in-out infinite;
    transition: opacity var(--transition-normal);
}

.envelope.opened + .envelope-hint,
.envelope.opened ~ .envelope-hint {
    opacity: 0;
}

/* ========================================
   Question Section
   ======================================== */
.question-section {
    background: var(--gradient-dark);
    min-height: 100vh;
}

.question-container {
    text-align: center;
    max-width: 800px;
    padding: var(--space-md);
}

.heartbeat-container {
    margin-bottom: var(--space-lg);
}

.heartbeat {
    font-size: 5rem;
    display: inline-block;
    animation: heartbeat 1.2s ease-in-out infinite;
}

.question-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 4rem);
    line-height: 1.4;
    margin-bottom: var(--space-lg);
}

.question-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: wordReveal 0.6s ease forwards;
    animation-delay: calc(var(--word-index, 0) * 0.15s);
}

.question-word.highlight {
    color: var(--deep-rose);
    text-shadow: 0 0 20px rgba(255, 30, 86, 0.5);
}

.question-word.name {
    color: var(--gold-shimmer);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* Buttons Container */
.buttons-container {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    min-height: 100px;
    transition: all var(--transition-normal);
}

/* Answer Buttons */
.answer-btn {
    font-family: var(--font-modern);
    font-size: 1.5rem;
    font-weight: 600;
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
    min-width: 150px;
}

.answer-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-100%);
    transition: transform var(--transition-fast);
}

.answer-btn:hover::before {
    transform: translateX(100%);
}

/* Yes Button */
.yes-btn {
    background: var(--gradient-romantic);
    color: white;
    box-shadow: 
        0 4px 15px rgba(255, 30, 86, 0.4),
        0 0 30px rgba(255, 30, 86, 0.2);
    transform-origin: center;
}

.yes-btn:hover {
    transform: scale(1.1);
    box-shadow: 
        0 6px 25px rgba(255, 30, 86, 0.5),
        0 0 50px rgba(255, 30, 86, 0.3);
}

/* No Button */
.no-btn {
    background: linear-gradient(135deg, #666 0%, #444 100%);
    color: #ccc;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform-origin: center;
}

.no-btn:hover {
    background: linear-gradient(135deg, #555 0%, #333 100%);
}

/* Button Shrink/Grow Effect */
.no-btn.shrinking {
    animation: shrinkButton 0.3s ease forwards;
}

.yes-btn.growing {
    animation: growButton 0.3s ease forwards;
}

/* Fullscreen Yes Button */
.yes-btn.fullscreen {
    position: fixed;
    inset: 0;
    border-radius: 0;
    z-index: 100;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Tease Message */
.tease-message {
    font-family: var(--font-modern);
    font-size: 1.2rem;
    color: var(--soft-pink);
    margin-top: var(--space-md);
    min-height: 2rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-normal);
}

.tease-message.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Theme Changes */
body.theme-pink {
    --deep-purple: #4a1942;
}

body.theme-red {
    --deep-purple: #3d0c0c;
}

body.theme-purple {
    --deep-purple: #1a0a2e;
}

body.theme-gold {
    --deep-purple: #2a1f00;
}

/* ========================================
   Celebration Section
   ======================================== */
.celebration-section {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.celebration-section.visible {
    opacity: 1;
    visibility: visible;
}

#confetti-container,
#fireworks-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.celebration-content {
    text-align: center;
    z-index: 10;
    padding: var(--space-md);
}

.celebration-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 10vw, 5rem);
    color: var(--cream-white);
    text-shadow: 
        0 0 30px rgba(255, 30, 86, 0.8),
        0 0 60px rgba(255, 30, 86, 0.4);
    margin-bottom: var(--space-md);
    animation: celebrateTitle 1s ease forwards;
}

.celebration-message {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 4vw, 2rem);
    color: var(--soft-pink);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease forwards 0.5s;
    opacity: 0;
}

.celebration-heart {
    font-size: 4rem;
    margin-top: var(--space-lg);
    animation: heartbeat 1s ease-in-out infinite;
}

/* ========================================
   Floating Hearts (decorative)
   ======================================== */
.floating-hearts {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
