/* ==========================================================================
   Plataforma SaaS de Invitaciones Digitales - Enterprise & Multi-Role
   Design System, Multi-Theme Engine, Guest View & Super Admin Dashboard
   ========================================================================== */

:root {
  --primary-color: #10b981;
  --secondary-color: #f97316;
  --accent-color: #fbbf24;
  --bg-gradient: linear-gradient(135deg, #0d9488 0%, #0891b2 50%, #0284c7 100%);
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  --text-dark: #1e293b;
  --text-title: #065f46;
  --font-heading: 'Fredoka', cursive, sans-serif;
  --font-body: 'Outfit', sans-serif;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

/* --- TEMA 2: ESPACIO / GALÁCTICO --- */
[data-theme="space"] {
  --primary-color: #06b6d4;
  --secondary-color: #8b5cf6;
  --accent-color: #ec4899;
  --bg-gradient: linear-gradient(135deg, #090d16 0%, #1e1b4b 50%, #31104b 100%);
  --card-bg: rgba(15, 23, 42, 0.88);
  --card-border: rgba(139, 92, 246, 0.4);
  --text-dark: #f8fafc;
  --text-title: #38bdf8;
}

/* --- TEMA 3: REINO MÁGICO / PRINCESAS --- */
[data-theme="magic"] {
  --primary-color: #ec4899;
  --secondary-color: #a855f7;
  --accent-color: #fbbf24;
  --bg-gradient: linear-gradient(135deg, #fdf2f8 0%, #f472b6 40%, #c084fc 100%);
  --card-bg: rgba(255, 255, 255, 0.94);
  --card-border: rgba(244, 114, 182, 0.4);
  --text-dark: #4c1d95;
  --text-title: #be185d;
}

/* --- TEMA 4: MUNDO DINOSAURIOS --- */
[data-theme="dino"] {
  --primary-color: #22c55e;
  --secondary-color: #f59e0b;
  --accent-color: #facc15;
  --bg-gradient: linear-gradient(135deg, #052e16 0%, #14532d 50%, #3f6212 100%);
  --card-bg: rgba(15, 23, 42, 0.92);
  --card-border: rgba(34, 197, 94, 0.4);
  --text-dark: #f0fdf4;
  --text-title: #4ade80;
}

/* --- TEMA 5: CARRERA SUPERAUTOS --- */
[data-theme="racing"] {
  --primary-color: #ef4444;
  --secondary-color: #facc15;
  --accent-color: #facc15;
  --bg-gradient: linear-gradient(135deg, #09090b 0%, #18181b 50%, #450a0a 100%);
  --card-bg: rgba(24, 24, 27, 0.94);
  --card-border: rgba(239, 68, 68, 0.5);
  --text-dark: #f4f4f5;
  --text-title: #facc15;
}

/* --- TEMA 6: SUPERHÉROES --- */
[data-theme="superhero"] {
  --primary-color: #3b82f6;
  --secondary-color: #facc15;
  --accent-color: #ef4444;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #450a0a 100%);
  --card-bg: rgba(15, 23, 42, 0.92);
  --card-border: rgba(59, 130, 246, 0.5);
  --text-dark: #f8fafc;
  --text-title: #60a5fa;
}

/* --- TEMA 7: BODA ELEGANTE GOLD & WHITE --- */
[data-theme="wedding_gold"] {
  --primary-color: #d97706;
  --secondary-color: #b45309;
  --accent-color: #fef3c7;
  --bg-gradient: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-border: rgba(217, 119, 6, 0.3);
  --text-dark: #451a03;
  --text-title: #92400e;
}

/* --- TEMA 8: BODA ROMÁNTICA FLORAL SAKURA --- */
[data-theme="wedding_sakura"] {
  --primary-color: #f472b6;
  --secondary-color: #e11d48;
  --accent-color: #fef08a;
  --bg-gradient: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 50%, #fecdd3 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-border: rgba(244, 114, 182, 0.4);
  --text-dark: #881337;
  --text-title: #be123c;
}

/* --- TEMA 9: FIESTA GALA NOCHE / BLACK & GOLD (ADULTOS) --- */
[data-theme="gala"] {
  --primary-color: #fbbf24;
  --secondary-color: #f59e0b;
  --accent-color: #f43f5e;
  --bg-gradient: linear-gradient(135deg, #090d16 0%, #171e2e 50%, #2e1065 100%);
  --card-bg: rgba(15, 23, 42, 0.92);
  --card-border: rgba(251, 191, 36, 0.4);
  --text-dark: #f8fafc;
  --text-title: #fbbf24;
}

/* --- TEMA 10: GRADUACIÓN Y ÉXITO PROFESIONAL --- */
[data-theme="grad"] {
  --primary-color: #38bdf8;
  --secondary-color: #facc15;
  --accent-color: #a855f7;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0369a1 100%);
  --card-bg: rgba(15, 23, 42, 0.92);
  --card-border: rgba(56, 189, 248, 0.4);
  --text-dark: #f8fafc;
  --text-title: #38bdf8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  color: var(--text-dark);
}

body {
  min-height: 100vh;
  background: var(--bg-gradient);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
  transition: background 0.6s ease;
}

/* --- MODO INVITADO (Oculta controles de edición) --- */
body.is-guest-view .editor-only,
body.is-guest-view .hero-photo-edit-btn,
body.is-guest-view .theme-selector-card,
body.is-guest-view .upload-photo-box,
body.is-guest-view .btn-remove-photo,
body.is-guest-view #btn-open-photo-picker,
body.is-guest-view #btn-currency-toggle,
body.is-guest-view #btn-mobile-menu-toggle,
body.is-guest-view #btn-feedback-nav,
body.is-guest-view #btn-share-guest,
body.is-guest-view #btn-view-rsvps,
body.is-guest-view #btn-login-nav,
body.is-guest-view #btn-customize {
  display: none !important;
}

body:not(.is-guest-view) .guest-only {
  display: none !important;
}

/* --- Partículas de Fondo --- */
.particle-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.floating-particle {
  position: absolute;
  font-size: 2.2rem;
  opacity: 0.35;
  animation: floatParticle 12s infinite linear;
  user-select: none;
}

@keyframes floatParticle {
  0% { transform: translateY(-10vh) rotate(0deg) scale(0.8); opacity: 0; }
  15% { opacity: 0.45; }
  85% { opacity: 0.45; }
  100% { transform: translateY(110vh) rotate(360deg) scale(1.1); opacity: 0; }
}

/* --- Pantalla de Apertura (Gate Overlay) --- */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.gate-overlay.hidden {
  opacity: 0;
  transform: scale(1.08);
  pointer-events: none;
}

.envelope-wrapper {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: pulseEnvelope 3s infinite ease-in-out;
}

@keyframes pulseEnvelope {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.envelope-icon {
  font-size: 5.5rem;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.25));
  animation: bounceIcon 2s infinite ease-in-out;
}

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

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.gate-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--accent-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.gate-subtitle {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 500;
}

.btn-open {
  background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  padding: 16px 36px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-open:hover {
  transform: scale(1.08) translateY(-2px);
}

/* ============================================================
   HEADER — Sistema de Botones Rediseñado (Premium)
   ============================================================ */

/* --- Barra Superior de Control --- */
.top-controls {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 18px;
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.top-controls-left,
.top-controls-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Base para TODOS los botones del header ── */
.control-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0 14px;
  height: 38px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: rgba(255, 255, 255, 0.85) !important;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}

.control-btn span {
  color: inherit !important;
}

.control-btn:hover {
  transform: translateY(-2px) scale(1.04);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  color: #ffffff !important;
}

.control-btn:active {
  transform: scale(0.97);
}

/* ── Botones utilitarios compactos (izquierda: idioma, moneda, música) ── */
.util-btn {
  padding: 0 10px;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  gap: 4px;
}

.util-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.util-icon {
  font-size: 1rem;
  line-height: 1;
}

.util-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7) !important;
  letter-spacing: 0.05em;
}

/* ── Botón de música con dot indicador animado ── */
.music-btn {
  padding-right: 12px;
}

.music-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.music-dot--on {
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: musicPulse 2s infinite;
}

.music-dot--off {
  background: #64748b;
  animation: none;
}

@keyframes musicPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); }
  70%  { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* ── Botón fantasma (Feedback) — acento secundario mínimo ── */
.btn-util-ghost {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.25);
  color: rgba(196, 168, 255, 0.9) !important;
}

.btn-util-ghost:hover {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(139, 92, 246, 0.45);
  color: #c4b5fd !important;
}

/* ── Botón Compartir con efecto shimmer ── */
.btn-share {
  background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(6,182,212,0.2));
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7 !important;
  overflow: hidden;
}

.btn-share:hover {
  background: linear-gradient(135deg, rgba(16,185,129,0.35), rgba(6,182,212,0.35));
  border-color: rgba(16, 185, 129, 0.6);
  color: #a7f3d0 !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

/* Efecto shimmer — destello de luz animado */
.btn-shimmer {
  position: absolute;
  top: 0;
  left: -80%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 100%
  );
  animation: shimmerSlide 3.5s infinite ease-in-out;
  pointer-events: none;
  border-radius: inherit;
}

@keyframes shimmerSlide {
  0%   { left: -80%; opacity: 0; }
  20%  { opacity: 1; }
  50%  { left: 120%; opacity: 1; }
  100% { left: 120%; opacity: 0; }
}

/* ── Botón Confirmados con badge de notificación ── */
.btn-rsvps {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc !important;
}

.btn-rsvps:hover {
  background: rgba(99, 102, 241, 0.32);
  border-color: rgba(99, 102, 241, 0.55);
  color: #c7d2fe !important;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

/* Badge de notificación numérica */
.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 20px;
  background: #ef4444;
  color: #ffffff !important;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(10, 15, 30, 0.95);
  animation: badgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  letter-spacing: 0;
}

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

/* ── Botón de Cuenta / Login con avatar ── */
.btn-account {
  background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(29,78,216,0.2));
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd !important;
  padding: 0 12px;
}

