/* ════════════════════════════════════════════════════
   BULEVAR 101 — HALLOWEEN HUB (RÉPLICA EXACTA)
   Tokens oficiales del archivo especificacion-diseno-halloween-hub.md
   ════════════════════════════════════════════════════ */

:root {
  /* Paleta exacta del documento de especificación */
  --color-bg:           #08070D;
  --color-bg-elevated:  #100B16;
  --color-bg-purple:    #1B1024;
  --color-card:         #100D18;
  --color-card-border:  #493044;
  --color-orange:       #FF7136;
  --color-orange-light: #FF9259;
  --color-cream:        #F4E8D7;
  --color-text:         #D9D0D4;
  --color-muted:        #A99BA9;
  --color-muted-dark:   #716573;
  --color-purple:       #6E3D79;
  --color-black:        #030207;

  /* Tipografías: Cinzel Decorative aplicada como titular Display en toda la web */
  --font-hero:          'Cinzel Decorative', serif;
  --font-serif:         'Cinzel Decorative', Georgia, serif;
  --font-handwritten:   'Caveat', cursive;
  --font-sans:          'Inter', system-ui, -apple-system, sans-serif;

  /* Geometría y bordes del diseño original */
  --radius-card:        8px;
  --radius-banner:      10px;
  --radius-pill:        999px;
  --radius-circle:      50%;
  --border-subtle:      1px solid rgba(191, 130, 170, 0.22);
}

/* ── Reset básico y tipografía general ────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--color-bg);
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video {
  display: block;
  max-width: 100%;
}

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

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

/* ── Contenedor centrado idéntico al marco de safari ── */
.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Clases de texto y acento ───────────────────────── */
.text-cream { color: var(--color-cream); }
.text-orange { color: var(--color-orange); }

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: 0.65rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--color-cream);
  letter-spacing: -0.01em;
}

/* ════════════════════════════════════════════════════
   BOTONES EXACTOS DE LA CAPTURA
   ════════════════════════════════════════════════════ */

/* Botón primario: Píldora naranja, texto oscuro/negro, flecha derecha */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.85rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}

.btn-arrow {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.25rem;
  transition: transform 0.2s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-primary {
  background-color: var(--color-orange);
  color: #120904;
  box-shadow: 0 4px 20px rgba(255, 113, 54, 0.35);
}

.btn-primary:hover {
  background-color: var(--color-orange-light);
  box-shadow: 0 6px 28px rgba(255, 113, 54, 0.5);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.7rem 1.45rem;
  font-size: 1rem;
}

/* Botón secundario del hero: "Watch Trailer" con icono de reproducción circular */
.btn-trailer {
  background-color: rgba(16, 11, 22, 0.6);
  color: var(--color-cream);
  border: 1px solid rgba(191, 130, 170, 0.3);
  backdrop-filter: blur(8px);
}

.btn-trailer:hover {
  background-color: rgba(27, 16, 36, 0.8);
  border-color: rgba(255, 113, 54, 0.4);
  transform: translateY(-1px);
}

.btn-trailer__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.15rem;
}

/* Botón en el header: "Cómo llegar →" con borde naranja fino */
.btn-header-ticket {
  background-color: transparent;
  color: var(--color-cream);
  border: 1.5px solid var(--color-orange);
  padding: 0.65rem 1.45rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.btn-header-ticket:hover {
  background-color: rgba(255, 113, 54, 0.15);
  transform: translateY(-1px);
}

/* ════════════════════════════════════════════════════
   HEADER Y NAVEGACIÓN
   ════════════════════════════════════════════════════ */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  padding-top: 1rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logotipo Bulevar 101 sin calabaza y al doble de tamaño */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo__title {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-family: var(--font-hero);
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--color-cream);
  line-height: 1;
}

.logo__title span:last-child {
  color: var(--color-orange);
  text-shadow: 0 0 16px rgba(255, 113, 54, 0.5);
}

/* Menú enlaces centro */
.main-nav {
  display: none;
  align-items: center;
  gap: 2.25rem;
}

.nav-link {
  font-size: 1.15rem;
  color: var(--color-text);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--color-orange);
}

/* Acciones derecha */
.header-actions {
  display: none;
  align-items: center;
  gap: 1.1rem;
}

.btn-search {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  transition: color 0.2s, background 0.2s;
}

.btn-search:hover {
  color: var(--color-cream);
  background-color: rgba(255, 255, 255, 0.08);
}

/* ── Botón hamburguesa accesible y visible en móvil ── */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  background: rgba(19, 13, 29, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 113, 54, 0.35);
  border-radius: 8px;
  cursor: pointer;
  z-index: 1050;
  transition: all 0.25s ease;
}

