/*
 * IREM & OSMAN WEDDING PLATFORM
 * Performance-Optimized Boho Luxury Design
 * ZERO backdrop-filter, blur, or heavy effects
 * GPU-accelerated transforms only
 */

/* =============================================================================
   CSS CUSTOM PROPERTIES - Performance Optimized
   ============================================================================= */
:root {
    /* Boho Luxury Palette */
    --cream: #FAF8F5;
    --cream-light: #FDFCFB;
    --beige: #E8E2D9;
    --beige-dark: #D8D0C4;
    --sand: #D4C8B8;
    --sand-dark: #C4B8A8;
    --sage: #8B9B7E;
    --sage-light: #A5B598;
    --sage-dark: #6B7B5E;
    --olive: #6B7B5E;
    --olive-light: #8B9B7E;
    --olive-dark: #4A5A3E;
    --pampas: #C9B99A;
    --pampas-light: #D9C9AA;
    --pampas-dark: #B9A98A;
    --terracotta: #C17B6E;
    --blush: #E8D4D0;
    --charcoal: #2C2C2C;
    --charcoal-light: #4C4C4C;
    --white: #FFFFFF;
    --black: #000000;

    /* Typography */
    --font-display: 'Great Vibes', cursive;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;

    /* Spacing */
    --section-padding: 100px;
    --section-padding-mobile: 60px;
    --container-width: 1200px;
    --container-padding: 24px;

    /* Transitions - GPU Optimized */
    --transition-fast: 0.15s ease-out;
    --transition-medium: 0.3s ease-out;
    --transition-slow: 0.5s ease-out;

    /* Shadows - Simple, no blur animations */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 8px 32px rgba(0, 0, 0, 0.12);

    /* Border Radius */
    --radius-small: 8px;
    --radius-medium: 16px;
    --radius-large: 24px;
    --radius-round: 50%;
}

/* =============================================================================
   PERFORMANCE RESET - Critical for 60fps
   ============================================================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    color: var(--charcoal);
    background-color: var(--cream);
    overflow-x: hidden;
    /* NOTE: Removed transform: translateZ(0) - it breaks position:fixed on overlays */
}

body.loading {
    overflow: hidden;
}

::selection {
    background-color: var(--sage);
    color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

/* =============================================================================
   LOADING SCREEN - Simple, no heavy effects
   ============================================================================= */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    will-change: opacity;
}

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

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

.loader-rings {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
}

.loader-rings .ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-top-color: var(--sage);
    border-radius: 50%;
    animation: loaderSpin 1s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

.loader-rings .ring:nth-child(2) {
    width: 40px;
    height: 40px;
    top: 10px;
    left: 10px;
    border-top-color: var(--pampas);
    animation-duration: 0.7s;
    animation-direction: reverse;
}

@keyframes loaderSpin {
    to { transform: translateZ(0) rotate(360deg); }
}

.loader-text {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--sage-dark);
    letter-spacing: 2px;
}

/* =============================================================================
   MUSIC CONTROL - GPU Optimized
   ============================================================================= */
.music-control {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    width: 52px;
    height: 52px;
    background: var(--white);
    border-radius: var(--radius-round);
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000 !important;
    border: 2px solid var(--beige);
    will-change: transform, opacity;
}

.music-control:hover {
    transform: scale(1.08);
    border-color: var(--sage);
}

.music-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-icon svg {
    width: 22px;
    height: 22px;
    color: var(--sage-dark);
}

.music-waves {
    display: none;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 18px;
}

.music-waves span {
    width: 3px;
    background: var(--sage-dark);
    border-radius: 2px;
    animation: musicWave 0.6s ease-in-out infinite;
    transform: translateZ(0);
    will-change: transform;
}

.music-waves span:nth-child(1) { height: 6px; animation-delay: 0s; }
.music-waves span:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.music-waves span:nth-child(3) { height: 10px; animation-delay: 0.3s; }

@keyframes musicWave {
    0%, 100% { transform: translateZ(0) scaleY(1); }
    50% { transform: translateZ(0) scaleY(0.4); }
}

.music-control.playing .music-icon { display: none; }
.music-control.playing .music-waves { display: flex; }

/* =============================================================================
   NAVIGATION DOTS - GPU Optimized
   ============================================================================= */
.nav-dots {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%) translateZ(0);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-round);
    background: var(--sand);
    position: relative;
    transform: translateZ(0);
    transition: background var(--transition-fast), transform var(--transition-fast);
    will-change: transform, background;
}

.nav-dot::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-radius: var(--radius-round);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: border-color var(--transition-fast);
}

.nav-dot span {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--charcoal);
    opacity: 0;
    transition: opacity var(--transition-fast);
    padding-right: 10px;
}

.nav-dot:hover span,
.nav-dot.active span {
    opacity: 1;
}

.nav-dot:hover,
.nav-dot.active {
    background: var(--sage-dark);
    transform: translateZ(0) scale(1.2);
}

.nav-dot.active::before {
    border-color: var(--sage-dark);
}

@media (max-width: 768px) {
    .nav-dots { display: none; }
}

/* =============================================================================
   SECTIONS - BASE STYLES
   ============================================================================= */
.section {
    position: relative;
    min-height: 100vh;
    padding: var(--section-padding) 0;
    overflow: hidden;
    contain: layout paint;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    position: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: 55px;
}

.section-header.light {
    color: var(--white);
}

.section-subtitle {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--sage-dark);
    margin-bottom: 12px;
    opacity: 0.9;
}

.section-header.light .section-subtitle {
    color: var(--pampas-light);
    opacity: 0.85;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 5.5vw, 3.8rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 18px;
    letter-spacing: 0.01em;
    text-rendering: optimizeLegibility;
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.section-divider span {
    width: 55px;
    height: 1px;
    background: currentColor;
    opacity: 0.2;
}

.section-divider svg {
    width: 22px;
    height: 22px;
    color: var(--sage-dark);
    opacity: 0.85;
}

.section-header.light .section-divider svg {
    color: var(--pampas-light);
    opacity: 0.8;
}

/* =============================================================================
   HERO SECTION - Performance Optimized
   ============================================================================= */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 0;
    background: var(--cream);
    position: relative;
    overflow: visible;
    contain: layout;
}

/* Static background - no animations */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(180deg, var(--cream) 0%, var(--beige) 100%);
    transform: translateZ(0);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(250, 248, 245, 0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 30px 20px;
}

/* Save the Date */
.save-the-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
}

.save-the-date p {
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--sage-dark);
}

.ornament {
    color: var(--pampas);
    font-size: 1rem;
}

/* Couple Names - Premium Typography */
.couple-names {
    font-family: var(--font-display);
    font-size: clamp(3rem, 11vw, 7.5rem);
    font-weight: 400;
    line-height: 1.05;
    color: var(--charcoal);
    margin-bottom: 28px;
    letter-spacing: 0.02em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.couple-names .name {
    display: block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.couple-names .ampersand {
    display: block;
    font-family: var(--font-display);
    font-size: 0.4em;
    font-style: normal;
    color: var(--pampas);
    margin: -4px 0;
    opacity: 0.9;
    letter-spacing: 0.05em;
}

/* =============================================================================
   FAMILY NAMES - Luxury Davetiye Style
   CROSS-BROWSER PIXEL-PERFECT LAYOUT
   Uses CSS Grid + Fixed rem measurements for identical rendering everywhere
   ============================================================================= */

.family-davetiye {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    justify-content: center;
    margin: 2.5rem auto 2.75rem;
    padding: 0 1.25rem;
    max-width: 28rem;
    /* Universal font rendering normalization */
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent Android/iOS font size differences */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Each Family Column - CSS Grid for precise vertical rhythm */
.family-column {
    display: grid;
    grid-template-rows: 1.625rem 1.625rem 1.375rem 1.625rem;
    justify-items: center;
    align-items: center;
    text-align: center;
    min-width: 8rem;
    gap: 0.125rem;
}

/* Base cell - reset all browser defaults */
.family-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern" 1, "liga" 1;
    /* Prevent text selection differences */
    -webkit-user-select: none;
    user-select: none;
}

/* Family Title Cell */
.family-cell-title {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--charcoal);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.75;
    line-height: 1;
    height: 1.625rem;
}

/* Parent Name Cell */
.family-cell-name {
    font-family: var(--font-heading);
    font-size: 1.1875rem;
    font-weight: 400;
    font-style: italic;
    color: var(--sage-dark);
    letter-spacing: 0.025em;
    line-height: 1;
    height: 1.625rem;
}

/* Ampersand Cell */
.family-cell-amp {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 400;
    font-style: italic;
    color: var(--pampas);
    opacity: 0.8;
    line-height: 1;
    height: 1.375rem;
}

/* Central Ornament - CSS Grid aligned */
.family-ornament {
    display: grid;
    grid-template-rows: 1.5rem auto 1.5rem;
    justify-items: center;
    align-items: center;
    padding: 0 1rem;
    margin-top: 1.625rem;
}

.ornament-line {
    width: 1px;
    height: 1.5rem;
    background: linear-gradient(to bottom, transparent, var(--pampas), transparent);
    opacity: 0.6;
}

.ornament-symbol {
    font-family: inherit;
    color: var(--pampas);
    font-size: 0.875rem;
    line-height: 1;
    opacity: 0.65;
    text-rendering: geometricPrecision;
}

/* Wedding Tagline */
.wedding-tagline {
    margin-bottom: 32px;
}

.wedding-tagline p {
    font-family: var(--font-heading);
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    font-style: italic;
    color: var(--charcoal-light);
    line-height: 1.7;
}

.wedding-tagline .slogan {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--sage-dark);
    margin-bottom: 6px;
}

