/* ==========================================================================
   PREMIUM THEME CORE CONFIGURATIONS & VARIABLES
   ========================================================================== */
:root {
    --bg-dark: #070709;
    --bg-card: rgba(18, 18, 26, 0.65);
    --gold-primary: #d4af37;
    --gold-glow: #ffdf7a;
    --rose-accent: #ff4d6d;
    --rose-glow: #ff85a1;
    --text-light: #f3f4f6;
    --text-muted: #9ca3af;
    --font-cinzel: 'Cinzel', serif;
    --font-montserrat: 'Montserrat', sans-serif;
    --font-cursive: 'Great Vibes', cursive;
    --transition-smooth: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-montserrat);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Helper Class to Hide Elements Smoothly */
.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    display: none !important;
}

/* ==========================================================================
   1. CINEMATIC LOADER STYLE
   ========================================================================== */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}

#stars-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.loader-content {
    position: relative;
    text-align: center;
    z-index: 2;
    padding: 20px;
}

.loader-title {
    font-family: var(--font-cursive);
    font-size: 4rem;
    color: var(--text-light);
    text-shadow: 0 0 20px rgba(255, 77, 109, 0.6);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.loader-subtitle {
    font-family: var(--font-montserrat);
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.loader-progress-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 auto;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--rose-accent), var(--gold-primary));
    box-shadow: 0 0 10px var(--rose-glow);
    transition: width 0.1s linear;
}

/* ==========================================================================
   GLOBAL AUDIO/MUSIC INTERFACE
   ========================================================================== */
.music-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: var(--transition-smooth);
}

.music-btn:hover {
    transform: scale(1.1);
    border-color: var(--rose-accent);
    box-shadow: 0 0 15px rgba(255, 77, 109, 0.4);
}

.music-icon-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
}

.music-btn .bar {
    width: 3px;
    background-color: var(--rose-accent);
    border-radius: 2px;
    height: 100%;
    transform-origin: bottom;
}

/* Audio Wave Animation States via JS classes */
.music-btn.playing .bar-1 { animation: soundWave 0.6s ease infinite alternate; }
.music-btn.playing .bar-2 { animation: soundWave 0.9s ease infinite alternate 0.15s; }
.music-btn.playing .bar-3 { animation: soundWave 0.7s ease infinite alternate 0.3s; }

/* ==========================================================================
   2. HERO SECTION STYLE
   ========================================================================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #000;
}

.hero-bg-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, var(--bg-dark) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 20px;
    max-width: 800px;
}

.hero-photo-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 30px auto;
    border-radius: 50%;
}

.hero-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.glow-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px dashed var(--gold-primary);
    animation: rotateRing 20s linear infinite;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
}

.hero-title {
    font-family: var(--font-cinzel);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.hero-title .highlight {
    color: transparent;
    background: linear-gradient(45deg, var(--gold-primary), var(--rose-accent));
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-muted);
    margin-bottom: 40px;
    letter-spacing: 1px;
}

/* Premium Dynamic Buttons */
.btn {
    position: relative;
    padding: 16px 36px;
    font-family: var(--font-montserrat);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.premium-btn {
    border: 1px solid var(--gold-primary);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.premium-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: 0.6s;
}

.premium-btn:hover::before {
    left: 100%;
}

.premium-btn:hover {
    background: var(--gold-primary);
    color: #000;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.45);
    transform: translateY(-3px);
}

.premium-btn i {
    margin-left: 10px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.premium-btn:hover i {
    transform: translateX(5px);
}

/* ==========================================================================
   GLOBAL SECTION FRAMEWORK
   ========================================================================== */
.section-padding {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
    padding: 0 20px;
}

.section-subtitle {
    font-family: var(--font-montserrat);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: var(--rose-accent);
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-family: var(--font-cinzel);
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: 2px;
}

.divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--rose-accent), var(--gold-primary));
    margin: 20px auto 0 auto;
    border-radius: 2px;
}

/* Glassmorphism Structural Definition */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
}

/* ==========================================================================
   4. TYPEWRITER LETTER SECTION
   ========================================================================== */