.burger:hover,
.burger:focus-visible {
  border-color: var(--color-orange);
  background: rgba(255, 113, 54, 0.15);
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-cream);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.burger.is-open {
  border-color: var(--color-orange);
  background: rgba(255, 113, 54, 0.2);
}

.burger.is-open span {
  background-color: var(--color-orange);
}

.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Cajón de navegación móvil (Overlay completo) ── */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100dvh;
  padding: 95px 1.85rem 2.5rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(35, 18, 48, 0.98) 0%, rgba(10, 7, 15, 0.99) 75%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.25rem;
  z-index: 1000;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease,
              visibility 0.35s;
  overflow-y: auto;
  box-sizing: border-box;
}

.mobile-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 0.5rem;
  font-family: var(--font-hero);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-cream);
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 113, 54, 0.15);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav a:hover,
.mobile-nav a:active {
  color: var(--color-orange);
  padding-left: 0.75rem;
}

.mobile-nav a.btn {
  font-family: var(--font-sans);
  margin-top: 1.5rem;
  justify-content: center;
  border-bottom: none;
  font-size: 1.1rem;
}

@media (min-width: 768px) {
  .main-nav { display: flex; }
  .header-actions { display: flex; }
  .burger { display: none; }
  .mobile-nav { display: none !important; }
}

/* ════════════════════════════════════════════════════
   HERO SECTION (RÉPLICA EXACTA)
   ════════════════════════════════════════════════════ */
.hero-section {
  position: relative;
  min-height: 600px;
  padding-top: 100px;
  padding-bottom: 60px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Imagen de fondo (image.png) */
.hero-artwork {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-artwork__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
  transition: filter 0.08s ease, transform 0.08s ease;
  will-change: filter, transform;
}

/* ════════════════════════════════════════════════════
   SISTEMA DE RELÁMPAGOS GLOBAL Y REALISTA
   Baña toda la pantalla sin cortes entre secciones
   ════════════════════════════════════════════════════ */

/* Destello global a pantalla completa (Fixed overlay) */
.global-lightning-flash {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  background: radial-gradient(
    ellipse at 70% 25%,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(225, 205, 255, 0.65) 28%,
    rgba(145, 90, 230, 0.38) 60%,
    rgba(65, 25, 120, 0.22) 100%
  );
  mix-blend-mode: screen;
  will-change: opacity;
  transition: opacity 0.06s ease;
}

/* Efecto destello localizado en la luna y el cielo del hero */
.hero-lightning-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 1;
  background: radial-gradient(
    ellipse at 75% 28%,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(220, 200, 255, 0.75) 30%,
    rgba(140, 80, 220, 0.45) 60%,
    transparent 100%
  );
  mix-blend-mode: screen;
  will-change: opacity;
}

/* Estado activo cuando cae el trueno (disparado globalmente en <body>) */
body.is-thunder {
  background-color: #160F22 !important;
}

body.is-thunder .global-lightning-flash {
  opacity: 1 !important;
}

body.is-thunder .hero-artwork__img {
  filter: brightness(2.6) contrast(1.35) saturate(1.4) drop-shadow(0 0 50px rgba(230, 200, 255, 0.85)) !important;
}

body.is-thunder .hero-lightning-flash {
  opacity: 1 !important;
}

body.is-thunder .rule-card {
  border-color: rgba(220, 180, 255, 0.45);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 35px rgba(175, 120, 245, 0.25);
}

body.is-thunder .map-pass-preview,
body.is-thunder .video-frame,
body.is-thunder .map-wrapper {
  border-color: rgba(220, 180, 255, 0.4);
  box-shadow: 0 8px 35px rgba(160, 100, 230, 0.2);
}

/* Animación autónoma continua (en bucle natural de 12 segundos) */
@media (prefers-reduced-motion: no-preference) {
  body:not(.manual-thunder) .global-lightning-flash {
    animation: natural-global-lightning 12s infinite;
  }
  body:not(.manual-thunder) .hero-lightning-flash {
    animation: natural-lightning 12s infinite;
  }
  body:not(.manual-thunder) .hero-artwork__img {
    animation: natural-glow 12s infinite;
  }
}

@keyframes natural-global-lightning {
  0%, 78%, 81%, 85%, 88%, 100% {
    opacity: 0;
  }
  79% {
    opacity: 0.75;
  }
  80% {
    opacity: 0.15;
  }
  82% {
    opacity: 0.9;
  }
  83% {
    opacity: 0.35;
  }
  86% {
    opacity: 0.6;
  }
  87% {
    opacity: 0.05;
  }
}

