/* ==========================================================================
   LUXURY WEDDING INVITATION - DESIGN SYSTEM & STYLESHEET
   Aesthetics: Royal Sapphire Navy, Gold Accents, Floral Elegance & Glassmorphism
   ========================================================================== */

:root {
  /* Color Palette Tokens - Inspired by Royal Blue & Gold Invitation Card */
  --bg-dark-obsidian: #060b18;
  --bg-velvet-gradient: radial-gradient(circle at 50% 20%, #0d1e3d 0%, #071022 65%, #030710 100%);
  --surface-glass: rgba(255, 255, 255, 0.05);
  --surface-glass-hover: rgba(255, 255, 255, 0.09);
  --surface-card: rgba(12, 24, 48, 0.72);
  
  --border-gold-subtle: rgba(212, 175, 55, 0.28);
  --border-gold-bright: rgba(245, 226, 170, 0.6);
  --border-glass: rgba(255, 255, 255, 0.12);

  --accent-rose-gold: #c5d8ea; /* Powder / Floral Sky Blue */
  --accent-rose-gold-light: #e5f0f8;
  --accent-gold-primary: #D4AF37;
  --accent-gold-light: #F7E7A9;
  --accent-amber-glow: rgba(212, 175, 55, 0.2);
  --accent-sapphire: #2563eb;
  --accent-powder-blue: #b9d7ea;

  --text-cream: #FAF6F0;
  --text-cream-muted: rgba(250, 246, 240, 0.78);
  --text-gold-gradient: linear-gradient(135deg, #FFF3D6 0%, #F5E2B3 45%, #D4AF37 100%);

  /* Typography */
  --font-script: 'Great Vibes', 'Alex Brush', cursive;
  --font-display: 'Cormorant Garamond', serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-arabic: 'Amiri', 'Traditional Arabic', serif;

  /* Shadows & Glows */
  --shadow-card-3d: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 175, 55, 0.12);
  --glow-gold: 0 0 25px rgba(212, 175, 55, 0.35);
  --glow-rose: 0 0 30px rgba(74, 144, 226, 0.25);

  /* Micro-interactions & Speeds */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark-obsidian);
  color: var(--text-cream);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background: var(--bg-velvet-gradient);
  background-attachment: fixed;
  position: relative;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background picture removed as requested; clean royal sapphire velvet gradient is preserved */
body::before {
  display: none;
}

/* Interactive Canvas Background */
#petal-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Ambient Lighting Glow Orbs */
.ambient-glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  animation: pulseOrb 12s infinite alternate ease-in-out;
}

.orb-top-left {
  top: -100px;
  left: -100px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28), transparent 70%);
}

.orb-bottom-right {
  bottom: -150px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.22), transparent 70%);
}

.orb-center {
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(14, 45, 95, 0.25), transparent 70%);
}

@keyframes pulseOrb {
  0% { transform: scale(1) translate(0, 0); opacity: 0.35; }
  50% { transform: scale(1.15) translate(20px, -20px); opacity: 0.55; }
  100% { transform: scale(0.95) translate(-15px, 15px); opacity: 0.4; }
}

/* Container Structure & Smooth Unveil Animation */
body:not(.invitation-revealed) {
  overflow: hidden !important;
}

.app-viewport {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
  opacity: 0;
  transform: scale(0.96) translateY(35px);
  filter: blur(6px);
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1), filter 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

body.invitation-revealed .app-viewport {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: blur(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark-obsidian);
}
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(232, 197, 200, 0.6);
}

/* ==========================================================================
   HEADER & HERO COUNTDOWN SECTION
   ========================================================================== */

.hero-header {
  text-align: center;
  margin-bottom: 3.5rem;
  position: relative;
  animation: fadeInDown 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  background: rgba(13, 8, 22, 0.55);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 32px;
  padding: 3rem 2rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), var(--glow-gold);
}