.letter-section {
    background: radial-gradient(circle at 80% 20%, #150f1b 0%, var(--bg-dark) 70%);
    position: relative;
    width: 100%;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 25px;
}

.letter-card {
    position: relative;
    padding: 60px 50px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.heart-seal {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(255, 77, 109, 0.2);
}

.letter-text-container {
    min-height: 250px;
    font-family: var(--font-montserrat);
    font-size: 1.15rem;
    line-height: 2;
    color: rgba(243, 244, 246, 0.9);
    font-weight: 300;
}

/* Custom blinking cursor for the letter typing effect */
.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.15rem;
    background-color: var(--rose-accent);
    margin-left: 3px;
    animation: blinkCursor 0.8s infinite;
    vertical-align: middle;
}

/* ==========================================================================
   5. TIMELINE SECTION STYLE
   ========================================================================== */
.timeline-section {
    position: relative;
    width: 100%;
    background: var(--bg-dark);
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(214, 175, 55, 0.4) 15%, rgba(255, 77, 109, 0.4) 85%, transparent);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Active transition handles scrolling load */
.timeline-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.left-item {
    left: 0;
    padding-right: 60px;
}

.right-item {
    left: 50%;
    padding-left: 60px;
}

.timeline-dot {
    position: absolute;
    right: -7px;
    top: 25px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--gold-primary);
    z-index: 5;
    transition: transform 0.3s ease;
}

.right-item .timeline-dot {
    left: -7px;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    background: var(--rose-accent);
    border-color: var(--rose-glow);
    box-shadow: 0 0 10px var(--rose-glow);
}

.timeline-content {
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 77, 109, 0.3);
}

.timeline-year {
    font-family: var(--font-cinzel);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-primary);
    display: block;
    margin-bottom: 8px;
}

.timeline-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #fff;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.timeline-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   6 & 7. SURPRISE & FINAL CELEBRATION
   ========================================================================== */
.surprise-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: radial-gradient(circle at center, #140d1a 0%, #000 100%);
}

#celebration-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.surprise-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.surprise-title {
    font-family: var(--font-cursive);
    font-size: 3.8rem;
    color: #fff;
    margin-bottom: 25px;
    text-shadow: 0 0 20px rgba(255, 77, 109, 0.4);
}

.surprise-message {
    font-family: var(--font-montserrat);
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    margin-bottom: 40px;
    font-weight: 300;
}

.magic-btn {
    background: linear-gradient(45deg, var(--rose-accent), var(--gold-primary));
    border-radius: 30px;
    padding: 16px 45px;
    box-shadow: 0 5px 20px rgba(255, 77, 109, 0.3);
}

.magic-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 77, 109, 0.5);
}

/* ==========================================================================
   8. PREMIUM FOOTER DESIGN
   ========================================================================== */
.premium-footer {
    background: #040406;
    border-top: 1px solid var(--glass-border);
    padding: 40px 20px;
    text-align: center;
    font-family: var(--font-montserrat);
}

.premium-footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.creator-name {
    color: var(--gold-primary);
    font-weight: 600;
}

.copyright {
    font-size: 0.75rem !important;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ==========================================================================
   RESPONSIVE DESIGN ADAPTATIONS (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 768px) {
    .loader-title { font-size: 2.8rem; }
    .hero-title { font-size: 2.3rem; }
    .hero-photo-wrapper { width: 150px; height: 150px; }
    .section-title { font-size: 1.9rem; }
    
    /* Mobile Timeline Architecture Conversion */
    .timeline-line { left: 20px; }
    .timeline-item { width: 100%; left: 0 !important; padding-left: 45px !important; padding-right: 0 !important; }
    .timeline-dot { left: 13px !important; }
    
    .letter-card { padding: 40px 25px; }
    .letter-text-container { font-size: 1rem; }
    .surprise-title { font-size: 2.5rem; }
    .surprise-content { padding: 35px 20px; }
    .music-btn { bottom: 20px; right: 20px; width: 48px; height: 48px; }
}

@keyframes soundWave {
    0% { transform: scaleY(0.3); }
    100% { transform: scaleY(1); }
}

@keyframes rotateRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==========================================================================
   ULTRA-PREMIUM MINIMALIST INTERACTIVE LOADER STYLES
   ========================================================================== */
.premium-pulse-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
    transition: var(--transition-smooth);
}

.pulse-center {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
}