@keyframes natural-lightning {
  0%, 78%, 81%, 85%, 88%, 100% {
    opacity: 0;
  }
  79% {
    opacity: 0.85;
  }
  80% {
    opacity: 0.2;
  }
  82% {
    opacity: 0.95;
  }
  83% {
    opacity: 0.4;
  }
  86% {
    opacity: 0.7;
  }
  87% {
    opacity: 0.05;
  }
}

@keyframes natural-glow {
  0%, 78%, 81%, 85%, 88%, 100% {
    filter: brightness(1) contrast(1);
  }
  79% {
    filter: brightness(2.2) contrast(1.25) saturate(1.3);
  }
  80% {
    filter: brightness(1.3) contrast(1.05);
  }
  82% {
    filter: brightness(2.5) contrast(1.3) saturate(1.4);
  }
  83% {
    filter: brightness(1.4);
  }
  86% {
    filter: brightness(1.9) contrast(1.2);
  }
  87% {
    filter: brightness(1.1);
  }
}

/* Gradientes precisos para legibilidad del texto en el lado izquierdo */
.hero-artwork__gradient-left {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #08070D 0%,
    rgba(8, 7, 13, 0.94) 38%,
    rgba(8, 7, 13, 0.65) 58%,
    rgba(8, 7, 13, 0.1) 85%,
    transparent 100%
  );
}

.hero-artwork__gradient-bottom {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    #08070D 0%,
    rgba(8, 7, 13, 0.85) 12%,
    transparent 45%
  );
}

/* Letrero lateral derecho idéntico al de la imagen */
.hero-sidenote {
  position: absolute;
  right: 2.5rem;
  bottom: 25%;
  z-index: 2;
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  text-align: center;
  font-family: var(--font-hero);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgba(244, 232, 215, 0.6);
  line-height: 1.35;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

@media (min-width: 992px) {
  .hero-sidenote { display: flex; }
}

.hero-container {
  position: relative;
  z-index: 2;
}

.hero-copy {
  max-width: 580px;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--color-orange);
  margin-bottom: 1.1rem;
}

/* Titular monumental: Cinzel Decorative, dos líneas compactas */
.hero-headline {
  font-family: var(--font-hero);
  font-size: clamp(3.2rem, 8.5vw, 5.2rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.01em;
  color: var(--color-cream);
  margin-bottom: 1.35rem;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.7);
}

.hero-headline__line1 {
  display: block;
}

.hero-headline__line2 {
  display: block;
  letter-spacing: 0.02em;
}

.hero-subtext {
  font-size: 1.3rem;
  color: var(--color-text);
  line-height: 1.6;
  max-width: 480px;
  margin-bottom: 1.85rem;
}

/* ════════════════════════════════════════════════════
   CUENTA ATRÁS HALLOWEEN (HERO COUNTDOWN)
   ════════════════════════════════════════════════════ */
.hero-countdown {
  display: inline-flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.95rem 1.4rem;
  background: linear-gradient(135deg, rgba(27, 16, 36, 0.85) 0%, rgba(13, 8, 19, 0.92) 100%);
  border: 1px solid rgba(255, 113, 54, 0.4);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65), 0 0 20px rgba(255, 113, 54, 0.15);
  margin-bottom: 2rem;
  max-width: 460px;
}

.countdown-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-orange);
}

.countdown-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-orange);
  box-shadow: 0 0 10px var(--color-orange);
  animation: countdown-pulse 1.8s infinite;
}

@keyframes countdown-pulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

.countdown-grid {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.countdown-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
  padding: 0.45rem 0.55rem;
  background: rgba(8, 6, 13, 0.7);
  border-radius: 6px;
  border: 1px solid rgba(255, 113, 54, 0.2);
}

.countdown-value {
  font-family: var(--font-hero);
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
  color: var(--color-cream);
  letter-spacing: 0.02em;
}

.countdown-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

.countdown-sep {
  font-family: var(--font-hero);
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--color-orange);
  opacity: 0.75;
  margin-top: -12px;
}

@media (max-width: 480px) {
  .hero-countdown {
    padding: 0.85rem 1.05rem;
    width: 100%;
    box-sizing: border-box;
  }
  .countdown-grid {
    justify-content: space-between;
    gap: 0.35rem;
  }
  .countdown-box {
    min-width: 48px;
    padding: 0.4rem 0.35rem;
  }
  .countdown-value {
    font-size: 1.4rem;
  }
  .countdown-sep {
    font-size: 1.2rem;
  }
}

.hero-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.15rem;
  margin-bottom: 2.5rem;
}