/* Wedding Date */
.wedding-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 40px;
}

.date-ornament {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--pampas), transparent);
}

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

.date-content .day {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--sage-dark);
    margin-bottom: 6px;
}

.full-date {
    display: flex;
    align-items: center;
    gap: 10px;
}

.full-date .month,
.full-date .year {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--charcoal);
}

.full-date .date-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 300;
    color: var(--sage-dark);
    line-height: 1;
}

/* Countdown - Premium Luxury Style */
.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 55px;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.7) 0%, rgba(232,226,217,0.5) 100%);
    border-radius: var(--radius-medium);
    border: 1px solid rgba(201, 185, 154, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.countdown-item {
    text-align: center;
    min-width: 65px;
    padding: 0.5rem 0.25rem;
}

.countdown-number {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    font-weight: 300;
    color: var(--charcoal);
    line-height: 1;
    letter-spacing: -0.02em;
    text-rendering: geometricPrecision;
}

.countdown-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--sage-dark);
    margin-top: 8px;
    opacity: 0.85;
}

.countdown-separator {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--pampas);
    padding-bottom: 18px;
    opacity: 0.7;
}

/* Scroll Indicator - GPU Optimized */
.scroll-indicator {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--sage-dark);
}

.scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-arrow {
    width: 20px;
    height: 34px;
    border: 2px solid var(--sage-dark);
    border-radius: 10px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 6px;
}

.scroll-arrow svg {
    width: 10px;
    height: 10px;
    animation: scrollBounce 1.5s ease-in-out infinite;
    transform: translateZ(0);
    will-change: transform;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateZ(0) translateY(0); }
    50% { transform: translateZ(0) translateY(4px); }
}

/* =============================================================================
   BOHO DECORATIONS - Static SVG, GPU Accelerated
   ============================================================================= */
.boho-floral-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 8;
    overflow: visible;
}

.boho-floral-overlay .floral-corner {
    position: absolute;
    width: 200px;
    height: 200px;
    opacity: 0.2;
    transform: translateZ(0);
    will-change: auto;
    contain: strict;
}

.boho-floral-overlay .floral-corner.top-left {
    top: -10px;
    left: -10px;
}

.boho-floral-overlay .floral-corner.top-right {
    top: -10px;
    right: -10px;
    transform: translateZ(0) rotate(90deg);
}

.boho-floral-overlay .floral-corner.bottom-left {
    bottom: -10px;
    left: -10px;
    transform: translateZ(0) rotate(-90deg);
}

.boho-floral-overlay .floral-corner.bottom-right {
    bottom: -10px;
    right: -10px;
    transform: translateZ(0) rotate(180deg);
}

/* Hero Section Floral Colors */
.hero-section .boho-floral-overlay {
    color: var(--sage);
}

.hero-section .pampas-accent {
    color: var(--pampas);
}

/* RSVP Section Floral Colors */
.rsvp-section .boho-floral-overlay {
    color: rgba(220, 215, 200, 0.15);
}

/* Pampas Grass Accents - Static */
.pampas-accent {
    position: absolute;
    z-index: 8;
    pointer-events: none;
    opacity: 0.15;
    transform: translateZ(0);
    will-change: auto;
    contain: strict;
}

.pampas-accent.left {
    left: -40px;
    top: 50%;
    transform: translateY(-50%) translateZ(0) rotate(-10deg);
    width: 150px;
    height: auto;
}

.pampas-accent.right {
    right: -40px;
    top: 50%;
    transform: translateY(-50%) translateZ(0) rotate(10deg) scaleX(-1);
    width: 150px;
    height: auto;
}

/* Boho Dividers */
.boho-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    position: relative;
}

.boho-divider svg {
    width: 100px;
    height: 32px;
    color: var(--pampas);
    opacity: 0.5;
}

.boho-divider::before,
.boho-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sand), transparent);
    max-width: 150px;
}

/* =============================================================================
   DETAILS SECTION
   ============================================================================= */
.details-section {
    position: relative;
    background: var(--charcoal);
    color: var(--white);
    contain: layout paint;
}

.details-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(135deg, rgba(44, 44, 44, 0.95) 0%, rgba(74, 90, 62, 0.9) 100%);
    transform: translateZ(0);
}

.section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(180deg, rgba(44, 44, 44, 0.4) 0%, rgba(44, 44, 44, 0.6) 100%);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.events-grid.two-events {
    grid-template-columns: repeat(2, 1fr);
}

/* Single Event - Centered Nikah Card */
.events-grid.single-event {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    justify-content: center;
    align-items: center;
    max-width: 520px;
    margin: 0 auto;
}

.events-grid.single-event .event-card {
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(201, 185, 154, 0.2);
    padding: 48px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.event-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-large);
    padding: 36px 28px;
    text-align: center;
    transform: translateZ(0);
    transition: transform var(--transition-medium), background var(--transition-medium);
    will-change: transform;
    contain: layout;
}

.event-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateZ(0) translateY(-6px);
}

.event-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 185, 154, 0.15);
    border-radius: var(--radius-round);
}

.event-icon svg {
    width: 28px;
    height: 28px;
    color: var(--pampas-light);
}

.event-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 14px;
    padding: 10px 18px;
    background: rgba(201, 185, 154, 0.15);
    border-radius: 10px;
}

.event-date-badge .event-day {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--white);
    line-height: 1;
}

.event-date-badge .event-month {
    font-size: 0.8rem;
    color: var(--pampas-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

.event-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(107, 123, 94, 0.25);
    padding: 6px 14px;
    border-radius: 16px;
    margin-bottom: 16px;
}

.event-time svg {
    color: var(--pampas-light);
}

.event-time span {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.event-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 6px 14px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}

.event-location svg {
    flex-shrink: 0;
    color: var(--pampas-light);
}

.event-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 16px;
}

.event-details {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.event-details p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 4px;
}

.event-details strong {
    color: var(--pampas-light);
}

/* Additional Info */
.additional-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.info-card {
    text-align: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-medium);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.info-card h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--pampas-light);
    margin-bottom: 6px;
}

.info-card p {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.info-card small {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
}

/* =============================================================================
   LOCATION SECTION
   ============================================================================= */
.location-section {
    background: var(--cream);
    padding: var(--section-padding) 0;
    contain: layout paint;
}

.venue-info {
    text-align: center;
    margin-bottom: 32px;
}

.venue-name {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 14px;
}

.venue-address {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 1rem;
    color: var(--charcoal-light);
    line-height: 1.5;
}

.venue-address svg {
    color: var(--sage-dark);
    flex-shrink: 0;
    margin-top: 2px;
}

.map-container {
    margin-bottom: 32px;
}

.map-frame {
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 6px solid var(--white);
}

.map-frame iframe {
    display: block;
    width: 100%;
    min-height: 350px;
}

.directions-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.direction-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--sage-dark);
    color: var(--white);
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transform: translateZ(0);
    transition: transform var(--transition-fast), background var(--transition-fast);
    will-change: transform;
}

.direction-btn:hover {
    background: var(--olive-dark);
    transform: translateZ(0) translateY(-2px);
}

.direction-btn.outline {
    background: transparent;
    color: var(--sage-dark);
    border: 2px solid var(--sage-dark);
}

.direction-btn.outline:hover {
    background: var(--sage-dark);
    color: var(--white);
}

/* Wedding Location Notice */
.wedding-location-notice {
    max-width: 550px;
    margin: 32px auto 0;
    padding: 16px 24px;
    background: var(--beige);
    border-radius: var(--radius-medium);
    border-left: 3px solid var(--sage-dark);
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.notice-content svg {
    flex-shrink: 0;
    color: var(--sage-dark);
}

.notice-content p {
    font-size: 0.9rem;
    color: var(--charcoal);
    margin: 0;
}

/* =============================================================================
   RSVP SECTION - GPU Optimized
   ============================================================================= */
.rsvp-section {
    position: relative;
    background: var(--sage-dark);
    color: var(--white);
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: visible;
    contain: layout;
}

.rsvp-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(135deg, rgba(74, 90, 62, 0.97) 0%, rgba(107, 123, 94, 0.95) 100%);
    transform: translateZ(0);
}

.rsvp-deadline {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-style: italic;
    color: var(--pampas-light);
    margin-top: 16px;
}

.rsvp-form-container {
    max-width: 550px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.rsvp-form {
    background: var(--white);
    border-radius: var(--radius-large);
    padding: 44px 36px;
    box-shadow: var(--shadow-strong);
    position: relative;
    overflow: hidden;
    contain: layout;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--charcoal);
    background: var(--cream);
    border: 2px solid transparent;
    border-radius: var(--radius-small);
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--sage-dark);
    background: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--sand-dark);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--charcoal-light);
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 14px 20px;
    background: var(--cream);
    border-radius: var(--radius-small);
    flex: 1;
    min-width: 160px;
    border: 2px solid transparent;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.radio-label:hover {
    background: var(--beige);
}