.overline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent-gold-primary);
  background: var(--surface-glass);
  border: 1px solid var(--border-gold-subtle);
  padding: 0.4rem 1.25rem;
  border-radius: 50px;
  backdrop-filter: blur(12px);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card-3d);
}

.overline-badge::before,
.overline-badge::after {
  content: '✦';
  font-size: 0.7rem;
  color: var(--accent-rose-gold);
}

.couple-names {
  font-family: var(--font-script);
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  font-weight: 400;
  line-height: 1.1;
  background: var(--text-gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  filter: drop-shadow(0 0 15px rgba(232, 197, 200, 0.2));
}

.wedding-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  letter-spacing: 0.15em;
  color: var(--text-cream-muted);
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* Islamic Bismillah Invocation Header */
.islamic-bismillah {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem;
}

.bismillah-arabic {
  font-family: var(--font-arabic);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  color: var(--accent-gold-light);
  letter-spacing: 0.04em;
  line-height: 1.4;
  filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.45));
  direction: rtl;
}

.bismillah-english {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  letter-spacing: 0.12em;
  color: var(--text-cream-muted);
  margin-top: 0.35rem;
  font-style: italic;
}

.bismillah-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.8rem auto 0;
  color: var(--accent-gold-primary);
  font-size: 0.9rem;
}

.bismillah-divider::before,
.bismillah-divider::after {
  content: '';
  height: 1px;
  width: 55px;
  background: linear-gradient(90deg, transparent, var(--accent-gold-primary), transparent);
}

/* Hosts Banner */
.hosts-banner {
  max-width: 720px;
  margin: 0 auto 1.5rem auto;
  padding: 1.25rem 1.75rem;
  background: rgba(10, 22, 48, 0.55);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.hosts-lead {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--accent-gold-light);
  margin-bottom: 0.3rem;
}

.hosts-name {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-cream);
  letter-spacing: 0.02em;
}

.hosts-address {
  font-size: 0.92rem;
  color: var(--accent-powder-blue);
  margin-top: 0.25rem;
  letter-spacing: 0.02em;
}

.hosts-invitation-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-cream-muted);
  margin-top: 0.75rem;
  line-height: 1.5;
  font-style: italic;
}

/* Bride Parentage Box */
.bride-parentage-box {
  margin-top: 0.2rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.bride-d-o {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-gold-light);
}

.bride-address-line {
  font-size: 0.9rem;
  color: var(--accent-powder-blue);
  margin-top: 0.25rem;
}

/* Invitation Card Preview Box */
.invitation-card-preview-container {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-gold-bright);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  background: #050b18;
  max-height: 280px;
}

.invitation-card-preview-container:hover {
  transform: scale(1.025);
  box-shadow: 0 20px 45px rgba(212, 175, 55, 0.3);
}

.invitation-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.invitation-card-badge-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(6, 11, 24, 0.88);
  color: var(--accent-gold-light);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  border: 1px solid var(--border-gold-subtle);
  backdrop-filter: blur(8px);
}

.family-sharing-box {
  background: rgba(14, 28, 58, 0.45);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  margin-top: 1rem;
  text-align: center;
}

.family-sharing-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--accent-gold-light);
  font-style: italic;
}

.family-sharing-names {
  font-weight: 600;
  color: var(--text-cream);
  margin-top: 0.25rem;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

/* Countdown Timer */
.countdown-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.countdown-box {
  background: var(--surface-card);
  border: 1px solid var(--border-gold-subtle);
  backdrop-filter: blur(16px);
  border-radius: 18px;
  padding: 1rem 1.5rem;
  min-width: 95px;
  text-align: center;
  box-shadow: var(--shadow-card-3d);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.countdown-box:hover {
  transform: translateY(-5px);
  border-color: var(--accent-rose-gold);
  box-shadow: var(--shadow-card-3d), var(--glow-rose);
}

.countdown-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--accent-gold-light);
  line-height: 1;
}

.countdown-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-cream-muted);
  margin-top: 0.35rem;
}