/* Fila de beneficios inferiores */
.hero-benefits {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  flex-wrap: wrap;
  padding-top: 1rem;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.benefit-icon {
  color: var(--color-orange);
  display: flex;
  align-items: center;
}

.benefit-icon svg {
  width: 32px;
  height: 32px;
}

.benefit-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-muted);
  line-height: 1.3;
}

/* ════════════════════════════════════════════════════
   SECCIÓN "SPOOKY GOOD TIMES AWAIT." (EXPERIENCIA)
   ════════════════════════════════════════════════════ */
.experience-section {
  padding: 4.5rem 0 3.5rem;
  background-color: var(--color-bg-purple);
  background: radial-gradient(
    ellipse at 50% 12%,
    rgba(110, 61, 121, 0.38) 0%,
    rgba(27, 16, 36, 0.98) 45%,
    #12091A 100%
  );
  border-top: var(--border-subtle);
  border-bottom: var(--border-subtle);
  position: relative;
}

.experience-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2.25rem;
}

@media (min-width: 768px) {
  .experience-header {
    grid-template-columns: 1fr 1fr;
    align-items: flex-end;
  }
}

.experience-desc {
  font-size: 1.35rem;
  color: var(--color-muted);
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 0.85rem;
}

.link-view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-orange);
  transition: gap 0.2s ease;
}

.link-view-all:hover {
  gap: 0.65rem;
}

/* ════════════════════════════════════════════════════
   TARJETAS DE NORMAS DEL INFRAMUNDO (GRAN FORMATO)
   Imágenes 3:4 completas y textos con máxima jerarquía
   ════════════════════════════════════════════════════ */

.rules-showcase-grid {
  display: flex;
  flex-direction: column;
  gap: 1.85rem;
  max-width: 960px;
  margin-inline: auto;
}

/* En mobile: espaciado natural entre tarjetas apiladas */
@media (max-width: 599px) {
  .rules-showcase-grid {
    gap: 1.85rem;
  }
}

.rule-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #130D1D 0%, #0B0713 100%);
  border: 1px solid rgba(255, 113, 54, 0.25);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65);
  transition: transform 0.22s ease-out,
              border-color 0.25s ease,
              box-shadow 0.25s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

@media (max-width: 599px) {
  .rule-card {
    scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 20px);
  }
}

@media (min-width: 600px) {
  .rule-card {
    display: grid;
    grid-template-columns: 240px 1fr;
  }
}

@media (min-width: 900px) {
  .rule-card {
    grid-template-columns: 280px 1fr;
  }
}

.rule-card:hover {
  border-color: rgba(255, 113, 54, 0.65);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.8), 0 0 28px rgba(255, 113, 54, 0.25);
}

/* Contenedor de imagen: En móvil solo aparece el 50% de la parte superior */
.rule-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2; /* 50% de la altura vertical original */
  overflow: hidden;
  background-color: #08060d;
}

.rule-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center; /* Enfocado exclusivamente en la mitad superior */
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 600px) {
  .rule-card__media {
    height: 100%;
    aspect-ratio: auto;
    min-height: 280px;
    border-right: 1px solid rgba(255, 113, 54, 0.15);
  }

  .rule-card__media img {
    object-position: center;
  }
}

.rule-card:hover .rule-card__media img {
  transform: scale(1.05);
}

/* Número de norma flotante en la imagen */
.rule-card__number {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(8, 7, 13, 0.85);
  backdrop-filter: blur(8px);
  color: var(--color-orange);
  font-family: var(--font-hero);
  font-size: 1.15rem;
  font-weight: 900;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 113, 54, 0.45);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.05em;
  z-index: 2;
}

/* Cuerpo de la tarjeta con textos prominentes y jerarquía visual */
.rule-card__body {
  padding: 2rem 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 599px) {
  .rule-card__body {
    padding: 1.5rem 1.35rem 1.6rem;
  }
}

.rule-card__badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.rule-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-orange);
  background: rgba(255, 113, 54, 0.14);
  border: 1px solid rgba(255, 113, 54, 0.35);
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
}

.rule-card__category {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rule-card__title {
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 2.6vw, 2.2rem);
  font-weight: 700;
  color: var(--color-cream);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 0.95rem;
}

.rule-card__desc {
  font-size: 1.25rem;
  color: #D6CAD6;
  line-height: 1.65;
  margin-bottom: 1.45rem;
  flex: 1;
}

.rule-card__desc strong {
  color: #FFA273;
  font-weight: 700;
}