.btn-account:hover {
  background: linear-gradient(135deg, rgba(59,130,246,0.35), rgba(29,78,216,0.35));
  border-color: rgba(59, 130, 246, 0.6);
  color: #bfdbfe !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.btn-account .user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255,255,255,0.4);
  flex-shrink: 0;
}

/* ── CTA Primario: Personalizar — más grande, con glow anillo ── */
.btn-primary-cta {
  background: linear-gradient(135deg, #f97316 0%, #ec4899 50%, #8b5cf6 100%);
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite;
  border: none;
  color: #ffffff !important;
  padding: 0 18px;
  height: 40px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35);
  letter-spacing: 0.02em;
}

.btn-primary-cta:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5), 0 0 0 1px rgba(255,255,255,0.15);
  color: #ffffff !important;
  filter: brightness(1.1);
}

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

/* Anillo de glow animado detrás del CTA */
.btn-glow-ring {
  position: absolute;
  inset: -3px;
  border-radius: 24px;
  background: linear-gradient(135deg, #f97316, #ec4899, #8b5cf6, #f97316);
  background-size: 300% 300%;
  animation: gradientShift 3s ease infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: blur(4px);
}

.btn-primary-cta:hover .btn-glow-ring {
  opacity: 0.6;
}

/* ── Botón de menú móvil ── */
.mobile-menu-btn {
  background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(79,70,229,0.25)) !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
  color: #a5b4fc !important;
}