.pulse-ring {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--rose-accent);
    animation: luxuryPulseRing 2s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
    opacity: 0;
    pointer-events: none;
}

.pulse-text {
    margin-top: 15px;
    font-family: var(--font-montserrat);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    animation: textGlowFade 2.5s ease-in-out infinite alternate;
}

.premium-pulse-wrapper:hover .pulse-center {
    border-color: var(--gold-primary);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    transform: scale(1.05);
}

@keyframes luxuryPulseRing {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { opacity: 0.4; }
    100% { transform: scale(1.6); opacity: 0; }
}

@keyframes textGlowFade {
    0% { opacity: 0.3; }
    100% { opacity: 0.8; color: var(--text-light); }
}

/* ==========================================================================
   UPGRADE: HANDWRITTEN TYPOGRAPHY & LUXURY IMAGE GLOWS
   ========================================================================== */

/* Google Fonts Import link setup through CSS rules */
@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&display=swap');

/* Letter Section text transformed into elegant cursive */
.letter-text-container {
    font-family: 'Alex Brush', cursive !important;
    font-size: 2.1rem !important; /* Cursive fonts look smaller, increasing scale for premium legibility */
    line-height: 1.6 !important;
    letter-spacing: 1px !important;
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* Timeline image interactions update */
.timeline-content:hover .timeline-img {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 77, 109, 0.4), 0 0 15px rgba(212, 175, 55, 0.2);
    border-color: var(--rose-accent);
    transition: var(--transition-smooth);
}

.timeline-img {
    transition: var(--transition-smooth);
}

/* ==========================================================================
   UPGRADE: DYNAMIC VINTAGE POLAROID UPGRADE 
   ========================================================================== */

/* Gallery & Timeline layout modification into polaroid sheets */
.gallery-card, .timeline-content {
    background: #ffffff !important; /* Authentic polaroid paper base */
    padding: 12px 12px 28px 12px !important; /* Wider bottom margin for notes */
    border-radius: 2px !important; /* Sharp premium photo edges */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.2) !important;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease !important;
}

/* Polaroids have dark text since the background is now paper white */
.gallery-card h3, .gallery-card p, 
.timeline-content h4, .timeline-content p, .timeline-year {
    color: #1a1a1a !important; 
    text-shadow: none !important;
}

.timeline-year {
    font-weight: 700 !important;
    border-bottom: 2px solid rgba(0,0,0,0.1);
    padding-bottom: 4px;
    display: inline-block;
}

/* Dynamic shifting tilt effect on hover */
.gallery-card:hover, .timeline-content:hover {
    transform: scale(1.03) rotate(var(--polaroid-tilt, 2deg)) !important;
    box-shadow: 0 20px 40px rgba(255, 77, 109, 0.25), 0 15px 30px rgba(0,0,0,0.6) !important;
}

/* Alternating subtle tilts to make the alignment feel organic */
.gallery-item:nth-child(odd) .gallery-card { --polaroid-tilt: -2deg; }
.gallery-item:nth-child(even) .gallery-card { --polaroid-tilt: 2deg; }
.timeline-item.left-item .timeline-content { --polaroid-tilt: -1.5deg; }
.timeline-item.right-item .timeline-content { --polaroid-tilt: 1.5deg; }

/* ==========================================================================
   UPGRADE: ROYAL WAX SEAL ENVELOPE INTERFACE (EMOJI COMPATIBILITY MOD)
   ========================================================================== */
.envelope-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 40px auto;
    min-height: 380px !important;
    background: linear-gradient(135deg, #191919, #0d0d0d) !important;
    border: 1px solid rgba(212, 175, 55, 0.25) !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10;
    padding: 40px !important;
    box-sizing: border-box !important;
    transition: all 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    transform-origin: top center;
}

.envelope-seal-core {
    cursor: pointer !important;
    text-align: center !important;
    position: relative;
    z-index: 12;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    width: 100% !important;
}

.seal-hint-text {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    font-family: 'Poppins', sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    font-size: 0.75rem !important;
    color: #d4af37 !important;
    text-shadow: 0 0 8px rgba(214,175,55,0.4);
}

.envelope-container.unwrapped {
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    margin-bottom: -350px;
}

@keyframes pulseSeal {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(255,77,109,0.8)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 25px rgba(255,77,109,1)); }
}