/* Callout / consejo en píldora destacada */
.rule-card__callout {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: rgba(255, 113, 54, 0.1);
  border: 1px solid rgba(255, 113, 54, 0.3);
  border-radius: 8px;
  padding: 0.65rem 0.95rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #F8EDE0;
  line-height: 1.45;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

@media (min-width: 600px) {
  .rule-card__callout {
    font-size: 1.02rem;
    padding: 0.7rem 1.05rem;
    gap: 0.75rem;
    align-items: center;
  }
}

.rule-card__callout-icon {
  font-size: 1.15rem;
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 1px;
}

.rule-card__callout-text {
  flex: 1;
  min-width: 0;
  white-space: normal;
}

/* Pase oficial Halloween Night integrado en Ubicación */
.map-pass-preview {
  margin: 1.25rem 0 1.25rem;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--color-card-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 113, 54, 0.2);
  background-color: #0d0815;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease;
  will-change: transform;
}

.map-pass-preview:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 113, 54, 0.5);
}

.map-pass-preview img {
  width: 100%;
  height: auto;
  aspect-ratio: 1584 / 672;
  object-fit: contain;
  display: block;
}


/* ════════════════════════════════════════════════════
   SECCIÓN DE VÍDEO
   ════════════════════════════════════════════════════ */
.video-section {
  padding: 4rem 0;
  background-color: var(--color-bg);
}

.text-center-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  grid-template-columns: 1fr !important;
  margin-inline: auto !important;
}

.text-center-header .section-eyebrow,
.text-center-header .section-title,
.text-center-header .experience-desc {
  text-align: center !important;
}

.center-desc {
  margin-inline: auto !important;
  max-width: 680px;
}

.video-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.video-frame {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--color-card-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 113, 54, 0.15);
  background-color: #000;
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ════════════════════════════════════════════════════
   SECCIÓN DE MAPA Y UBICACIÓN
   ════════════════════════════════════════════════════ */
.map-section {
  padding: 4rem 0;
  background-color: var(--color-bg-elevated);
  border-top: var(--border-subtle);
}

.map-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .map-grid {
    grid-template-columns: 1fr 1.35fr;
  }
}

.map-address-text {
  font-size: 1.25rem;
  color: var(--color-muted);
  line-height: 1.65;
  margin: 1.5rem 0 1.75rem;
}

.map-address-text strong {
  color: var(--color-cream);
  font-size: 1.45rem;
}

.map-address-text small {
  font-size: 1.05rem;
}

.map-wrapper {
  border-radius: var(--radius-banner);
  overflow: hidden;
  border: 1px solid var(--color-card-border);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
}

.map-canvas {
  width: 100%;
  height: 380px;
  background-color: #0b0710;
}

/* Filtro oscuro para Leaflet */
.leaflet-tile {
  filter: brightness(0.55) saturate(1.3) hue-rotate(200deg) !important;
}

.leaflet-container {
  background: #08070D !important;
  font-family: var(--font-sans) !important;
}

.leaflet-popup-content-wrapper {
  background: var(--color-bg-elevated) !important;
  color: var(--color-cream) !important;
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-card);
}

.leaflet-popup-tip {
  background: var(--color-bg-elevated) !important;
}

/* ════════════════════════════════════════════════════
   SCROLL MOTION, PARALLAX & REVEAL SYSTEM (LENIS INTEGRATION)
   Efectos dinámicos en escritorio y móvil
   ════════════════════════════════════════════════════ */

/* Revelado suave al hacer scroll */
.reveal-up {
  opacity: 0;
  transform: translateY(42px) scale(0.97);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-up.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Escalonamiento temporal (Stagger) */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.22s; }
.stagger-3 { transition-delay: 0.34s; }

/* Parallax en el contenedor del artwork del hero */
.hero-artwork {
  perspective: 1000px;
}

.hero-artwork__img {
  will-change: transform, filter;
}

.hero-copy {
  will-change: transform, opacity;
}

/* Efecto de inclinación 3D e interacción en las tarjetas de normas */
.rule-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  will-change: transform, box-shadow, border-color;
}

.rule-card__media {
  overflow: hidden;
}

.rule-card__media img {
  will-change: transform;
}

/* Efecto de respiración luminosa para el botón primario */
@keyframes pulse-subtle-glow {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(255, 113, 54, 0.35);
  }
  50% {
    box-shadow: 0 6px 30px rgba(255, 113, 54, 0.65), 0 0 20px rgba(255, 146, 89, 0.4);
  }
}

.btn-primary {
  animation: pulse-subtle-glow 3.8s ease-in-out infinite;
}

/* Mejoras táctiles y de inercia para móvil */
@media (max-width: 768px) {
  .reveal-up {
    transform: translateY(30px) scale(0.98);
    transition-duration: 0.7s;
  }
  
  .rule-card:hover {
    transform: none;
  }
}