/* ── Admin nav ── */
.btn-admin-nav {
  background: linear-gradient(135deg, #1e293b, #0f172a) !important;
  color: #facc15 !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
}

/* ── Backwards compat para clases antiguas ── */
.btn-customize-nav {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)) !important;
  color: #ffffff !important;
  border: none !important;
}

.btn-login-nav {
  background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(29,78,216,0.2)) !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
  color: #93c5fd !important;
}

/* El botón de menú desplegable solo debe existir en pantallas móviles, oculto en PC / Escritorio */
.mobile-only-btn {
  display: none !important;
}

/* ── ESTILOS RESPONSIVOS PARA MÓVILES (DESPLEGABLE MÓVIL) ── */
@media (max-width: 768px) {
  .top-controls {
    padding: 6px 10px;
    overflow: visible !important;
  }

  .control-btn {
    height: 34px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .util-btn {
    padding: 0 8px;
    height: 32px;
  }

  .mobile-only-btn {
    display: inline-flex !important;
  }

  .top-controls-right {
    display: none;
    position: absolute;
    top: 50px;
    right: 10px;
    background: rgba(10, 15, 30, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 200px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.05);
    animation: fadeInDown 0.22s ease-out forwards;
    z-index: 99999 !important;
  }

  .top-controls-right.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .top-controls-right .control-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 8px 12px;
    font-size: 0.88rem;
    height: 38px;
  }

  .app-container {
    margin-top: 60px !important;
    padding-top: 15px !important;
  }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Contenedor Principal --- */
.app-container {
  margin-top: 68px !important;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding: 20px 16px 80px 16px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

/* --- HERO SECTION --- */
.hero-card {
  text-align: center;
  padding-top: 40px;
}

.hero-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: white;
  font-family: var(--font-heading);
  padding: 8px 22px;
  border-radius: 50px;
  font-size: 1.05rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  color: var(--text-title) !important;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-name {
  color: var(--secondary-color) !important;
  display: block;
  font-size: 3.4rem;
  margin-top: 4px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  font-weight: 700;
}

.hero-mascot-container {
  margin: 24px auto;
  position: relative;
  max-width: 280px;
}

.hero-photo-edit-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff !important;
  padding: 8px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  z-index: 10;
}

.hero-photo-edit-btn:hover {
  background: var(--primary-color);
  transform: scale(1.05);
}

.hero-mascot-img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.2));
  animation: floatMascot 4s ease-in-out infinite;
}

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