.countdown-divider {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent-gold-primary);
  opacity: 0.5;
}

.post-wedding-msg {
  display: none;
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--accent-rose-gold);
  margin-top: 1rem;
}

/* ==========================================================================
   BRIDE & GROOM SILHOUETTE STAGE
   ========================================================================== */

.couple-stage-section {
  margin: 3.5rem 0 4.5rem;
  text-align: center;
  position: relative;
}

.stage-wrapper {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  border-radius: 28px;
  padding: 2.5rem 2rem;
  background: radial-gradient(ellipse at center, rgba(35, 23, 50, 0.8) 0%, rgba(13, 8, 22, 0.9) 100%);
  border: 1px solid var(--border-gold-subtle);
  box-shadow: var(--shadow-card-3d);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.stage-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.08), transparent);
  animation: shineStage 8s infinite linear;
  pointer-events: none;
}

@keyframes shineStage {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.stage-heading {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold-primary);
  margin-bottom: 0.5rem;
}

.stage-subtext {
  font-size: 0.9rem;
  color: var(--text-cream-muted);
  margin-bottom: 2rem;
}

.stage-illustration-container {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.stage-couple-img {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 20px;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.7));
  display: block;
  margin: 0 auto;
  border: 1px solid var(--border-gold-subtle);
}

/* Hotspots on Stage */
.stage-hotspot {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.25);
  border: 2px solid var(--accent-gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
  transition: transform var(--transition-bounce), background var(--transition-fast);
  z-index: 10;
}

.stage-hotspot::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--accent-rose-gold);
  animation: rippleHotspot 2s infinite ease-out;
}

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

.stage-hotspot:hover {
  transform: scale(1.2);
  background: rgba(232, 197, 200, 0.4);
}

.hotspot-icon {
  font-size: 1.2rem;
  color: #fff;
}

.hotspot-groom {
  top: 25%;
  left: 32%;
}

.hotspot-bride {
  top: 25%;
  right: 32%;
}

.hotspot-tooltip {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 11, 20, 0.9);
  color: var(--accent-gold-light);
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: nowrap;
  border: 1px solid var(--border-gold-subtle);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.stage-hotspot:hover .hotspot-tooltip {
  opacity: 1;
}

/* ==========================================================================
   INTERACTIVE CARD WALL DASHBOARD (3D TILT CARDS)
   ========================================================================== */

.interactive-wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

/* 3D Tilt Card Base */
.tilt-card {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 24px;
  padding: 2rem;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card-3d);
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth), transform 0.1s ease-out;
  transform-style: preserve-3d;
  cursor: pointer;
  overflow: hidden;
}

.tilt-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(232, 197, 200, 0.12), transparent 40%);
  opacity: 0;
  transition: opacity var(--transition-smooth);
  pointer-events: none;
}

.tilt-card:hover {
  border-color: var(--border-gold-bright);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), var(--glow-gold);
}

.tilt-card:hover::after {
  opacity: 1;
}

.tilt-card-content {
  transform: translateZ(30px);
  position: relative;
  z-index: 2;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.card-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(232, 197, 200, 0.1));
  border: 1px solid var(--border-gold-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent-gold-light);
  box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.15);
}

.card-title-group h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-cream);
  line-height: 1.2;
}

.card-title-group p {
  font-size: 0.8rem;
  color: var(--text-cream-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-body {
  font-size: 0.95rem;
  color: var(--text-cream-muted);
  margin-bottom: 1.5rem;
}

.card-action-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border-radius: 50px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(232, 197, 200, 0.25));
  border: 1px solid var(--accent-gold-primary);
  color: var(--text-cream);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.card-action-btn:hover {
  background: linear-gradient(135deg, var(--accent-gold-primary), var(--accent-rose-gold));
  color: var(--bg-dark-obsidian);
  box-shadow: var(--glow-gold);
  transform: translateY(-2px);
}

@media (min-width: 992px) {
  .tilt-card-span-2 {
    grid-column: span 2;
  }
}

/* ==========================================================================
   SPECIFIC PANEL STYLES INSIDE CARDS
   ========================================================================== */

/* Calendar Card Preview */
.date-badge-box {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(15, 10, 24, 0.6);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.date-big-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-gold-primary);
}