.radio-label input {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--sand-dark);
    border-radius: var(--radius-round);
    position: relative;
    transition: border-color var(--transition-fast);
}

.radio-custom::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--sage-dark);
    border-radius: var(--radius-round);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform var(--transition-fast);
}

.radio-label input:checked + .radio-custom {
    border-color: var(--sage-dark);
}

.radio-label input:checked + .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-label input:checked ~ .radio-text {
    color: var(--sage-dark);
    font-weight: 500;
}

.radio-text {
    font-size: 0.9rem;
    color: var(--charcoal);
}

/* Guest Select */
.guest-select-wrapper {
    position: relative;
}

.guest-select {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--charcoal);
    background: var(--cream);
    border: 2px solid transparent;
    border-radius: var(--radius-small);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7B5E' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.guest-select:focus {
    outline: none;
    border-color: var(--sage-dark);
    background-color: var(--white);
}

/* Dynamic Guest Fields */
.guest-names-container {
    opacity: 1;
    transition: opacity var(--transition-medium);
}

#dynamicGuestFields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dynamic-guest-field {
    opacity: 1;
    transform: translateZ(0);
}

.guest-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--sage-dark);
    margin-bottom: 6px;
}

.guest-name-input {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--charcoal);
    background: var(--cream);
    border: 2px solid transparent;
    border-radius: var(--radius-small);
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.guest-name-input:focus {
    outline: none;
    border-color: var(--sage-dark);
    background: var(--white);
}

/* Decline Reason */
.decline-reason-group textarea {
    min-height: 90px;
    resize: vertical;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--sage-dark) 0%, var(--olive-dark) 100%);
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    transition: transform var(--transition-fast);
    will-change: transform;
}

.submit-btn:hover {
    transform: translateZ(0) translateY(-2px);
}

.submit-btn .btn-loader {
    display: none;
    margin-left: 8px;
}

.submit-btn .btn-text {
    transition: opacity 0.2s ease;
}

.submit-btn.loading {
    pointer-events: none;
    opacity: 0.85;
}

.submit-btn.loading .btn-text {
    /* Text stays visible with "Gönderiliyor..." */
    opacity: 1;
}

.submit-btn.loading .btn-loader {
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
}

.submit-btn.loading .btn-loader svg {
    width: 18px;
    height: 18px;
    animation: loaderSpin 0.8s linear infinite;
    vertical-align: middle;
}

/* Thank You & Duplicate Messages */
.thank-you-message,
.duplicate-message {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    border-radius: var(--radius-large);
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px;
}

.thank-you-message.show,
.duplicate-message.show {
    display: flex;
}

.thank-you-content,
.duplicate-content {
    position: relative;
}

.thank-you-icon,
.duplicate-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sage) 0%, var(--sage-dark) 100%);
    border-radius: var(--radius-round);
}

.duplicate-icon {
    background: linear-gradient(135deg, var(--pampas-light) 0%, var(--pampas) 100%);
}

.thank-you-icon svg,
.duplicate-icon svg {
    width: 36px;
    height: 36px;
    color: var(--white);
}

.thank-you-content h3,
.duplicate-content h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--charcoal);
    margin-bottom: 10px;
}

.thank-you-content p,
.duplicate-content p {
    font-size: 1rem;
    color: var(--charcoal-light);
    line-height: 1.5;
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

/* =============================================================================
   FOOTER
   ============================================================================= */
.footer {
    background: var(--charcoal);
    color: var(--white);
    padding: 60px 0 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    contain: layout paint;
}

.footer-content {
    position: relative;
    z-index: 10;
}

.footer-names {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 14px;
}

.footer-names .script-text {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--white);
}

.footer-names .ampersand {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--pampas);
}

.footer-date {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--pampas-light);
    margin-bottom: 16px;
}

.footer-hashtag {
    margin-bottom: 24px;
}

.footer-hashtag span {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.footer-slogan {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-style: italic;
    color: var(--pampas-light);
    margin-bottom: 14px;
}

.footer-message {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.footer-decoration .leaf {
    position: absolute;
    width: 120px;
    height: 120px;
    opacity: 0.04;
}

.footer-decoration .leaf.left {
    bottom: 0;
    left: 5%;
    background: radial-gradient(circle, var(--pampas) 0%, transparent 70%);
}

.footer-decoration .leaf.right {
    top: 0;
    right: 5%;
    background: radial-gradient(circle, var(--sage) 0%, transparent 70%);
}

/* =============================================================================
   ANIMATIONS - GPU Optimized
   ============================================================================= */
.fade-in {
    opacity: 0;
    transform: translateY(24px) translateZ(0);
    animation: fadeInUpAnim 0.6s ease-out forwards;
    will-change: opacity, transform;
}

.fade-in.delay-1 { animation-delay: 0.15s; }
.fade-in.delay-2 { animation-delay: 0.3s; }
.fade-in.delay-3 { animation-delay: 0.45s; }
.fade-in.delay-4 { animation-delay: 0.6s; }
.fade-in.delay-5 { animation-delay: 0.75s; }

@keyframes fadeInUpAnim {
    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px) translateZ(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

.scroll-reveal.delay-1 { transition-delay: 0.08s; }
.scroll-reveal.delay-2 { transition-delay: 0.16s; }

/* =============================================================================
   MEMORY CLOUD STYLES
   ============================================================================= */
.memory-cloud-page {
    min-height: 100vh;
    background: var(--cream);
    padding: 40px 0;
}

.memory-header {
    text-align: center;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-soft);
    margin-bottom: 32px;
}

.memory-header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.memory-header p {
    color: var(--charcoal-light);
    font-size: 0.9rem;
}

/* Auth Forms */
.auth-container {
    max-width: 420px;
    margin: 0 auto;
    padding: 0 20px;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-large);
    padding: 40px 32px;
    box-shadow: var(--shadow-medium);
}

.auth-card h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--charcoal);
    text-align: center;
    margin-bottom: 8px;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--charcoal-light);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-btn {
    width: 100%;
    padding: 14px 28px;
    background: var(--sage-dark);
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 20px;
    cursor: pointer;
    transform: translateZ(0);
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.auth-btn:hover {
    background: var(--olive-dark);
    transform: translateZ(0) translateY(-2px);
}

.auth-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: var(--sage-dark);
    font-size: 0.9rem;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Upload Section */
.upload-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

.upload-card {
    background: var(--white);
    border-radius: var(--radius-large);
    padding: 36px;
    box-shadow: var(--shadow-medium);
    margin-bottom: 28px;
}

.upload-card h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--charcoal);
    margin-bottom: 6px;
}

.upload-card .subtitle {
    color: var(--charcoal-light);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.upload-zone {
    border: 2px dashed var(--sand);
    border-radius: var(--radius-medium);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--sage-dark);
    background: var(--cream);
}

.upload-zone svg {
    width: 48px;
    height: 48px;
    color: var(--sage);
    margin-bottom: 14px;
}

.upload-zone h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--charcoal);
    margin-bottom: 6px;
}

.upload-zone p {
    font-size: 0.85rem;
    color: var(--charcoal-light);
}

.upload-zone input {
    display: none;
}

/* File Preview */
.file-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-small);
    overflow: hidden;
    background: var(--beige);
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Text Note Input */
.note-input {
    width: 100%;
    min-height: 100px;
    padding: 14px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 2px solid var(--beige);
    border-radius: var(--radius-small);
    resize: vertical;
    transition: border-color var(--transition-fast);
}

.note-input:focus {
    outline: none;
    border-color: var(--sage-dark);
}

/* Voice Recording */
.voice-recorder {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--cream);
    border-radius: var(--radius-medium);
}

.record-btn {
    width: 56px;
    height: 56px;
    background: var(--terracotta);
    color: var(--white);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.record-btn:hover {
    transform: scale(1.05);
}

.record-btn.recording {
    background: #c0392b;
    animation: recordPulse 1s ease-in-out infinite;
}

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

.record-btn svg {
    width: 24px;
    height: 24px;
}

.recording-info {
    flex: 1;
}

.recording-info .status {
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 4px;
}

.recording-info .timer {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--sage-dark);
}

/* Gallery Grid */
.gallery-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 14px;
}

.gallery-header h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--charcoal);
}

.gallery-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    text-align: center;
}

.stat-item .number {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--sage-dark);
}

.stat-item .label {
    font-size: 0.75rem;
    color: var(--charcoal-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-medium);
    overflow: hidden;
    background: var(--beige);
    cursor: pointer;
    transform: translateZ(0);
    transition: transform var(--transition-fast);
}

.gallery-item:hover {
    transform: translateZ(0) scale(1.02);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item .type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 10px;
}

.gallery-item .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item .play-icon svg {
    width: 24px;
    height: 24px;
    color: var(--sage-dark);
}

/* Note Card */
.note-card {
    background: var(--white);
    border-radius: var(--radius-medium);
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.note-card p {
    font-size: 0.95rem;
    color: var(--charcoal);
    line-height: 1.6;
}

.note-card .date {
    font-size: 0.75rem;
    color: var(--charcoal-light);
    margin-top: 10px;
}

/* Voice Card */
.voice-card {
    background: var(--white);
    border-radius: var(--radius-medium);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-soft);
}