/* CSS Scroll-Driven Animations nativas (Mejora progresiva en navegadores modernos) */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  .hero-artwork__img {
    view-timeline: --hero-scroll-timeline;
    animation: native-hero-parallax linear both;
    animation-timeline: --hero-scroll-timeline;
    animation-range: exit 0% exit 100%;
  }

  @keyframes native-hero-parallax {
    from {
      transform: translateY(0);
    }
    to {
      transform: translateY(110px);
    }
  }
}

/* Respeto estricto a las preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .btn-primary,
  .hero-artwork__img {
    animation: none !important;
    transform: none !important;
  }
}

/* ════════════════════════════════════════════════════
   BOTÓN FLOTANTE DE AUDIO AMBIENTAL
   ════════════════════════════════════════════════════ */
.audio-control-dock {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 1000;
  pointer-events: auto;
}

.audio-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.15rem;
  background: rgba(14, 9, 21, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 113, 54, 0.45);
  border-radius: var(--radius-pill);
  color: var(--color-cream);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.75), 0 0 15px rgba(255, 113, 54, 0.2);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
}

.audio-toggle-btn:hover {
  background: rgba(26, 16, 38, 0.95);
  border-color: rgba(255, 113, 54, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85), 0 0 22px rgba(255, 113, 54, 0.4);
}

.audio-toggle-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(255, 113, 54, 0.22) 0%, rgba(138, 43, 226, 0.22) 100%), rgba(14, 9, 21, 0.92);
  border-color: var(--color-orange);
  color: #FFF0E6;
  box-shadow: 0 0 25px rgba(255, 113, 54, 0.45), 0 8px 25px rgba(0, 0, 0, 0.8);
}

.audio-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-orange);
}

.audio-toggle-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 599px) {
  .audio-control-dock {
    bottom: 18px;
    right: 18px;
  }
  .audio-toggle-btn {
    padding: 0.6rem 0.95rem;
    font-size: 0.85rem;
  }
}

/* ════════════════════════════════════════════════════
   SECCIÓN DE JUEGOS DE ESPERA (ARCADE DE ULTRATUMBA)
   ════════════════════════════════════════════════════ */
.games-section {
  padding: 5rem 0 4rem;
  background: radial-gradient(ellipse at 50% 20%, rgba(55, 25, 75, 0.35) 0%, rgba(8, 7, 13, 0.98) 75%);
  border-top: var(--border-subtle);
  border-bottom: var(--border-subtle);
  position: relative;
}

.games-hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.85rem;
  margin-top: 2.5rem;
}

@media (min-width: 820px) {
  .games-hub-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.game-hub-card {
  position: relative;
  background: linear-gradient(145deg, #150E20 0%, #0B0713 100%);
  border: 1.5px solid rgba(255, 113, 54, 0.28);
  border-radius: 14px;
  padding: 2.2rem 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.28s ease,
              box-shadow 0.28s ease;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 599px) {
  .game-hub-card {
    padding: 1.85rem 1.35rem 1.65rem;
  }
  .game-hub-badge {
    position: static !important;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 0.85rem;
  }
}

.game-hub-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 113, 54, 0.75);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 113, 54, 0.25);
}

.game-hub-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 113, 54, 0.15);
  border: 1px solid rgba(255, 113, 54, 0.45);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #FFA273;
}

.game-hub-icon {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 4px 15px rgba(255, 113, 54, 0.3));
}

.game-hub-title {
  font-family: var(--font-hero);
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--color-cream);
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
}

.game-hub-desc {
  font-size: 1.05rem;
  color: #D6CAD6;
  line-height: 1.6;
  margin-bottom: 1.85rem;
  flex: 1;
}

.game-launch-btn {
  width: 100%;
  justify-content: center;
  font-size: 1.05rem;
  padding: 0.75rem 1.25rem;
}

/* ════════════════════════════════════════════════════
   MODAL / EXPERIENCIA DE JUEGO A PANTALLA COMPLETA
   ════════════════════════════════════════════════════ */
.game-fullscreen-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 10000;
  background: radial-gradient(ellipse at 50% 10%, #170E22 0%, #09060E 80%);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow: hidden;
}

.game-fullscreen-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.game-modal-header {
  height: 68px;
  padding: 0 1.5rem;
  background: rgba(14, 9, 21, 0.95);
  border-bottom: 1px solid rgba(255, 113, 54, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.game-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.game-modal-icon {
  font-size: 1.85rem;
  line-height: 1;
}

.game-modal-title {
  font-family: var(--font-hero);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--color-cream);
  letter-spacing: 0.04em;
}

.game-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.game-btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.game-btn-icon:hover {
  background: rgba(255, 113, 54, 0.2);
  border-color: var(--color-orange);
  color: var(--color-orange);
}

.game-btn-close:hover {
  background: rgba(255, 75, 75, 0.25);
  border-color: #FF5555;
  color: #FF7777;
}

.game-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem 1.5rem;
  overflow-y: auto;
  box-sizing: border-box;
}