.date-details-text h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-cream);
}

.date-details-text p {
  font-size: 0.85rem;
  color: var(--text-cream-muted);
}

/* Love Story Mini Preview */
.story-preview-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  padding-left: 1.25rem;
  border-left: 2px dashed rgba(212, 175, 55, 0.3);
  margin-bottom: 1.25rem;
}

.timeline-mini-item {
  position: relative;
}

.timeline-mini-item::before {
  content: '✦';
  position: absolute;
  left: -1.75rem;
  top: 0;
  color: var(--accent-rose-gold);
  font-size: 0.8rem;
}

.timeline-mini-item h5 {
  font-size: 0.95rem;
  color: var(--accent-gold-light);
}

.timeline-mini-item p {
  font-size: 0.8rem;
  color: var(--text-cream-muted);
}

/* Polaroid Grid Preview */
.polaroid-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.polaroid-mini-card {
  background: #FAF6F0;
  padding: 6px 6px 14px;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  transform: rotate(-3deg);
  transition: transform var(--transition-smooth);
}

.polaroid-mini-card:nth-child(even) {
  transform: rotate(3deg);
}

.polaroid-mini-card:hover {
  transform: scale(1.05) rotate(0deg);
  z-index: 5;
}

.polaroid-mini-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 3px;
}

.polaroid-caption-mini {
  font-family: var(--font-script);
  font-size: 0.9rem;
  color: #23192D;
  text-align: center;
  margin-top: 4px;
}

/* Leaflet Map Preview Frame */
#venue-mini-map {
  width: 100%;
  height: 180px;
  border-radius: 16px;
  border: 1px solid var(--border-gold-subtle);
  margin-bottom: 1rem;
  z-index: 1;
}

/* Contact Fast Action Links */
.contact-quick-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.contact-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-gold-subtle);
  color: var(--text-cream);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all var(--transition-smooth);
}

.contact-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--accent-gold-primary);
  color: var(--accent-gold-light);
  transform: translateY(-3px);
}

/* ==========================================================================
   PORTAL DIVE-IN MODALS OVERLAYS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 4, 12, 0.85);
  backdrop-filter: blur(24px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-dark-obsidian);
  background-image: radial-gradient(circle at 50% 0%, #291a3c 0%, #110b1a 100%);
  border: 1px solid var(--border-gold-bright);
  border-radius: 28px;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8), var(--glow-gold);
  transform: scale(0.7) translateY(30px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  padding: 2.5rem;
}

.modal-backdrop.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-gold-subtle);
  color: var(--text-cream);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-smooth);
  z-index: 10;
}

.modal-close-btn:hover {
  background: var(--accent-rose-gold);
  color: var(--bg-dark-obsidian);
  transform: rotate(90deg);
}

.modal-header-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--accent-gold-primary);
  margin-bottom: 0.25rem;
}

.modal-header-subtitle {
  font-size: 0.9rem;
  color: var(--text-cream-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-gold-subtle);
}

/* Full Love Story Vertical Timeline in Modal */
.story-full-timeline {
  position: relative;
  padding-left: 2rem;
  margin: 1.5rem 0;
}

.story-full-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-gold-primary), var(--accent-rose-gold), transparent);
}

.story-timeline-card {
  position: relative;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 18px;
  padding: 1.5rem;
}