.voice-card .play-btn {
    width: 44px;
    height: 44px;
    background: var(--sage-dark);
    color: var(--white);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.voice-card .info {
    flex: 1;
}

.voice-card .duration {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--charcoal);
}

.voice-card .date {
    font-size: 0.75rem;
    color: var(--charcoal-light);
}

/* Admin Panel */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.admin-header {
    text-align: center;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-soft);
    margin-bottom: 28px;
}

.admin-header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--charcoal);
    margin-bottom: 6px;
}

.admin-header p {
    color: var(--sage-dark);
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.admin-nav {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 8px 20px;
    background: var(--cream);
    color: var(--charcoal);
    border-radius: 16px;
    font-size: 0.85rem;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--sage-dark);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-medium);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.stat-card .stat-number {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 500;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--charcoal-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card.primary .stat-number { color: var(--sage-dark); }
.stat-card.success .stat-number { color: var(--sage); }
.stat-card.warning .stat-number { color: var(--pampas-dark); }
.stat-card.info .stat-number { color: var(--terracotta); }

/* User List */
.user-list {
    display: grid;
    gap: 16px;
}

.user-card {
    background: var(--white);
    border-radius: var(--radius-medium);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-soft);
    flex-wrap: wrap;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: var(--sage-dark);
    color: var(--white);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 150px;
}

.user-info h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--charcoal);
    margin-bottom: 2px;
}

.user-info p {
    font-size: 0.8rem;
    color: var(--charcoal-light);
}

.user-stats {
    display: flex;
    gap: 20px;
}

.user-stat {
    text-align: center;
}

.user-stat .number {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--sage-dark);
}

.user-stat .label {
    font-size: 0.7rem;
    color: var(--charcoal-light);
    text-transform: uppercase;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 14px;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-primary {
    background: var(--sage-dark);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--olive-dark);
}

.btn-outline {
    background: transparent;
    color: var(--sage-dark);
    border: 1px solid var(--sage-dark);
}

.btn-outline:hover {
    background: var(--sage-dark);
    color: var(--white);
}

/* Table Styles */
.table-container {
    background: var(--white);
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.table-header {
    padding: 18px 24px;
    background: var(--sage-dark);
    color: var(--white);
}

.table-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 500;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 14px 16px;
    text-align: left;
}

th {
    background: var(--beige);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--charcoal);
    font-weight: 600;
}

td {
    border-bottom: 1px solid var(--beige);
    font-size: 0.9rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--cream);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.success {
    background: rgba(107, 123, 94, 0.12);
    color: var(--sage-dark);
}

.status-badge.warning {
    background: rgba(201, 185, 154, 0.2);
    color: var(--pampas-dark);
}

.status-badge.danger {
    background: rgba(193, 123, 110, 0.12);
    color: var(--terracotta);
}

/* Alert Messages */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-small);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(107, 123, 94, 0.1);
    color: var(--sage-dark);
    border-left: 3px solid var(--sage-dark);
}

.alert-error {
    background: rgba(193, 123, 110, 0.1);
    color: var(--terracotta);
    border-left: 3px solid var(--terracotta);
}

.alert-info {
    background: rgba(201, 185, 154, 0.15);
    color: var(--pampas-dark);
    border-left: 3px solid var(--pampas);
}

/* QR Code Display */
.qr-container {
    text-align: center;
    padding: 32px;
    background: var(--white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-medium);
    max-width: 400px;
    margin: 0 auto;
}

.qr-container h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--charcoal);
    margin-bottom: 20px;
}

.qr-code {
    display: inline-block;
    padding: 16px;
    background: var(--white);
    border: 2px solid var(--beige);
    border-radius: var(--radius-medium);
    margin-bottom: 16px;
}

.qr-code img {
    display: block;
}

.qr-container p {
    font-size: 0.85rem;
    color: var(--charcoal-light);
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--sage-dark);
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--olive-dark);
}

.back-link svg {
    width: 18px;
    height: 18px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--sand);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--charcoal);
    margin-bottom: 6px;
}

.empty-state p {
    color: var(--charcoal-light);
    font-size: 0.9rem;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */
@media (max-width: 1024px) {
    .events-grid,
    .events-grid.two-events {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin-left: auto;
        margin-right: auto;
    }

    .additional-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: var(--section-padding-mobile);
    }

    /* Cross-Browser Text Rendering Normalization */
    html {
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    .section {
        min-height: auto;
    }

    .hero-section {
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile */
        padding: 50px 0;
    }

    /* Couple Names - Mobile Optimization */
    .couple-names {
        font-size: clamp(2.8rem, 14vw, 4.5rem);
        margin-bottom: 20px;
    }

    .couple-names .ampersand {
        margin: -2px 0;
        font-size: 0.35em;
    }

    /* Family Section - Mobile Fixed Layout */
    .family-davetiye {
        max-width: 100%;
        padding: 0 0.75rem;
        margin: 1.75rem auto 2rem;
    }

    .family-column {
        min-width: 6.5rem;
        grid-template-rows: 1.5rem 1.5rem 1.25rem 1.5rem;
    }

    .family-cell-title {
        font-size: 0.625rem;
        letter-spacing: 0.18em;
    }

    .family-cell-name {
        font-size: 1.0625rem;
    }

    .family-cell-amp {
        font-size: 0.8125rem;
    }

    .family-ornament {
        padding: 0 0.5rem;
        margin-top: 1.5rem;
    }

    .wedding-date {
        flex-direction: column;
        gap: 16px;
    }

    /* Countdown - Mobile Compact */
    .countdown {
        flex-wrap: wrap;
        gap: 10px;
        padding: 1rem 1.25rem;
        margin-bottom: 45px;
    }

    .countdown-item {
        min-width: 55px;
    }

    .countdown-number {
        font-size: clamp(1.6rem, 5vw, 2rem);
    }

    .countdown-separator {
        display: none;
    }

    .rsvp-form {
        padding: 28px 20px;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-label {
        min-width: 100%;
    }

    .music-control {
        bottom: 16px !important;
        right: 16px !important;
        width: 46px;
        height: 46px;
    }

    .directions-links {
        flex-direction: column;
    }

    .direction-btn {
        width: 100%;
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .user-card {
        flex-direction: column;
        text-align: center;
    }

    .user-stats {
        width: 100%;
        justify-content: center;
    }

    .user-actions {
        width: 100%;
        justify-content: center;
    }

    /* Events Grid - Mobile Single Event */
    .events-grid.single-event {
        max-width: 100%;
        padding: 0 8px;
    }

    .events-grid.single-event .event-card {
        max-width: 100%;
        margin: 0 auto;
        padding: 36px 28px;
    }
}

@media (max-width: 480px) {
    .full-date {
        flex-direction: column;
        gap: 4px;
    }

    .full-date .date-number {
        font-size: 2.6rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .event-card {
        padding: 28px 20px;
    }

    /* Family Section - Small Mobile */
    .family-davetiye {
        margin: 1.5rem auto 1.75rem;
    }

    .family-column {
        min-width: 5.5rem;
        grid-template-rows: 1.375rem 1.375rem 1.125rem 1.375rem;
    }

    .family-cell-title {
        font-size: 0.5625rem;
        letter-spacing: 0.15em;
    }

    .family-cell-name {
        font-size: 0.9375rem;
    }

    .family-ornament {
        padding: 0 0.375rem;
    }

    /* Countdown - Small Mobile */
    .countdown {
        padding: 0.875rem 1rem;
    }

    .countdown-item {
        min-width: 48px;
    }

    .footer-names .script-text {
        font-size: 1.8rem;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .upload-card {
        padding: 28px 20px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */
@media print {
    .music-control,
    .nav-dots,
    .scroll-indicator,
    .boho-floral-overlay,
    .pampas-accent {
        display: none !important;
    }
}

/* =============================================================================
   LUXURY HERO SECTION ENHANCEMENTS
   ============================================================================= */

/* Enhanced Corner Florals */
.boho-corners {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.corner-decor {
    position: absolute;
    width: 180px;
    height: 180px;
    opacity: 0.6;
    transform: translateZ(0);
}

.corner-decor.top-left {
    top: 0;
    left: 0;
}

.corner-decor.top-right {
    top: 0;
    right: 0;
}

.corner-decor.bottom-left {
    bottom: 0;
    left: 0;
}

.corner-decor.bottom-right {
    bottom: 0;
    right: 0;
}

/* Enhanced Pampas Grass */
.pampas-decor {
    position: absolute;
    z-index: 4;
    pointer-events: none;
    opacity: 0.5;
    transform: translateZ(0);
}

.pampas-left {
    left: 0;
    top: 50%;
    transform: translateY(-50%) translateZ(0);
    width: 100px;
    height: auto;
}

.pampas-right {
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateZ(0);
    width: 100px;
    height: auto;
}

/* RSVP Section Floral Corners */
.rsvp-floral-corners {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.rsvp-corner {
    position: absolute;
    width: 120px;
    height: 120px;
    opacity: 0.7;
}

.rsvp-corner.top-left {
    top: 0;
    left: 0;
}

.rsvp-corner.top-right {
    top: 0;
    right: 0;
}

.rsvp-corner.bottom-left {
    bottom: 0;
    left: 0;
}

.rsvp-corner.bottom-right {
    bottom: 0;
    right: 0;
}

/* Perfect Hero Centering */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    max-width: 100%;
}

/* =============================================================================
   PREMIUM MEMORY CLOUD BUTTON - LUXURY GOLD STYLE
   ============================================================================= */
.memory-cloud-link {
    margin-top: 50px;
    text-align: center;
}

.memory-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.memory-divider span {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.memory-divider p {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    font-style: italic;
    font-family: var(--font-heading);
}

.memory-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 40px;
    background: linear-gradient(135deg, #D4AF37 0%, #C9A227 50%, #B8860B 100%);
    color: var(--white);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 50px;
    box-shadow:
        0 4px 20px rgba(212, 175, 55, 0.4),
        0 0 40px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transform: translateZ(0);
    transition: all var(--transition-medium);
    will-change: transform, box-shadow;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.2);
}

.memory-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.memory-btn:hover {
    transform: translateY(-3px) translateZ(0) scale(1.02);
    box-shadow:
        0 8px 30px rgba(212, 175, 55, 0.5),
        0 0 60px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.memory-btn:hover::before {
    left: 100%;
}

.memory-btn:active {
    transform: translateY(-1px) translateZ(0) scale(0.98);
}

.memory-btn svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.memory-hint {
    margin-top: 16px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    font-style: italic;
    font-family: var(--font-heading);
}

/* =============================================================================
   FLOATING MEMORY CLOUD BUTTON
   ============================================================================= */
.floating-memory-btn {
    position: fixed !important;
    bottom: 92px !important;
    right: 24px !important;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 20px rgba(212, 175, 55, 0.4),
        0 0 30px rgba(212, 175, 55, 0.2);
    z-index: 2000 !important;
    will-change: transform, opacity;
    border: 2px solid rgba(255,255,255,0.3);
}

.floating-memory-btn:hover {
    transform: scale(1.1);
    box-shadow:
        0 6px 30px rgba(212, 175, 55, 0.5),
        0 0 40px rgba(212, 175, 55, 0.3);
}

.floating-memory-btn svg {
    width: 26px;
    height: 26px;
    color: var(--white);
}

.floating-memory-btn .btn-tooltip {
    position: absolute;
    right: 70px;
    white-space: nowrap;
    background: var(--charcoal);
    color: var(--white);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all var(--transition-fast);
    pointer-events: none;
}

.floating-memory-btn:hover .btn-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* =============================================================================
   ENHANCED RSVP SUCCESS MODAL
   ============================================================================= */
.thank-you-message,
.duplicate-message {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    border-radius: var(--radius-large);
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    z-index: 100;
    animation: modalFadeIn 0.5s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.thank-you-message.show,
.duplicate-message.show {
    display: flex;
}

.thank-you-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    border-radius: var(--radius-round);
    box-shadow:
        0 8px 30px rgba(212, 175, 55, 0.4),
        inset 0 2px 0 rgba(255,255,255,0.3);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 12px 40px rgba(212, 175, 55, 0.5); }
}

.thank-you-icon svg {
    width: 45px;
    height: 45px;
    color: var(--white);
    animation: checkmarkDraw 0.6s ease-out 0.3s both;
}

@keyframes checkmarkDraw {
    from {
        stroke-dasharray: 100;
        stroke-dashoffset: 100;
    }
    to {
        stroke-dasharray: 100;
        stroke-dashoffset: 0;
    }
}

.thank-you-content h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--charcoal);
    margin-bottom: 12px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.thank-you-content p {
    font-size: 1.1rem;
    color: var(--charcoal-light);
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
}

/* Enhanced Confetti */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

/* =============================================================================
   ADMIN PANEL PREMIUM UPGRADE
   ============================================================================= */
.admin-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--cream) 0%, var(--beige) 100%);
}

/* Admin Navigation */
.admin-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--charcoal);
    font-weight: 500;
}

.admin-nav-brand svg {
    width: 28px;
    height: 28px;
}

.admin-nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-nav-links a {
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--charcoal);
    background: var(--cream);
    border-radius: 25px;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-nav-links a:hover,
.admin-nav-links a.active {
    background: var(--sage-dark);
    color: var(--white);
}

.admin-nav-links .logout-link {
    background: var(--terracotta);
    color: var(--white);
}

.admin-nav-links .logout-link:hover {
    background: #a86a5f;
}

/* Admin Content Area */
.admin-content {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Admin Header */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--charcoal);
    margin-bottom: 4px;
}

.admin-header p {
    color: var(--charcoal-light);
    font-size: 0.9rem;
}

.admin-header .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--sage-dark) 0%, var(--olive-dark) 100%);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-radius: 30px;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(107, 123, 94, 0.3);
}