.age-badge {
  position: absolute;
  bottom: 0;
  right: 5px;
  background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  padding: 10px 20px;
  border-radius: 50px;
  border: 4px solid #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transform: rotate(-6deg);
}

.hero-subtitle {
  color: var(--text-dark) !important;
  font-size: 1.15rem;
  font-weight: 500;
  margin-top: 12px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-title) !important;
}

.card-desc {
  color: var(--text-dark) !important;
  font-size: 0.98rem;
  line-height: 1.5;
  margin-top: 4px;
}

/* --- TARJETAS DE PAQUETES DE CRÉDITO Y MÉTODOS DE PAGO --- */
.credit-pkg-card {
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 14px 8px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.3s ease;
  text-align: center;
}

.credit-pkg-card:hover,
.credit-pkg-card.active {
  border-color: #10b981;
  background: #f0fdf4;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--card-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.detail-icon {
  font-size: 2rem;
  line-height: 1;
}

.detail-item h4 {
  color: var(--text-title) !important;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 4px;
  font-weight: 700;
}

.detail-item p,
#display-date,
#display-time,
#display-location-name,
#display-location-address,
#display-dresscode,
.glass-card p,
.form-group label {
  color: var(--text-dark) !important;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}

/* REGLAS ESPECÍFICAS PARA TEMÁTICAS OSCURAS (GRADUACIÓN, ESPACIAL, DINOS, AUTOS, SUPERHÉROES, GALA) */
[data-theme="grad"] .detail-item,
[data-theme="space"] .detail-item,
[data-theme="dino"] .detail-item,
[data-theme="racing"] .detail-item,
[data-theme="superhero"] .detail-item,
[data-theme="gala"] .detail-item {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
}

[data-theme="grad"] .detail-item p,
[data-theme="space"] .detail-item p,
[data-theme="dino"] .detail-item p,
[data-theme="racing"] .detail-item p,
[data-theme="superhero"] .detail-item p,
[data-theme="gala"] .detail-item p,
[data-theme="grad"] #display-date,
[data-theme="space"] #display-date,
[data-theme="dino"] #display-date,
[data-theme="racing"] #display-date,
[data-theme="superhero"] #display-date,
[data-theme="gala"] #display-date,
[data-theme="grad"] #display-time,
[data-theme="space"] #display-time,
[data-theme="dino"] #display-time,
[data-theme="racing"] #display-time,
[data-theme="superhero"] #display-time,
[data-theme="gala"] #display-time,
[data-theme="grad"] #display-location-address,
[data-theme="space"] #display-location-address,
[data-theme="dino"] #display-location-address,
[data-theme="racing"] #display-location-address,
[data-theme="superhero"] #display-location-address,
[data-theme="gala"] #display-location-address,
[data-theme="grad"] #display-dresscode,
[data-theme="space"] #display-dresscode,
[data-theme="dino"] #display-dresscode,
[data-theme="racing"] #display-dresscode,
[data-theme="superhero"] #display-dresscode,
[data-theme="gala"] #display-dresscode,
[data-theme="grad"] .card-desc,
[data-theme="space"] .card-desc,
[data-theme="dino"] .card-desc,
[data-theme="racing"] .card-desc,
[data-theme="superhero"] .card-desc,
[data-theme="gala"] .card-desc,
[data-theme="grad"] .glass-card p,
[data-theme="space"] .glass-card p,
[data-theme="dino"] .glass-card p,
[data-theme="racing"] .glass-card p,
[data-theme="superhero"] .glass-card p,
[data-theme="gala"] .glass-card p,
[data-theme="grad"] .glass-card .form-group label,
[data-theme="space"] .glass-card .form-group label,
[data-theme="dino"] .glass-card .form-group label,
[data-theme="racing"] .glass-card .form-group label,
[data-theme="superhero"] .glass-card .form-group label,
[data-theme="gala"] .glass-card .form-group label {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* --- REGLAS DE ALTO CONTRASTE PARA MODALES EN TODAS LAS TEMÁTICAS --- */
.modal-card label,
.modal-card .form-group label {
  color: #1e293b !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  display: block;
  margin-bottom: 4px;
  text-shadow: none !important;
}

.modal-card h3,
.modal-card h4,
.modal-card p,
.modal-card span {
  text-shadow: none !important;
}

.modal-card .form-input,
.modal-card .form-select,
.modal-card .form-textarea {
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  font-weight: 500 !important;
}

.modal-card .form-input:focus,
.modal-card .form-select:focus,
.modal-card .form-textarea:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}