.story-timeline-card::before {
  content: '✦';
  position: absolute;
  left: -2.35rem;
  top: 1.5rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-dark-obsidian);
  border: 1px solid var(--accent-gold-primary);
  color: var(--accent-gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.story-date-tag {
  font-size: 0.8rem;
  color: var(--accent-rose-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.story-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-cream);
  margin: 0.25rem 0 0.5rem;
}

.story-desc {
  font-size: 0.95rem;
  color: var(--text-cream-muted);
}

/* Polaroid Full Gallery Lightbox */
.polaroid-full-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.polaroid-full-card {
  background: #FFFDF9;
  padding: 12px 12px 24px;
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.polaroid-full-card:hover {
  transform: translateY(-8px) rotate(1deg);
  box-shadow: 0 25px 45px rgba(212, 175, 55, 0.25);
}

.polaroid-full-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
}

.polaroid-full-caption {
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: #1A1224;
  text-align: center;
  margin-top: 10px;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 3, 8, 0.95);
  backdrop-filter: blur(25px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content-box {
  position: relative;
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.lightbox-main-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  border: 2px solid var(--border-gold-bright);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), var(--glow-gold);
}

.lightbox-caption {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--accent-gold-light);
  margin-top: 1rem;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-gold-subtle);
  color: var(--text-cream);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lightbox-nav-btn:hover {
  background: var(--accent-gold-primary);
  color: var(--bg-dark-obsidian);
}

.lightbox-prev { left: -20px; }
.lightbox-next { right: -20px; }

@media (max-width: 768px) {
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

/* Full Leaflet Map Container */
#venue-modal-map {
  width: 100%;
  height: 350px;
  border-radius: 18px;
  border: 1px solid var(--border-gold-subtle);
  margin-bottom: 1.5rem;
}

/* Get Directions Form */
.directions-form-box {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.input-styled {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 50px;
  padding: 0.85rem 1.5rem;
  color: var(--text-cream);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.input-styled:focus {
  border-color: var(--accent-gold-primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

/* RSVP Form */
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.form-group label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold-light);
}

.radio-group-options {
  display: flex;
  gap: 1rem;
}

.radio-option-card {
  flex: 1;
  padding: 0.85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-gold-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.radio-option-card input[type="radio"] {
  accent-color: var(--accent-gold-primary);
}

.radio-option-card:hover,
.radio-option-card:has(input:checked) {
  border-color: var(--accent-gold-primary);
  background: rgba(212, 175, 55, 0.15);
  color: var(--text-cream);
}

textarea.input-styled {
  border-radius: 18px;
  min-height: 110px;
  resize: vertical;
}

/* Guestbook Live Wishes Stream */
.guestbook-feed-container {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-gold-subtle);
}

.guestbook-feed-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--accent-rose-gold);
  margin-bottom: 1rem;
}

.wishes-scroll-box {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 220px;
  overflow-y: auto;
}

.wish-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
}

.wish-author {
  font-weight: 600;
  color: var(--accent-gold-light);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
}

.wish-badge {
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.2);
}

.wish-text {
  font-size: 0.85rem;
  color: var(--text-cream-muted);
  margin-top: 0.3rem;
  font-style: italic;
}

/* Profile Hotspot Modals (Bride & Groom) */
.profile-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 600px) {
  .profile-modal-grid {
    grid-template-columns: 1fr;
  }
}

.profile-avatar-img {
  width: 100%;
  border-radius: 20px;
  border: 2px solid var(--border-gold-bright);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.profile-bio-text p {
  margin-top: 0.75rem;
  color: var(--text-cream-muted);
  font-size: 0.95rem;
}

.profile-quote {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--accent-rose-gold);
  margin-top: 1rem;
}

/* ==========================================================================
   FLOATING VINYL MUSIC WIDGET
   ========================================================================== */

/* ==========================================================================
   SLEEK FLOATING MUSIC PLAY/PAUSE BUTTON (MINIMALIST)
   ========================================================================== */
.floating-music-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(12, 24, 48, 0.88);
  border: 1.5px solid var(--border-gold-bright);
  color: var(--accent-gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(212, 175, 55, 0.25);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  outline: none;
  padding: 0;
}

.floating-music-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(212, 175, 55, 0.45);
  background: rgba(18, 35, 70, 0.95);
}