/* ── HUD superior de los juegos (Nivel + Temporizador / Contador) ── */
.game-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 580px;
  padding: 0.65rem 1.25rem;
  background: rgba(18, 12, 26, 0.85);
  border: 1px solid rgba(255, 113, 54, 0.3);
  border-radius: 10px;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.game-hud-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-hud-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
}

.game-hud-val {
  font-family: var(--font-hero);
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--color-cream);
}

.game-hud-val.is-warning {
  color: #FF5555;
  animation: timer-blink 0.6s infinite alternate;
}

@keyframes timer-blink {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(1.1); opacity: 0.7; }
}

/* ════════════════════════════════════════════════════
   JUEGO 1: EL FANTASMA INFILTRADO (GHOST MATRIX)
   ════════════════════════════════════════════════════ */
.ghost-game-wrap {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ghost-grid {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: rgba(13, 8, 19, 0.8);
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 113, 54, 0.3);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.75);
}

.ghost-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.6rem, 5.5vw, 2.5rem);
  background: rgba(25, 16, 36, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.ghost-cell:hover {
  transform: scale(1.08);
  background: rgba(255, 113, 54, 0.18);
}

/* Fantasmas estándar */
.ghost-cell .ghost-icon {
  display: inline-block;
  line-height: 1;
  transition: filter 0.2s ease;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.2));
}

/* El fantasma infiltrado con aura y matiz CSS diferente */
.ghost-cell.is-infiltrator .ghost-icon {
  filter: hue-rotate(var(--infiltrator-hue, 120deg)) saturate(2.4) brightness(1.2) drop-shadow(0 0 12px rgba(255, 113, 54, 0.8)) !important;
}

/* ════════════════════════════════════════════════════
   JUEGO 2: WORDLE DEL TERROR (HALLOWEEN GUESS)
   ════════════════════════════════════════════════════ */
.wordle-game-wrap {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.wordle-board {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 0.5rem;
}

.wordle-row {
  display: flex;
  gap: 7px;
  justify-content: center;
}

.wordle-tile {
  width: clamp(40px, 9vw, 54px);
  height: clamp(40px, 9vw, 54px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-hero);
  font-size: clamp(1.2rem, 3.8vw, 1.7rem);
  font-weight: 900;
  color: var(--color-cream);
  text-transform: uppercase;
  background: rgba(14, 9, 21, 0.7);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

.wordle-tile.has-letter {
  border-color: rgba(255, 113, 54, 0.6);
  transform: scale(1.04);
}

.wordle-tile.correct {
  background: #2E7D32 !important;
  border-color: #4CAF50 !important;
  color: #FFF !important;
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.4);
}

.wordle-tile.present {
  background: #B78103 !important;
  border-color: #FFB300 !important;
  color: #FFF !important;
  box-shadow: 0 0 12px rgba(255, 179, 0, 0.4);
}

.wordle-tile.absent {
  background: #2A2433 !important;
  border-color: #3D3547 !important;
  color: #7A6F82 !important;
}

/* Teclado en pantalla */
.wordle-keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 500px;
}