/* --- SELECTOR DE TEMÁTICAS POR CATEGORÍAS --- */
.category-header {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text-title) !important;
  margin: 20px 0 10px 0;
  text-align: left;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 6px;
  font-weight: 700;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.theme-chip {
  background: #ffffff !important;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.theme-chip.active, .theme-chip:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  background: #ffffff !important;
}

.theme-chip-icon {
  font-size: 1.8rem;
}

.theme-chip-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a !important;
}

/* --- GALERÍA DE FOTOS --- */
.gallery-grid {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  margin-top: 16px;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.gallery-grid::-webkit-scrollbar {
  height: 8px;
}
.gallery-grid::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.gallery-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.gallery-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 150px;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 3px solid #ffffff;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  cursor: pointer;
  scroll-snap-align: start;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-remove-photo {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-photo-box {
  border: 2px dashed var(--primary-color);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- REPRODUCTOR AUDIO --- */
.audio-controls-wrapper {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.audio-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-play-pause {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.file-upload-btn {
  background: #f1f5f9;
  border: 1.5px dashed #cbd5e1;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: #475569;
}

/* --- CUENTA REGRESIVA --- */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.time-box {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border: 2px solid var(--primary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--secondary-color);
  line-height: 1;
}

.time-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 6px;
}

/* --- BOTONES DE ACCIÓN --- */
.action-buttons-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  text-decoration: none;
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.btn-action:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}

.btn-action:active {
  transform: scale(0.97);
}

.btn-action-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.btn-action-primary:hover {
  filter: brightness(1.08);
}

.btn-action-secondary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.btn-action-secondary:hover {
  filter: brightness(1.08);
}

/* --- MINI JUEGO TEMÁTICO --- */
.game-area {
  position: relative;
  width: 100%;
  height: 260px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
  border: 3px dashed var(--primary-color);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  margin-top: 15px;
}

.game-score-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  z-index: 5;
}

.falling-item {
  position: absolute;
  font-size: 2.6rem;
  cursor: pointer;
  user-select: none;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.2));
}

.game-start-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  padding: 14px 28px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  z-index: 10;
}

/* --- CREATIVE THEMED QR CODE FRAME --- */
.qr-creative-frame {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.98));
  border: 3px dashed var(--primary-color);
  border-radius: 24px;
  padding: 24px 20px 20px 20px;
  margin-bottom: 20px;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08), 0 0 25px rgba(var(--primary-color-rgb, 16, 185, 129), 0.15);
  transition: all 0.3s ease;
}

.qr-theme-badge {
  position: absolute;
  top: -14px;
  right: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 6px 16px;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  gap: 6px;
}

.qr-image-wrapper {
  background: #ffffff;
  padding: 16px;
  border-radius: 20px;
  display: inline-block;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border: 2px solid rgba(var(--primary-color-rgb, 16, 185, 129), 0.25);
  position: relative;
  min-width: 210px;
  min-height: 210px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qr-image-wrapper:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}

/* --- RSVP FORM --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  margin-bottom: 12px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #ffffff;
}

.btn-rsvp-submit {
  width: 100%;
  background: linear-gradient(135deg, #22c55e, #15803d);
  color: white;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  padding: 16px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(34, 197, 94, 0.35);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-rsvp-submit:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.45);
  filter: brightness(1.08);
}

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

/* --- MODAL SUPER ADMIN DASHBOARD --- */
.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.admin-metric-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.admin-metric-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: #1e293b;
}

.admin-metric-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.9rem;
}

.admin-table th, .admin-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.admin-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #334155;
}

.badge-social {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-google { background: #fee2e2; color: #dc2626; }
.badge-facebook { background: #dbeafe; color: #2563eb; }
.badge-email { background: #fef3c7; color: #d97706; }

/* MODALES GLOBALES */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 12px;
}

.btn-close-modal {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}

.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #1e293b;
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  animation: toastFade 3s ease forwards;
}

@keyframes toastFade {
  0% { opacity: 0; transform: translateY(20px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}

@media (max-width: 600px) {
  .action-buttons-row { grid-template-columns: 1fr; }
  .countdown-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 2.1rem; }
  .hero-name { font-size: 2.7rem; }
}

/* ANIMACIONES DEL LIGHTBOX */
@keyframes lightbox-fade-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-animate {
  animation: lightbox-fade-in 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