.floating-music-btn .icon-pause {
  display: none;
  font-size: 1.2rem;
  color: var(--accent-gold-light);
}

.floating-music-btn .icon-play {
  display: block;
  font-size: 1.2rem;
  margin-left: 3px; /* visual center for play triangle */
  color: var(--accent-gold-light);
}

.floating-music-btn.playing {
  border-color: var(--accent-gold-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 25px rgba(212, 175, 55, 0.45);
  animation: musicPulse 2.5s infinite ease-in-out;
}

.floating-music-btn.playing .icon-pause {
  display: block;
}

.floating-music-btn.playing .icon-play {
  display: none;
}

@keyframes musicPulse {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 15px rgba(212, 175, 55, 0.25);
  }
  50% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 28px rgba(212, 175, 55, 0.6);
  }
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(25, 16, 38, 0.95);
  border: 1px solid var(--accent-gold-primary);
  color: var(--text-cream);
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  backdrop-filter: blur(20px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), var(--glow-gold);
  z-index: 3000;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

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

/* Keyframe Animations */
@keyframes fadeInDown {
  0% { opacity: 0; transform: translateY(-30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive Tweaks & Face Alignment */
@media (max-width: 768px) {
  body::before {
    background-position: 50% 12%; /* Keep faces centered on tall phone viewports */
    opacity: 0.28;
  }

  .app-viewport {
    padding: 1.25rem 0.85rem 7rem;
  }
  
  .hero-header {
    padding: 2rem 1rem;
    margin-bottom: 2.5rem;
    border-radius: 24px;
  }
  
  .couple-names {
    font-size: 2.8rem;
  }

  .overline-badge {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    padding: 0.35rem 1rem;
  }
  
  .countdown-container {
    gap: 0.75rem;
  }

  .countdown-box {
    padding: 0.65rem 0.85rem;
    min-width: 68px;
    border-radius: 14px;
  }

  .countdown-number {
    font-size: 1.8rem;
  }

  .countdown-label {
    font-size: 0.65rem;
  }

  .interactive-wall-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .tilt-card {
    padding: 1.5rem;
    border-radius: 20px;
  }

  .modal-container {
    padding: 1.5rem 1.25rem;
    border-radius: 22px;
  }
  
  .floating-music-btn {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 46px;
    height: 46px;
  }
}

/* ==========================================================================
   ROYAL ENVELOPE WELCOME PORTAL OVERLAY & OPEN ANIMATION
   ========================================================================== */

.welcome-portal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center 35%, #0f2348 0%, #060d1e 60%, #02050e 100%);
  padding: 1.5rem;
  overflow: hidden;
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1), filter 0.9s ease;
}

.welcome-portal-overlay.opened {
  opacity: 0;
  transform: scale(1.18);
  filter: blur(14px);
  pointer-events: none;
}

.welcome-backdrop-glow {
  position: absolute;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(212, 175, 55, 0.15) 50%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  animation: pulseWelcomeGlow 8s infinite alternate ease-in-out;
}

@keyframes pulseWelcomeGlow {
  0% { transform: scale(0.9) translate(-20px, -20px); opacity: 0.6; }
  100% { transform: scale(1.15) translate(20px, 20px); opacity: 0.9; }
}

/* Card Container */
.welcome-envelope-card {
  position: relative;
  max-width: 540px;
  width: 100%;
  background: rgba(10, 22, 48, 0.88);
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  border-radius: 28px;
  padding: 2.75rem 2rem 2.25rem;
  text-align: center;
  backdrop-filter: blur(24px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 50px rgba(212, 175, 55, 0.18), inset 0 0 35px rgba(212, 175, 55, 0.06);
  animation: welcomeCardEnter 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes welcomeCardEnter {
  0% { opacity: 0; transform: scale(0.92) translateY(25px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Ornate Corner Borders */
.ornate-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(212, 175, 55, 0.8);
  border-style: solid;
  pointer-events: none;
}

.corner-tl { top: 14px; left: 14px; border-width: 2px 0 0 2px; border-top-left-radius: 8px; }
.corner-tr { top: 14px; right: 14px; border-width: 2px 2px 0 0; border-top-right-radius: 8px; }
.corner-bl { bottom: 14px; left: 14px; border-width: 0 0 2px 2px; border-bottom-left-radius: 8px; }
.corner-br { bottom: 14px; right: 14px; border-width: 0 2px 2px 0; border-bottom-right-radius: 8px; }

/* Islamic Calligraphy in Welcome Overlay */
.welcome-bismillah {
  margin-bottom: 0.75rem;
}

.welcome-arabic {
  font-family: var(--font-arabic);
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  color: var(--accent-gold-light);
  direction: rtl;
  letter-spacing: 0.04em;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4));
}

.welcome-arabic-sub {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-cream-muted);
  font-style: italic;
  margin-top: 0.2rem;
}

/* Crest Monogram */
.welcome-crest {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0;
}

.welcome-crest-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1.5px solid var(--border-gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.18), transparent 75%);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.25);
}