.wordle-kb-row {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.kb-key {
  min-width: clamp(26px, 6.8vw, 42px);
  height: 46px;
  padding: 0 6px;
  background: rgba(35, 24, 48, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--color-cream);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s, transform 0.1s;
}

.kb-key:active {
  transform: scale(0.94);
}

.kb-key.key-wide {
  min-width: 54px;
  font-size: 0.8rem;
  background: rgba(255, 113, 54, 0.25);
  border-color: rgba(255, 113, 54, 0.5);
}

.kb-key.correct {
  background: #2E7D32 !important;
  border-color: #4CAF50 !important;
}

.kb-key.present {
  background: #B78103 !important;
  border-color: #FFB300 !important;
}

.kb-key.absent {
  background: #1B1522 !important;
  color: #5D5266 !important;
  border-color: #261D30 !important;
}

/* ════════════════════════════════════════════════════
   JUEGO 3: BRUJADOKU (50 NIVELES ESTILO MEOWDOKU)
   ════════════════════════════════════════════════════ */
.brujadoku-wrap {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brujadoku-legend {
  font-size: 0.88rem;
  color: #D6CAD6;
  text-align: center;
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.brujadoku-board {
  display: grid;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  background: #0D0817;
  padding: 8px;
  border-radius: 12px;
  border: 2px solid rgba(255, 113, 54, 0.45);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  box-sizing: border-box;
  grid-auto-rows: 1fr;
}

.b-cell {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.15s ease, filter 0.15s ease;
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  box-sizing: border-box;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.b-cell:hover {
  filter: brightness(1.2);
}

/* Regiones de color para Brujadoku */
.b-reg-0 { background-color: rgba(142, 68, 173, 0.38); }
.b-reg-1 { background-color: rgba(211, 84, 0, 0.38); }
.b-reg-2 { background-color: rgba(41, 128, 185, 0.38); }
.b-reg-3 { background-color: rgba(39, 174, 96, 0.38); }
.b-reg-4 { background-color: rgba(192, 57, 43, 0.38); }
.b-reg-5 { background-color: rgba(22, 160, 133, 0.38); }

.b-cell .b-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  color: rgba(255, 255, 255, 0.35);
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.b-cell .b-witch {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.4rem, 5vw, 2.1rem);
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(255, 113, 54, 0.8));
  animation: witch-pop 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  pointer-events: none;
}

@keyframes witch-pop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Botones de acción del juego */
.game-controls-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.game-btn-sub {
  padding: 0.65rem 1.25rem;
  background: rgba(30, 20, 42, 0.9);
  border: 1px solid rgba(255, 113, 54, 0.35);
  border-radius: var(--radius-pill);
  color: var(--color-cream);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.game-btn-sub:hover {
  background: rgba(255, 113, 54, 0.2);
  border-color: var(--color-orange);
  color: var(--color-orange);
}

/* Pantalla de Fin de Juego / Victoria */
.game-feedback-card {
  text-align: center;
  padding: 2.5rem 1.8rem;
  background: rgba(18, 11, 26, 0.95);
  border: 1.5px solid var(--color-orange);
  border-radius: 16px;
  max-width: 440px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
  animation: feedback-appear 0.3s ease;
}

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

.feedback-emoji {
  font-size: 3.5rem;
  margin-bottom: 0.85rem;
  display: block;
}

.feedback-title {
  font-family: var(--font-hero);
  font-size: 1.85rem;
  color: var(--color-cream);
  margin-bottom: 0.65rem;
}

.feedback-desc {
  font-size: 1.15rem;
  color: #D6CAD6;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════
   BLOQUEO DE ORIENTACIÓN HORIZONTAL (MOBILE LANDSCAPE)
   ════════════════════════════════════════════════════ */
.orientation-blocker {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  z-index: 999999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
  text-align: center;
}

/* Solo se activa en dispositivos móviles / pantallas pequeñas en apaisado */
@media screen and (orientation: landscape) and (max-height: 520px) {
  .orientation-blocker {
    display: flex !important;
  }
}

.orientation-blocker__content {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.orientation-phone-icon {
  font-size: 3.5rem;
  line-height: 1;
  animation: rotate-phone-hint 2s ease-in-out infinite;
  display: inline-block;
}

@keyframes rotate-phone-hint {
  0%, 20% {
    transform: rotate(90deg);
  }
  50%, 80% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(90deg);
  }
}

.orientation-title {
  font-family: var(--font-hero);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--color-orange);
  letter-spacing: 0.04em;
  margin: 0;
}

.orientation-desc {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: #E2D7E5;
  line-height: 1.5;
  margin: 0;
}

/* ════════════════════════════════════════════════════
   POPUP / BANNER DE INSTALACIÓN PWA
   ════════════════════════════════════════════════════ */
.pwa-install-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: calc(100% - 32px);
  max-width: 480px;
  z-index: 9998;
  background: rgba(22, 14, 32, 0.96);
  border: 1.5px solid var(--color-orange);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(255, 113, 54, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.9rem 1.15rem;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.pwa-install-banner.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.pwa-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.pwa-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 113, 54, 0.4);
}

.pwa-banner-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

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

.pwa-banner-title {
  display: block;
  font-family: var(--font-hero);
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--color-cream);
  line-height: 1.2;
  margin-bottom: 0.2rem;
}

.pwa-banner-desc {
  font-size: 0.82rem;
  color: #C8BACB;
  line-height: 1.35;
  margin: 0;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pwa-btn-install {
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.pwa-btn-dismiss {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pwa-btn-dismiss:hover {
  background: rgba(255, 75, 75, 0.3);
  color: #FF7777;
  border-color: #FF5555;
}

@media (max-width: 460px) {
  .pwa-banner-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .pwa-banner-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 0.25rem;
  }
}