.admin-header .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 123, 94, 0.4);
}

.admin-header .btn-primary svg {
    width: 18px;
    height: 18px;
}

/* Admin Stats Cards - REDUCED ICON SIZES */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-large);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.attending {
    background: rgba(107, 123, 94, 0.12);
    color: var(--sage-dark);
}

.stat-icon.guests {
    background: rgba(212, 175, 55, 0.12);
    color: #B8860B;
}

.stat-icon.declined {
    background: rgba(193, 123, 110, 0.12);
    color: var(--terracotta);
}

.stat-icon.total {
    background: rgba(44, 44, 44, 0.08);
    color: var(--charcoal);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info .stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 500;
    color: var(--charcoal);
    line-height: 1;
}

.stat-info .stat-label {
    font-size: 0.8rem;
    color: var(--charcoal-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Admin Table Container */
.admin-table-container {
    background: var(--white);
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: linear-gradient(135deg, var(--sage-dark) 0%, var(--olive-dark) 100%);
}

.admin-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--white);
}

.admin-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--beige);
    font-size: 0.9rem;
    color: var(--charcoal);
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover td {
    background: var(--cream);
}

.admin-table .name-cell {
    font-weight: 500;
    color: var(--charcoal);
}

.admin-table .guests-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-table .reason-cell {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--charcoal-light);
    font-style: italic;
}

.admin-table .date-cell {
    font-size: 0.8rem;
    color: var(--charcoal-light);
}

.admin-table .empty-cell {
    text-align: center;
    padding: 60px 20px;
    color: var(--charcoal-light);
    font-style: italic;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.attending {
    background: rgba(107, 123, 94, 0.12);
    color: var(--sage-dark);
}

.status-badge.declined {
    background: rgba(193, 123, 110, 0.12);
    color: var(--terracotta);
}

/* Delete Button */
.btn-delete {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(193, 123, 110, 0.1);
    color: var(--terracotta);
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-delete:hover {
    background: var(--terracotta);
    color: var(--white);
}

.btn-delete svg {
    width: 16px;
    height: 16px;
}

/* Users Grid for Memory Admin */
.users-grid {
    display: grid;
    gap: 16px;
}

.user-card {
    background: var(--white);
    border-radius: var(--radius-large);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    flex-wrap: wrap;
}

.user-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.user-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--sage-dark) 0%, var(--olive-dark) 100%);
    color: var(--white);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 150px;
}

.user-info h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--charcoal);
    margin-bottom: 4px;
}

.user-info p {
    font-size: 0.85rem;
    color: var(--charcoal-light);
}

.user-date {
    display: block;
    font-size: 0.75rem;
    color: var(--sand-dark);
    margin-top: 6px;
}

.user-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-sm.btn-outline {
    background: transparent;
    color: var(--sage-dark);
    border: 2px solid var(--sage-dark);
}

.btn-sm.btn-outline:hover {
    background: var(--sage-dark);
    color: var(--white);
}

.btn-sm.btn-primary {
    background: linear-gradient(135deg, var(--sage-dark) 0%, var(--olive-dark) 100%);
    color: var(--white);
    border: none;
}

.btn-sm.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(107, 123, 94, 0.3);
}

.btn-sm svg {
    width: 16px;
    height: 16px;
}

/* Empty State Admin */
.empty-state-admin {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
    background: var(--white);
    border-radius: var(--radius-large);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.empty-state-admin svg {
    width: 64px;
    height: 64px;
    color: var(--sand);
    margin-bottom: 20px;
}

.empty-state-admin h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.empty-state-admin p {
    color: var(--charcoal-light);
    font-size: 0.9rem;
}

/* =============================================================================
   CEREMONY FLOW STYLES
   ============================================================================= */
.ceremony-flow {
    margin: 50px 0;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-large);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ceremony-flow h3 {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--pampas-light);
    margin-bottom: 32px;
}

.flow-items {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.flow-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.flow-icon {
    width: 50px;
    height: 50px;
    background: rgba(201, 185, 154, 0.2);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--pampas-light);
}

.flow-item span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Event Date Badge Enhancement */
.event-date-badge .event-year {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Venue DateTime */
.venue-datetime {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.venue-date,
.venue-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--charcoal-light);
}

.venue-date svg,
.venue-time svg {
    color: var(--sage-dark);
}

/* =============================================================================
   MOBILE RESPONSIVE ADMIN
   ============================================================================= */