.welcome-crest-initials {
  font-family: var(--font-script);
  font-size: 1.85rem;
  color: var(--accent-gold-light);
  line-height: 1;
}

.welcome-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-gold-primary);
  margin-bottom: 0.35rem;
}

.welcome-subtitle-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-cream-muted);
  font-style: italic;
  margin-bottom: 0.3rem;
}

.welcome-couple-title {
  font-family: var(--font-script);
  font-size: clamp(2.3rem, 6vw, 3.3rem);
  font-weight: 400;
  line-height: 1.15;
  background: var(--text-gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.6rem;
  filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.35));
}

.welcome-ampersand {
  font-family: var(--font-display);
  font-size: 0.7em;
  color: var(--accent-gold-primary);
  display: inline-block;
  margin: 0 0.2rem;
}

/* Royal Wax Seal Button & Pulse Animation */
.welcome-action-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.5rem;
}

.royal-wax-seal-btn {
  position: relative;
  width: 82px;
  height: 82px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}

.royal-wax-seal-btn:hover {
  transform: scale(1.08);
}

.seal-disc {
  position: relative;
  z-index: 2;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF5D6 0%, #D4AF37 50%, #8A6508 100%);
  border: 2px solid #FFF8E7;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 175, 55, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #2b1c05;
  transition: box-shadow var(--transition-fast);
}

.royal-wax-seal-btn:hover .seal-disc {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 45px rgba(212, 175, 55, 0.75), inset 0 2px 8px rgba(255, 255, 255, 0.8);
}

.seal-envelope-icon {
  font-size: 1.35rem;
  color: #3b2604;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.5));
}

.seal-btn-text {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin-top: 3px;
  color: #3b2604;
}

.seal-ripple-wave {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-gold-primary);
  opacity: 0;
  pointer-events: none;
  animation: sealWave 2.4s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

.seal-ripple-wave.wave-2 {
  animation-delay: 1.2s;
}

@keyframes sealWave {
  0% { transform: scale(0.85); opacity: 0.95; }
  100% { transform: scale(1.6); opacity: 0; }
}

.welcome-click-prompt {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold-light);
  margin-top: 0.65rem;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.sparkle-star {
  display: inline-block;
  color: var(--accent-gold-primary);
  animation: twinkleStar 1.8s infinite alternate;
}

@keyframes twinkleStar {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.25); opacity: 1; filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.8)); }
}

/* Replay Welcome Intro Floating Button */
.replay-intro-btn {
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 100;
  background: rgba(10, 22, 48, 0.75);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 30px;
  color: var(--accent-gold-light);
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  cursor: pointer;
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-smooth);
}

.replay-intro-btn:hover {
  background: rgba(18, 36, 75, 0.95);
  border-color: var(--accent-gold-primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.35);
  transform: translateY(-2px);
}