@media (max-width: 768px) {
    .admin-nav {
        padding: 14px 20px;
    }

    .admin-nav-brand svg {
        width: 24px;
        height: 24px;
    }

    .admin-nav-links a {
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    .admin-content {
        padding: 20px 16px;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-header h1 {
        font-size: 1.6rem;
    }

    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 18px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
    }

    .stat-icon svg {
        width: 20px;
        height: 20px;
    }

    .stat-info .stat-number {
        font-size: 1.6rem;
    }

    .admin-table-container {
        overflow-x: auto;
    }

    .admin-table th,
    .admin-table td {
        padding: 12px 14px;
        font-size: 0.8rem;
    }

    .user-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .user-actions {
        width: 100%;
        justify-content: center;
    }

    .flow-items {
        gap: 24px;
    }

    .flow-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .floating-memory-btn {
        bottom: 80px !important;
        right: 16px !important;
        width: 50px;
        height: 50px;
    }

    .floating-memory-btn svg {
        width: 22px;
        height: 22px;
    }

    .pampas-decor {
        width: 60px;
        opacity: 0.3;
    }

    .corner-decor {
        width: 100px;
        height: 100px;
        opacity: 0.4;
    }
}

/* =============================================================================
   PERFORMANCE OPTIMIZATIONS
   ============================================================================= */

/* Force GPU acceleration on animated elements */
.hero-content,
.scroll-reveal,
.event-card,
.info-card,
.memory-btn,
.stat-card,
.user-card,
.nav-dot,
.loader-rings {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Floating buttons use will-change only (transform handled by hidden-on-hero) */
.floating-memory-btn,
.music-control {
    backface-visibility: hidden;
}

/* Reduce paint areas */
.section {
    contain: layout style;
}

/* Smooth scrolling with GPU */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .parallax-bg {
        transform: none !important;
    }
}

/* High-performance animations */
.fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in.delay-1 { animation-delay: 0.15s; }
.fade-in.delay-2 { animation-delay: 0.3s; }
.fade-in.delay-3 { animation-delay: 0.45s; }
.fade-in.delay-4 { animation-delay: 0.6s; }
.fade-in.delay-5 { animation-delay: 0.75s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Optimize scroll reveal */
.scroll-reveal {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.scroll-reveal.delay-1 { transition-delay: 0.1s; }
.scroll-reveal.delay-2 { transition-delay: 0.2s; }
.scroll-reveal.delay-3 { transition-delay: 0.3s; }

/* Mobile hero text optimization */
@media (max-width: 480px) {
    .couple-names {
        font-size: clamp(2.5rem, 12vw, 4rem);
        line-height: 1.1;
    }

    .couple-names .name {
        display: block;
    }

    .couple-names .ampersand {
        font-size: 0.5em;
        margin: 8px 0;
    }

    .countdown {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .countdown-item {
        min-width: 60px;
    }

    .countdown-separator {
        display: none;
    }

    .memory-btn {
        padding: 16px 32px;
        font-size: 0.9rem;
    }

    .hero-content {
        padding: 30px 16px;
    }

    .save-the-date p {
        font-size: 0.9rem;
    }
}

/* Ensure touch targets are 44px minimum */
button,
.nav-dot,
.direction-btn,
.memory-btn,
.floating-memory-btn,
.submit-btn,
input[type="radio"] + .radio-custom,
select {
    min-height: 44px;
}

/* =============================================================================
   FLOATING BUTTONS - Hidden on Hero, Slide from Right
   Position is ALWAYS fixed. Only opacity/transform change.
   ============================================================================= */

/* Hidden state - slide off to right */
.hidden-on-hero {
    opacity: 0;
    pointer-events: none;
    transform: translateX(120%);
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Visible state - slide into view */
.hidden-on-hero.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

/* Stagger for memory button */
.floating-memory-btn.hidden-on-hero {
    transition: opacity 0.3s ease 0.05s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s;
}

/* Mobile: faster animation */
@media (max-width: 768px) {
    .hidden-on-hero {
        transition: opacity 0.25s ease, transform 0.3s ease-out;
    }

    .floating-memory-btn.hidden-on-hero {
        transition: opacity 0.25s ease 0.04s, transform 0.3s ease-out 0.04s;
    }
}

/* FORCE CENTER FIX - DESKTOP OVERRIDE */
.events-grid.single-event {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
}

.events-grid.single-event .event-card {
    margin-left: auto !important;
    margin-right: auto !important;
    transform: translateX(0) !important;
    position: relative !important;
    left: 0 !important;
}

/* =============================================================================
   SUCCESS TOAST NOTIFICATION - Boho-Lux Style
   ============================================================================= */
.success-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    z-index: 10001;
    max-width: 420px;
    width: calc(100% - 32px);
    background: linear-gradient(135deg, rgba(250, 248, 245, 0.97) 0%, rgba(245, 242, 238, 0.97) 100%);
    border-radius: 16px;
    box-shadow:
        0 4px 24px rgba(107, 123, 94, 0.15),
        0 8px 48px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(201, 185, 154, 0.3);
    overflow: hidden;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    font-family: var(--font-body);
}

.success-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.success-toast.hiding {
    transform: translateX(-50%) translateY(-30px);
    opacity: 0;
    transition: transform 0.3s ease-in, opacity 0.25s ease;
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 20px 18px;
}

.toast-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sage-light) 0%, var(--sage-dark) 100%);
    box-shadow: 0 2px 8px rgba(107, 123, 94, 0.25);
}

.toast-icon.attending {
    background: linear-gradient(135deg, #D4AF37 0%, #C9A227 100%);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.toast-icon.not-attending {
    background: linear-gradient(135deg, var(--pampas) 0%, var(--pampas-dark) 100%);
}

.toast-icon svg {
    width: 22px;
    height: 22px;
    stroke: white;
    stroke-width: 2.5;
}

.toast-text {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--olive-dark);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.toast-message {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--charcoal-light);
    line-height: 1.5;
    margin: 0;
}

.toast-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    margin: -4px -4px 0 0;
}

.toast-close:hover {
    background: rgba(107, 123, 94, 0.1);
}

.toast-close svg {
    width: 16px;
    height: 16px;
    stroke: var(--charcoal-light);
    stroke-width: 2;
}

.toast-progress {
    height: 3px;
    background: linear-gradient(90deg, var(--sage-dark) 0%, var(--pampas) 50%, #D4AF37 100%);
    transform-origin: left;
    animation: toastProgress 4.5s linear forwards;
}

@keyframes toastProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Mobile adjustments for toast */
@media (max-width: 480px) {
    .success-toast {
        top: 16px;
        max-width: none;
        width: calc(100% - 24px);
        border-radius: 12px;
    }

    .toast-content {
        padding: 16px;
        gap: 12px;
    }

    .toast-icon {
        width: 38px;
        height: 38px;
    }

    .toast-icon svg {
        width: 18px;
        height: 18px;
    }

    .toast-title {
        font-size: 1.1rem;
    }

    .toast-message {
        font-size: 0.85rem;
    }
}

/* =============================================================================
   CINEMATIC LETTER OVERLAY - Premium Wedding Experience
   ============================================================================= */

/* Scroll lock when overlay is open */
/* Main Overlay Container */
.letter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    z-index: 2147483647; /* Max safe z-index - above everything */
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    overflow: hidden;
    /* Ensure no transforms break fixed positioning */
    transform: none !important;
    /* Isolate stacking context */
    isolation: isolate;
}

.letter-overlay.active {
    display: flex !important;
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

/* Cinematic Backdrop */
.letter-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(
        ellipse at center,
        rgba(25, 22, 18, 0.75) 0%,
        rgba(18, 16, 14, 0.88) 50%,
        rgba(10, 8, 6, 0.95) 100%
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1;
}

/* Golden Sparkle Canvas */
.letter-sparkles {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2;
}

/* Close Button */
.letter-close-btn {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(201, 162, 39, 0.15);
    border: 1px solid rgba(201, 162, 39, 0.4);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.letter-overlay.show-close .letter-close-btn {
    opacity: 1;
    transform: scale(1);
}

.letter-close-btn:hover {
    background: rgba(201, 162, 39, 0.3);
    border-color: rgba(201, 162, 39, 0.7);
    transform: scale(1.1);
}

.letter-close-btn svg {
    width: 20px;
    height: 20px;
    stroke: #C9A227;
    stroke-width: 2;
}

/* Letter Container */
.letter-container {
    position: relative;
    z-index: 10;
    perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =============================================================================
   ENVELOPE STYLES
   ============================================================================= */

.envelope-wrapper {
    position: relative;
    width: 320px;
    height: 220px;
    transform-style: preserve-3d;
    opacity: 0;
    transform: scale(0.8) translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.letter-overlay.show-envelope .envelope-wrapper {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.envelope {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

/* Envelope Back */
.envelope-back {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, #F5F0E8 0%, #E8E0D4 50%, #DDD5C8 100%);
    border-radius: 4px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.2),
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Envelope Front */
.envelope-front {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65%;
    background: linear-gradient(180deg, #EDE5D8 0%, #E5DCD0 100%);
    border-radius: 0 0 4px 4px;
    clip-path: polygon(0 35%, 50% 0, 100% 35%, 100% 100%, 0 100%);
    z-index: 2;
}

/* Envelope Flap (opens) */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 55%;
    transform-origin: top center;
    transform-style: preserve-3d;
    z-index: 5;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.envelope-flap-inner {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #E8E0D4 0%, #DDD5C8 100%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    backface-visibility: hidden;
}

.envelope-flap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #D4CCC0 0%, #C9C0B4 100%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    transform: rotateX(180deg);
    backface-visibility: hidden;
}

.letter-overlay.envelope-opening .envelope-flap {
    transform: rotateX(-180deg);
}

/* Wax Seal with Glow */
.wax-seal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    z-index: 10;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wax-seal:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.wax-seal-glow {
    position: absolute;
    inset: -15px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: sealGlow 2s ease-in-out infinite;
}

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

.wax-seal-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #D4AF37 0%, #B8960C 50%, #9E7B1A 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 15px rgba(158, 123, 26, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -3px 6px rgba(0, 0, 0, 0.2);
}

.wax-seal-inner span {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: #FFF8E7;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.05em;
}

.letter-overlay.envelope-opening .wax-seal {
    animation: sealBreak 0.6s ease-out forwards;
}

@keyframes sealBreak {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
}

/* Hide envelope when letter appears */
.letter-overlay.show-letter .envelope-wrapper {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
    pointer-events: none;
}

/* =============================================================================
   LETTER PAPER STYLES
   ============================================================================= */

.letter-paper {
    position: absolute;
    width: 380px;
    max-width: 90vw;
    opacity: 0;
    transform: translateY(100px) scale(0.9);
    pointer-events: none;
    transition: opacity 1s ease, transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.letter-overlay.show-letter .letter-paper {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.letter-paper-inner {
    position: relative;
    background: linear-gradient(
        165deg,
        #FFFDF9 0%,
        #FBF9F5 20%,
        #F8F5EF 50%,
        #F4F0E8 80%,
        #EFE9E0 100%
    );
    border-radius: 4px;
    padding: 48px 40px;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 12px 32px rgba(0, 0, 0, 0.12),
        0 24px 64px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Paper Texture */
.letter-paper-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    border-radius: 4px;
}

/* Decorative Border */
.letter-border-decor {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    bottom: 16px;
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 2px;
    pointer-events: none;
}

.letter-border-decor::before,
.letter-border-decor::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(201, 162, 39, 0.4);
}

.letter-border-decor::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.letter-border-decor::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

/* Letter Content */
.letter-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Header Ornament */
.letter-header-ornament {
    margin-bottom: 24px;
    opacity: 0;
    transform: scaleX(0);
    transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.letter-overlay.animate-content .letter-header-ornament {
    opacity: 1;
    transform: scaleX(1);
}

.ornament-svg {
    width: 120px;
    height: 20px;
}

/* Personalized Greeting */
.letter-greeting {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    color: #4A5A3E;
    margin: 0 0 20px 0;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.letter-overlay.animate-content .letter-greeting {
    opacity: 1;
    transform: translateY(0);
}

/* Main Message with Typewriter Effect */
.letter-message {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 400;
    font-style: italic;
    color: #5a5a52;
    line-height: 1.85;
    margin: 0 0 32px 0;
    min-height: 80px;
    text-align: center;
}

.letter-message .typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: #C9A227;
    margin-left: 2px;
    animation: cursorBlink 0.8s ease-in-out infinite;
    vertical-align: text-bottom;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Signature with Animation */
.letter-signature-wrapper {
    margin-top: 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.letter-overlay.animate-signature .letter-signature-wrapper {
    opacity: 1;
    transform: translateY(0);
}

.letter-signature {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: #6B7B5E;
    margin: 0;
    letter-spacing: 0.02em;
}

.signature-text {
    display: inline-block;
    background: linear-gradient(90deg, #6B7B5E 0%, #4A5A3E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.signature-suffix {
    font-style: italic;
    opacity: 0.85;
}

.signature-underline {
    display: block;
    width: 160px;
    height: 10px;
    margin: 8px auto 0;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.2s ease-out;
}

.letter-overlay.animate-signature .signature-underline {
    stroke-dashoffset: 0;
}

/* Footer Ornament */
.letter-footer-ornament {
    margin-top: 28px;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.letter-overlay.animate-signature .letter-footer-ornament {
    opacity: 1;
    transform: scale(1);
}

.ornament-diamond {
    font-size: 1.2rem;
    color: #C9A227;
    opacity: 0.7;
}

/* =============================================================================
   RESPONSIVE STYLES
   ============================================================================= */

@media (max-width: 480px) {
    .envelope-wrapper {
        width: 280px;
        height: 190px;
    }

    .wax-seal {
        width: 60px;
        height: 60px;
    }

    .wax-seal-inner span {
        font-size: 1.2rem;
    }

    .letter-paper {
        max-width: 92vw;
    }

    .letter-paper-inner {
        padding: 36px 28px;
    }

    .letter-greeting {
        font-size: 1.5rem;
    }

    .letter-message {
        font-size: 1rem;
        line-height: 1.75;
    }

    .letter-signature {
        font-size: 1.4rem;
    }

    .letter-close-btn {
        top: 16px;
        right: 16px;
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 360px) {
    .envelope-wrapper {
        width: 260px;
        height: 175px;
    }

    .letter-paper-inner {
        padding: 28px 20px;
    }

    .letter-greeting {
        font-size: 1.35rem;
    }

    .letter-message {
        font-size: 0.95rem;
    }

    .letter-signature {
        font-size: 1.25rem;
    }
}

/* =============================================================================
   RSVP CONFIRMATION MESSAGE
   ============================================================================= */

.rsvp-sent-confirmation {
    text-align: center;
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(107, 123, 94, 0.08) 0%, rgba(201, 185, 154, 0.08) 100%);
    border-radius: 12px;
    border: 1px solid rgba(107, 123, 94, 0.15);
    animation: confirmFadeIn 0.6s ease forwards;
}

.rsvp-sent-confirmation p {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--sage-dark);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.rsvp-sent-confirmation svg {
    width: 20px;
    height: 20px;
    stroke: #C9A227;
    stroke-width: 2;
}

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

/* =============================================================================
   UPGRADED LETTER OVERLAY - CINEMATIC PREMIUM EXPERIENCE
   Version 2.0 - Enhanced 3D Envelope, Camera Effects, Feathers, PDF
   ============================================================================= */

/* iOS Scroll Lock Fix - Enhanced */
body.overlay-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    touch-action: none;
    -webkit-overflow-scrolling: auto;
}

/* Cinematic Backdrop with Camera Zoom */
.letter-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(
        ellipse at center,
        rgba(25, 22, 18, 0.75) 0%,
        rgba(18, 16, 14, 0.88) 50%,
        rgba(10, 8, 6, 0.95) 100%
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1;
    transform: scale(1);
    transition: transform 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Cinematic Camera Zoom In Effect */
.letter-backdrop.camera-zoom-in {
    transform: scale(1.05);
}

/* Vignette overlay for cinematic feel */
.letter-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 40%,
        rgba(0, 0, 0, 0.4) 100%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.letter-overlay.show-letter .letter-backdrop::after {
    opacity: 1;
}

/* Smooth closing transition */
.letter-overlay.closing {
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.letter-overlay.closing .letter-backdrop {
    transform: scale(1);
}

/* Feather Particle Canvas */
.letter-feathers {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 3;
}

/* =============================================================================
   REALISTIC 3D ENVELOPE - Enhanced
   ============================================================================= */

.envelope-wrapper {
    position: relative;
    width: 340px;
    height: 240px;
    transform-style: preserve-3d;
    perspective: 1500px;
    opacity: 0;
    transform: scale(0.7) translateY(50px) rotateX(5deg);
    transition: opacity 0.8s ease, transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: blur(3px);
}

.letter-overlay.show-envelope .envelope-wrapper {
    opacity: 1;
    transform: scale(1) translateY(0) rotateX(0deg);
    filter: blur(0);
}

.envelope {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

/* Micro-tilt on hover */
.envelope:hover {
    transform: rotateX(2deg) rotateY(-1deg);
}

/* Envelope Back - Paper Grain Texture + Depth */
.envelope-back {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, #F5F0E8 0%, #E8E0D4 50%, #DDD5C8 100%);
    border-radius: 6px;
    box-shadow:
        0 6px 25px rgba(0, 0, 0, 0.25),
        0 15px 50px rgba(0, 0, 0, 0.18),
        0 25px 80px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -2px 6px rgba(0, 0, 0, 0.05);
    transform: translateZ(-2px);
}

/* Paper grain texture */
.envelope-back::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.035;
    border-radius: 6px;
    pointer-events: none;
}

/* Embossed edge effect */
.envelope-back::after {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.03);
    pointer-events: none;
}

/* Envelope Front - Enhanced Depth */
.envelope-front {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65%;
    background: linear-gradient(180deg, #EDE5D8 0%, #E5DCD0 60%, #DDD5C8 100%);
    border-radius: 0 0 6px 6px;
    clip-path: polygon(0 35%, 50% 0, 100% 35%, 100% 100%, 0 100%);
    z-index: 2;
    box-shadow:
        inset 0 20px 30px -15px rgba(0, 0, 0, 0.08),
        inset 0 -1px 0 rgba(255, 255, 255, 0.8);
    transform: translateZ(1px);
}

/* Paper texture on front */
.envelope-front::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
}

/* Envelope Flap - Enhanced 3D Opening */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 58%;
    transform-origin: top center;
    transform-style: preserve-3d;
    z-index: 5;
    transition: transform 1.4s cubic-bezier(0.68, -0.15, 0.265, 1.35);
}

/* Flap inner face */
.envelope-flap-inner {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #E8E0D4 0%, #DDD5C8 100%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    backface-visibility: hidden;
    box-shadow:
        inset 0 -10px 20px -10px rgba(0, 0, 0, 0.08),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Flap texture */
.envelope-flap-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

/* Flap back face (visible when opened) */
.envelope-flap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #D8D0C4 0%, #CCC4B8 100%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    transform: rotateX(180deg);
    backface-visibility: hidden;
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Flap opening animation with wobble */
.letter-overlay.envelope-opening .envelope-flap {
    transform: rotateX(-175deg);
    animation: flapWobble 1.4s cubic-bezier(0.68, -0.15, 0.265, 1.35);
}

@keyframes flapWobble {
    0% { transform: rotateX(0deg); }
    40% { transform: rotateX(-185deg); }
    55% { transform: rotateX(-170deg); }
    70% { transform: rotateX(-178deg); }
    85% { transform: rotateX(-173deg); }
    100% { transform: rotateX(-175deg); }
}

/* Wax Seal - Enhanced 3D */
.wax-seal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(10px);
    width: 75px;
    height: 75px;
    z-index: 10;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wax-seal:hover {
    transform: translate(-50%, -50%) translateZ(15px) scale(1.08);
}

/* Pulsing glow */
.wax-seal-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    animation: sealGlow 2s ease-in-out infinite;
}

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

/* Wax seal body with 3D effect */
.wax-seal-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #D4AF37 0%, #B8960C 40%, #9E7B1A 70%, #8B6914 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 6px 20px rgba(158, 123, 26, 0.6),
        0 10px 30px rgba(139, 105, 20, 0.4),
        inset 0 3px 6px rgba(255, 255, 255, 0.35),
        inset 0 -4px 8px rgba(0, 0, 0, 0.25),
        inset 0 0 0 2px rgba(255, 255, 255, 0.1);
    transform: translateZ(5px);
}

/* Wax texture */
.wax-seal-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.08;
    border-radius: 50%;
    pointer-events: none;
}

/* Embossed initials */
.wax-seal-inner span {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: #FFF8E7;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.4),
        0 -1px 1px rgba(255, 255, 255, 0.2);
    letter-spacing: 0.08em;
    position: relative;
    z-index: 2;
}

/* Seal break animation */
.letter-overlay.envelope-opening .wax-seal {
    animation: sealBreak 0.8s ease-out forwards;
}

@keyframes sealBreak {
    0% { opacity: 1; transform: translate(-50%, -50%) translateZ(10px) scale(1) rotate(0deg); }
    30% { transform: translate(-50%, -50%) translateZ(20px) scale(1.15) rotate(5deg); }
    60% { opacity: 0.8; transform: translate(-50%, -50%) translateZ(25px) scale(1.1) rotate(-3deg); }
    100% { opacity: 0; transform: translate(-50%, -50%) translateZ(30px) scale(0.4) rotate(15deg); }
}

/* Envelope fades backward when letter appears */
.letter-overlay.show-letter .envelope-wrapper {
    opacity: 0;
    transform: scale(0.7) translateY(-60px) translateZ(-100px);
    filter: blur(4px);
    pointer-events: none;
    transition: all 0.8s ease-out;
}

/* =============================================================================
   LETTER PAPER - Cinematic Entrance
   ============================================================================= */

.letter-paper {
    position: absolute;
    width: 400px;
    max-width: 92vw;
    opacity: 0;
    transform: translateY(120px) scale(0.85) translateZ(-50px);
    filter: blur(4px);
    pointer-events: none;
    transition:
        opacity 1s ease,
        transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1),
        filter 0.8s ease;
}

/* Letter comes forward with blur → focus effect */
.letter-overlay.show-letter .letter-paper {
    opacity: 1;
    transform: translateY(0) scale(1) translateZ(0);
    filter: blur(0);
    pointer-events: auto;
}

/* Letter paper inner with enhanced depth */
.letter-paper-inner {
    position: relative;
    background: linear-gradient(
        165deg,
        #FFFDF9 0%,
        #FBF9F5 20%,
        #F8F5EF 50%,
        #F4F0E8 80%,
        #EFE9E0 100%
    );
    border-radius: 6px;
    padding: 50px 42px 40px;
    box-shadow:
        0 5px 10px rgba(0, 0, 0, 0.08),
        0 15px 40px rgba(0, 0, 0, 0.12),
        0 30px 80px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(0, 0, 0, 0.03);
}

/* =============================================================================
   WEDDING DATE HIGHLIGHT
   ============================================================================= */

.letter-date-highlight {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 24px 0 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.12) 0%, rgba(212, 175, 55, 0.08) 100%);
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 25px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.letter-date-highlight .date-icon {
    font-size: 1.1rem;
}

.letter-date-highlight .date-text {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: #5a5a52;
    letter-spacing: 0.02em;
}

.letter-date-highlight .date-text strong {
    color: #C9A227;
    font-weight: 600;
}

/* =============================================================================
   PERSONALIZED MEMORY CARD
   ============================================================================= */

.memory-card-preview {
    margin: 28px 0 24px;
    opacity: 0;
    transform: translateY(15px) scale(0.95);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

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

.memory-card-inner {
    background: linear-gradient(145deg, #FDFCFA 0%, #F8F5F0 50%, #F4F0E8 100%);
    border: 1px solid rgba(201, 185, 154, 0.35);
    border-radius: 12px;
    padding: 24px 20px 20px;
    text-align: center;
    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
}

/* Paper texture on memory card */
.memory-card-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    border-radius: 12px;
    pointer-events: none;
}

.memory-card-header {
    margin-bottom: 12px;
}

.memory-ornament {
    font-size: 1.3rem;
    color: #C9A227;
    opacity: 0.7;
}

.memory-card-greeting {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: #4A5A3E;
    margin: 0 0 10px 0;
    letter-spacing: 0.02em;
}

.memory-card-message {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-style: italic;
    color: #6a6a62;
    line-height: 1.6;
    margin: 0 0 14px 0;
}

.memory-card-date {
    font-size: 0.75rem;
    color: #8a8a82;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.memory-date-divider {
    color: #C9A227;
    opacity: 0.6;
}

.memory-card-footer {
    margin-top: 12px;
}

.memory-ornament-small {
    font-size: 0.9rem;
    color: #C9A227;
    opacity: 0.5;
}

/* =============================================================================
   PDF DOWNLOAD BUTTON
   ============================================================================= */

.letter-actions {
    margin-top: 24px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

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

.download-memory-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #6B7B5E 0%, #4A5A3E 100%);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    box-shadow:
        0 4px 15px rgba(74, 90, 62, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.download-memory-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(74, 90, 62, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #7B8B6E 0%, #5A6A4E 100%);
}

.download-memory-btn:active {
    transform: translateY(0);
}

.download-memory-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* =============================================================================
   RESPONSIVE ADJUSTMENTS FOR NEW ELEMENTS
   ============================================================================= */

@media (max-width: 480px) {
    .envelope-wrapper {
        width: 290px;
        height: 200px;
    }

    .wax-seal {
        width: 65px;
        height: 65px;
    }

    .wax-seal-inner span {
        font-size: 1.3rem;
    }

    .letter-paper {
        max-width: 94vw;
    }

    .letter-paper-inner {
        padding: 38px 26px 32px;
    }

    .letter-date-highlight {
        padding: 10px 16px;
        gap: 8px;
    }

    .letter-date-highlight .date-text {
        font-size: 0.85rem;
    }

    .memory-card-inner {
        padding: 20px 16px 16px;
    }

    .memory-card-greeting {
        font-size: 1.25rem;
    }

    .memory-card-message {
        font-size: 0.85rem;
    }

    .download-memory-btn {
        padding: 12px 22px;
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .envelope-wrapper {
        width: 260px;
        height: 175px;
    }

    .letter-paper-inner {
        padding: 30px 20px 26px;
    }

    .letter-date-highlight {
        flex-direction: column;
        gap: 4px;
        padding: 12px 14px;
    }

    .memory-card-inner {
        padding: 18px 14px 14px;
    }

    .download-memory-btn {
        padding: 11px 18px;
        font-size: 0.75rem;
        gap: 8px;
    }

    .download-memory-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* =============================================================================
   PREFERS-REDUCED-MOTION SUPPORT
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
    .letter-backdrop,
    .envelope-wrapper,
    .envelope-flap,
    .wax-seal,
    .letter-paper,
    .letter-date-highlight,
    .memory-card-preview,
    .letter-actions {
        transition-duration: 0.1s !important;
        animation: none !important;
    }

    .wax-seal-glow {
        animation: none !important;
        opacity: 0.6;
    }

    .letter-backdrop.camera-zoom-in {
        transform: none;
    }

    /* Disable feathers and sparkles via canvas - handled in JS */
}
