/**
 * Arquitectura de Estilos Base (100% Gobernada por Variables del Tema Activo)
 * Todos los colores, fuentes, logos y fondos provienen de /public/themes/<tema>/theme.css
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--brand-bg-deep, #08060c);
  color: var(--brand-text, #ffffff);
  font-family: var(--brand-font-sans, 'Plus Jakarta Sans', system-ui, sans-serif);
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Fondo desacoplado controlado por el CSS del tema */
.app-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.06), transparent 60%),
    var(--brand-bg-image, none),
    linear-gradient(160deg, var(--brand-bg-deep, #08060c) 0%, var(--brand-bg-secondary, #151021) 100%);
  background-size: cover, 420px 420px, cover;
  background-position: center;
  pointer-events: none;
}

/* Lienzo GPU / Partículas en segundo plano */
#stage-canvas-container {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.stage-webgl-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Contenedor Principal de la App */
.app-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Barra Superior de Marca y Navegación de Estado */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(6, 5, 12, 0.68);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--brand-border, rgba(255, 215, 0, 0.25));
  gap: 16px;
  flex-wrap: wrap;
}

.topbar.hidden {
  display: none !important;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* El logo se carga desde la variable CSS --brand-logo-url del tema activo */
.brand-logo-box {
  width: 165px;
  height: 46px;
  background-image: var(--brand-logo-url);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
}

.brand-event-titles {
  border-left: 1px solid var(--brand-border);
  padding-left: 14px;
}

.brand-event-titles h1 {
  font-family: var(--brand-font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
  text-transform: uppercase;
}

.brand-event-titles p {
  font-size: 0.76rem;
  color: var(--brand-text-muted);
  letter-spacing: 0.04em;
}

/* Indicador de las 4 Pantallas (Stepper) */
.screen-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--brand-border);
}

.step-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-text-muted);
  transition: all 0.25s ease;
}

.step-pill .step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
}

.step-pill.active {
  background: var(--brand-primary);
  color: var(--brand-text-on-primary, #111);
  box-shadow: 0 0 18px var(--brand-border-glow);
}

.step-pill.active .step-num {
  background: rgba(0, 0, 0, 0.22);
  color: var(--brand-text-on-primary, #111);
}

.topbar-Controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-surface);
  color: var(--brand-text);
  border: 1px solid var(--brand-border);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

/* Sistema de Vistas (4 Pantallas) */
.screens-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 24px 28px 36px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Modo Escenario a Pantalla Completa sin Scroll (Pantallas 2, 3 y 4) */
body.stage-locked-100vh {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body.stage-locked-100vh .app-shell {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body.stage-locked-100vh .screens-viewport {
  height: 100dvh;
  max-height: 100dvh;
  padding: 14px 26px;
  overflow: hidden;
}

.screen-view {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  animation: screenFadeIn 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen-view.active {
  display: flex;
}

body.stage-locked-100vh .screen-view.active {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

@keyframes screenFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   PANTALLA 1: CARGA DE DATOS Y CONFIGURACIÓN
   ========================================================================== */
.setup-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.85fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 1120px) {
  .setup-grid {
    grid-template-columns: 1fr;
  }
}

.glass-card {
  background: var(--brand-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--brand-border);
  border-radius: var(--brand-radius-lg, 20px);
  padding: 24px;
  box-shadow: var(--brand-shadow-glow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--brand-font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-primary);
  letter-spacing: 0.04em;
}

.badge-counter {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--brand-primary);
  color: var(--brand-primary-light);
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Tabs de Fuente de Datos */
.source-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.32);
  padding: 5px;
  border-radius: var(--brand-radius-md);
  margin-bottom: 16px;
}

.source-tab-btn {
  background: transparent;
  border: none;
  color: var(--brand-text-muted);
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.source-tab-btn.active {
  background: var(--brand-primary);
  color: var(--brand-text-on-primary, #111);
}

.source-panel {
  display: none;
  margin-bottom: 16px;
}

.source-panel.active {
  display: block;
}

/* Zona Drag & Drop de archivo .txt / .csv */
.dropzone {
  border: 2px dashed var(--brand-border);
  border-radius: var(--brand-radius-md);
  padding: 24px 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.22s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.06);
}

.dropzone-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}

.dropzone-title {
  font-weight: 700;
  font-size: 0.94rem;
  margin-bottom: 4px;
}

.dropzone-sub {
  font-size: 0.78rem;
  color: var(--brand-text-muted);
}

.sample-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* Área de texto de participantes y buscador/agregado rápido */
.quick-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.input-field {
  width: 100%;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid var(--brand-border);
  color: var(--brand-text);
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.input-field:focus {
  border-color: var(--brand-primary);
}

textarea.input-field {
  min-height: 170px;
  resize: vertical;
  line-height: 1.5;
  font-family: var(--brand-font-mono);
  font-size: 0.84rem;
}

/* Controles de Posiciones y Modos de Sorteo */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--brand-primary-light);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.positions-Quick-Row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.positions-number-input {
  width: 90px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-primary);
}

.preset-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--brand-border);
  color: var(--brand-text);
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.preset-btn:hover, .preset-btn.active {
  background: var(--brand-primary);
  color: var(--brand-text-on-primary);
  border-color: var(--brand-primary);
}

/* Tarjetas de Selección de Modo (Suspenso vs Directo / Múltiples premios) */
.option-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.option-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.option-card:hover {
  border-color: var(--brand-border);
}

.option-card.selected {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--brand-primary);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.16);
}

.option-card-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--brand-text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.option-card.selected .option-card-title {
  color: var(--brand-primary);
}

.option-card-desc {
  font-size: 0.75rem;
  color: var(--brand-text-muted);
  line-height: 1.35;
}

/* Etiquetas personalizadas por puesto */
.custom-prizes-list {
  max-height: 165px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-right: 4px;
}

.prize-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prize-pos-tag {
  min-width: 78px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.05);
  padding: 7px 9px;
  border-radius: 8px;
  text-align: center;
}

/* Selector de Temas de Marca */
.theme-selector-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 16px;
}

.theme-card-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.36);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--brand-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-card-btn.active {
  border-color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.08);
}

.theme-swatches {
  display: flex;
  gap: 5px;
}

.swatch-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Botones de Acción Principales */
.btn-primary-cta {
  width: 100%;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark, #b8860b) 100%);
  color: var(--brand-text-on-primary, #111);
  border: none;
  padding: 16px 26px;
  border-radius: 14px;
  font-family: var(--brand-font-display);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 25px var(--brand-border-glow);
  transition: all 0.22s ease;
}

.btn-primary-cta:hover {
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.08);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--brand-text);
  border: 1px solid var(--brand-border);
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--brand-primary);
}

.status-banner {
  margin-top: 10px;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  display: none;
}

.status-banner.error {
  display: block;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid #ef4444;
  color: #fecaca;
}

.status-banner.success {
  display: block;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid #10b981;
  color: #a7f3d0;
}

/* ==========================================================================
   PANTALLA 2: SALA PRINCIPAL DE ESPERA (WAITING LOBBY)
   ========================================================================== */
.waiting-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
}

.waiting-card {
  max-width: 780px;
  width: 100%;
  background: rgba(10, 8, 18, 0.72);
  backdrop-filter: blur(18px);
  border: 1.5px solid var(--brand-border);
  border-radius: 28px;
  padding: 46px 40px;
  box-shadow: var(--brand-shadow-glow);
}

.waiting-logo-hero {
  width: 260px;
  height: 78px;
  margin: 0 auto 20px;
  background-image: var(--brand-logo-url);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.waiting-eyebrow {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--brand-primary);
  color: var(--brand-primary-light);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.waiting-title {
  font-family: var(--brand-font-display);
  font-size: clamp(2.1rem, 4.5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, var(--brand-primary-light) 50%, var(--brand-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.waiting-subtitle {
  font-size: 1.1rem;
  color: var(--brand-text-muted);
  margin-bottom: 30px;
}

.waiting-stats-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.waiting-stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--brand-border);
  border-radius: 16px;
  padding: 14px 22px;
  min-width: 155px;
}

.waiting-stat-val {
  display: block;
  font-family: var(--brand-font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--brand-primary);
}

.waiting-stat-lbl {
  font-size: 0.76rem;
  color: var(--brand-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.waiting-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.btn-mega-launch {
  max-width: 440px;
  font-size: 1.2rem;
  padding: 20px 36px;
  border-radius: 999px;
  animation: pulseGlow 2.2s infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 25px var(--brand-border-glow), 0 10px 30px rgba(0, 0, 0, 0.6);
  }
  50% {
    box-shadow: 0 0 48px var(--brand-primary), 0 12px 36px rgba(0, 0, 0, 0.75);
  }
}

/* ==========================================================================
   PANTALLA 3: ESCENARIO DEL SORTEO — SLOT MACHINE 3D (100dvh SIN SCROLL)
   ========================================================================== */
.draw-stage-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 20px;
  align-items: center;
  flex: 1;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 1080px) {
  .draw-stage-layout {
    grid-template-columns: 1fr;
  }
}

.slot-stage-column {
  position: relative;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Gabinete de la Máquina Slot Machine */
.slot-machine-cabinet {
  width: 100%;
  max-width: 860px;
  background: linear-gradient(180deg, #241d38 0%, #120e1e 55%, #090710 100%);
  border: 3px solid var(--brand-primary);
  border-radius: 26px;
  padding: 16px 22px 18px;
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.85),
    0 0 45px var(--brand-border-glow),
    inset 0 2px 12px rgba(255, 255, 255, 0.18);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slot-machine-cabinet.is-winner {
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.9),
    0 0 85px var(--brand-primary),
    inset 0 0 30px var(--brand-border-glow);
}

/* Marquesina Superior con Bombillas LED */
.slot-marquee {
  position: relative;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.75), rgba(25, 18, 45, 0.9));
  border: 2px solid var(--brand-primary);
  border-radius: 16px;
  padding: 12px 18px;
  margin-bottom: 14px;
  text-align: center;
  overflow: hidden;
}

.slot-marquee-bulbs {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.marquee-bulb {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 10px var(--brand-primary);
  animation: bulbChase 1.2s infinite alternate;
}

.slot-machine-cabinet.is-spinning .marquee-bulb {
  animation-duration: 0.22s;
}

.slot-machine-cabinet.is-winner .marquee-bulb {
  background: #ffffff;
  box-shadow: 0 0 18px var(--brand-primary), 0 0 28px var(--brand-secondary);
  animation-duration: 0.15s;
}

@keyframes bulbChase {
  0% {
    opacity: 0.28;
    transform: scale(0.85);
  }
  100% {
    opacity: 1;
    transform: scale(1.18);
  }
}

.slot-marquee-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--brand-secondary);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.slot-marquee-title {
  font-family: var(--brand-font-display);
  font-size: clamp(1.25rem, 2.3vw, 1.85rem);
  font-weight: 900;
  color: var(--brand-primary-light);
  text-shadow: 0 0 18px var(--brand-primary);
  letter-spacing: 0.05em;
}

/* Fila Central: Ventana de Rodillos + Palanca Lateral */
.slot-body-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.slot-frame-outer {
  flex: 1;
  min-width: 0;
  position: relative;
  background: #050409;
  border: 4px solid var(--brand-primary);
  border-radius: 18px;
  padding: 6px;
  box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.95);
}

.slot-window {
  width: 100%;
  height: clamp(220px, 42dvh, 320px);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #090712;
}

#slot-reels-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.slot-payline-pointer {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 28px;
  height: 38px;
  background: var(--brand-primary);
  color: var(--brand-text-on-primary, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 0 16px var(--brand-primary);
}

.slot-payline-pointer.left {
  left: -10px;
  border-radius: 6px 10px 10px 6px;
}

.slot-payline-pointer.right {
  right: -10px;
  border-radius: 10px 6px 6px 10px;
}

/* Palanca Mecánica 3D */
.slot-lever-assembly {
  width: 58px;
  height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  user-select: none;
}

.slot-lever-base {
  width: 26px;
  height: 70px;
  background: linear-gradient(90deg, #444, #999, #333);
  border: 2px solid var(--brand-primary);
  border-radius: 0 12px 12px 0;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.slot-lever-shaft {
  width: 12px;
  height: 120px;
  background: linear-gradient(90deg, #d4d4d8, #ffffff, #71717a);
  border-radius: 999px;
  transform-origin: bottom center;
  position: relative;
  top: -32px;
  left: 8px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slot-lever-knob {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #ff85a1, var(--brand-secondary, #ff2a6d) 60%, #7a0026 100%);
  border: 2px solid #ffffff;
  box-shadow: 0 0 22px var(--brand-secondary);
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
}

.slot-lever-assembly.pulled .slot-lever-shaft {
  transform: rotateX(145deg) scaleY(0.75);
}

.slot-lever-hint {
  position: absolute;
  bottom: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--brand-primary-light);
}

@media (max-width: 680px) {
  .slot-lever-assembly {
    display: none;
  }
}

.slot-console-bar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-status-led {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--brand-border);
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--brand-font-mono);
  font-size: 0.78rem;
  color: var(--brand-primary-light);
}

.led-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-accent, #00f5d4);
  box-shadow: 0 0 10px var(--brand-accent, #00f5d4);
}

/* Barra de Controles del Sorteo debajo del visualizador */
.draw-controls-bar {
  margin-top: 14px;
  min-height: 54px;
  width: 100%;
  max-width: 860px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Overlay Flotante del Ganador del Puesto sobre la parte inferior/central de la máquina */
.winner-reveal-banner {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translate3d(-50%, 0, 300px);
  z-index: 200;
  pointer-events: auto;
  width: calc(100% - 24px);
  max-width: 840px;
  background: linear-gradient(135deg, rgba(14, 10, 26, 0.96), rgba(32, 14, 42, 0.96));
  backdrop-filter: blur(20px);
  border: 2.5px solid var(--brand-primary);
  border-radius: 20px;
  padding: 16px 24px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow:
    0 20px 55px rgba(0, 0, 0, 0.85),
    0 0 42px var(--brand-border-glow);
  animation: winnerOverlayPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.winner-reveal-banner.visible {
  display: flex;
}

@keyframes winnerOverlayPop {
  from {
    opacity: 0;
    transform: translate3d(-50%, 18px, 300px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate3d(-50%, 0, 300px) scale(1);
  }
}

.winner-reveal-info .winner-pos-pill {
  display: inline-block;
  background: var(--brand-primary);
  color: var(--brand-text-on-primary);
  font-weight: 900;
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.winner-reveal-info h3 {
  font-family: var(--brand-font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  font-weight: 900;
  color: #ffffff;
}

.winner-reveal-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Panel Lateral en Vivo de Posiciones en Pantalla 3 */
.live-positions-sidebar {
  height: 100%;
  max-height: calc(100dvh - 36px);
  display: flex;
  flex-direction: column;
}

.live-positions-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-right: 4px;
}

.live-pos-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.25s ease;
}

.live-pos-item.current {
  border-color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 16px var(--brand-border-glow);
}

.live-pos-item.completed {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.1);
}

.live-pos-rank {
  font-family: var(--brand-font-display);
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--brand-primary);
}

.live-pos-winner {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--brand-text);
}

/* ==========================================================================
   PANTALLA 4: PODIO DE HONOR + TICKER INFINITO (100dvh SIN SCROLL)
   ========================================================================== */
.screen-view[data-screen="4"] {
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 6px 0;
}

.podium-screen-header {
  text-align: center;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.podium-screen-header .waiting-eyebrow {
  margin-bottom: 8px;
  padding: 4px 14px;
  font-size: 0.74rem;
}

.podium-screen-header h2 {
  font-family: var(--brand-font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.35rem);
  font-weight: 900;
  color: var(--brand-primary-light);
  text-shadow: 0 0 24px var(--brand-primary);
  margin-bottom: 0;
}

/* Podio Top 3 */
.podium-top3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: end;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  flex-shrink: 1;
}

@media (max-width: 860px) {
  .podium-top3-grid {
    grid-template-columns: 1fr;
  }
}

.podium-pillar {
  background: var(--brand-surface-elevated);
  border: 2px solid var(--brand-border);
  border-radius: 20px;
  padding: clamp(14px, 2.2dvh, 24px) 18px;
  text-align: center;
  position: relative;
  box-shadow: var(--brand-shadow-glow);
  transition: transform 0.3s ease;
}

.podium-pillar:hover {
  transform: translateY(-4px);
}

.podium-pillar.rank-1 {
  border-color: var(--brand-primary);
  padding: clamp(20px, 3.2dvh, 34px) 22px;
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.18) 0%, var(--brand-surface-elevated) 100%);
  box-shadow: 0 0 50px var(--brand-border-glow);
}

.podium-medal {
  font-size: clamp(1.9rem, 3.5dvh, 2.5rem);
  margin-bottom: 6px;
  display: block;
}

.podium-rank-label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--brand-primary-light);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.podium-winner-name {
  font-family: var(--brand-font-display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 4px;
  word-break: break-word;
}

.podium-pillar.rank-1 .podium-winner-name {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  color: var(--brand-primary-light);
}

.podium-prize-sub {
  font-size: 0.8rem;
  color: var(--brand-text-muted);
}

/* Ticker Infinito Horizontal (Movimiento de Derecha a Izquierda) */
.positions-ticker-card {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 0 14px;
  overflow: hidden;
  flex-shrink: 0;
}

.ticker-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 10px;
}

.ticker-badge-label {
  font-family: var(--brand-font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brand-primary);
  letter-spacing: 0.06em;
}

.ticker-hint-label {
  font-size: 0.72rem;
  color: var(--brand-text-muted);
}

.positions-ticker-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.positions-ticker-track {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  /* Movimiento continuo en sentido inverso: de DERECHA A IZQUIERDA (0% -> -50%) */
  animation: tickerRightToLeft var(--ticker-duration, 28s) linear infinite;
}

.positions-ticker-viewport:hover .positions-ticker-track {
  animation-play-state: paused;
}

@keyframes tickerRightToLeft {
  0% {
    transform: translate3d(0%, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.leaderboard-row-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid var(--brand-border);
  padding: 10px 16px;
  border-radius: 14px;
  min-width: 250px;
  flex-shrink: 0;
}

.leaderboard-pos-badge {
  min-width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--brand-font-display);
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--brand-primary);
}

.leaderboard-winner-details h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
}

.leaderboard-winner-details p {
  font-size: 0.74rem;
  color: var(--brand-text-muted);
  white-space: nowrap;
}

.multi-win-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--brand-secondary);
  color: #ffffff;
}

.podium-footer-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Selectores Rápidos en la Barra Superior (Estética + Tema CSS) */
.topbar-select {
  background: var(--brand-surface);
  color: var(--brand-text);
  border: 1px solid var(--brand-border);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

.topbar-select:hover, .topbar-select:focus {
  border-color: var(--brand-primary);
}

.topbar-select option {
  background: #120e1e;
  color: #ffffff;
}

/* ==========================================================================
   ESTÉTICA 2: CARTELERA DE AEROPUERTO (SPLIT-FLAP SOLARI BOARD)
   ========================================================================== */
.splitflap-cabinet {
  width: 100%;
  max-width: 880px;
  background: linear-gradient(180deg, #1b1d24 0%, #101218 100%);
  border: 3px solid var(--brand-primary);
  border-radius: 24px;
  padding: 22px 24px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 38px var(--brand-border-glow);
}

.splitflap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.splitflap-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--brand-font-mono);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--brand-primary);
}

.splitflap-flight-status {
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid var(--brand-primary);
  color: var(--brand-primary-light);
  padding: 5px 12px;
  border-radius: 6px;
  font-family: var(--brand-font-mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.splitflap-meta-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.sf-meta-box {
  background: #090a0f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
}

.sf-meta-label {
  display: block;
  font-size: 0.66rem;
  color: var(--brand-text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.sf-meta-value {
  font-family: var(--brand-font-mono);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-primary-light);
}

.status-blink {
  animation: sfBlink 0.7s infinite alternate;
}

@keyframes sfBlink {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.splitflap-board-frame {
  background: #06070a;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 20px 16px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.95);
}

.splitflap-row-label {
  font-family: var(--brand-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--brand-text-muted);
  margin-bottom: 10px;
}

.splitflap-grid, .splitflap-Grid-Sub {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 4px;
}

.splitflap-Grid-Sub {
  margin-top: 10px;
}

.flap-cell {
  position: relative;
  height: 54px;
  background: linear-gradient(180deg, #252830 0%, #15171d 49%, #0c0d11 51%, #1b1e26 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
}

.flap-cell.sub-cell {
  height: 38px;
}

.flap-char {
  font-family: var(--brand-font-mono);
  font-size: clamp(0.95rem, 1.8vw, 1.5rem);
  font-weight: 800;
  color: #f8fafc;
  z-index: 2;
}

.flap-cell.sub-cell .flap-char {
  font-size: clamp(0.75rem, 1.3vw, 1rem);
  color: var(--brand-primary);
}

.flap-cell.flipping .flap-char {
  color: var(--brand-primary-light);
  transform: scaleY(0.88);
}

.flap-cell.locked {
  border-color: var(--brand-primary);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.25);
}

.flap-hinge {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1.5px;
  background: rgba(0, 0, 0, 0.85);
  z-index: 3;
}

/* ==========================================================================
   ESTÉTICA 3: RUEDA DE LA FORTUNA (MEGA WHEEL)
   ========================================================================== */
.wheel-cabinet {
  width: 100%;
  max-width: 860px;
  background: linear-gradient(180deg, #1d1630 0%, #0d0a18 100%);
  border: 3px solid var(--brand-primary);
  border-radius: 26px;
  padding: 18px 22px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 40px var(--brand-border-glow);
}

.wheel-stage-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
}

/* ==========================================================================
   ESTÉTICA 4: CYBER-GRID (MATRIZ LUMINOSA DE PARTICIPANTES)
   ========================================================================== */
.cybergrid-cabinet {
  width: 100%;
  max-width: 860px;
  background: linear-gradient(180deg, #141126 0%, #090712 100%);
  border: 3px solid var(--brand-primary);
  border-radius: 26px;
  padding: 18px 22px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 40px var(--brand-border-glow);
}

.cybergrid-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  max-height: 330px;
  overflow-y: auto;
  padding: 6px;
}

.cg-cell {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.12s ease;
}

.cg-cell-num {
  font-family: var(--brand-font-mono);
  font-size: 0.68rem;
  color: var(--brand-text-muted);
}

.cg-cell-name {
  font-weight: 800;
  font-size: 0.88rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cg-cell.active-scan {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--brand-primary);
  box-shadow: 0 0 22px var(--brand-primary);
  transform: scale(1.04);
}

.cg-cell.winner-cell {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border-color: #ffffff;
  box-shadow: 0 0 35px var(--brand-primary);
  transform: scale(1.06);
}

.cg-cell.winner-cell .cg-cell-name,
.cg-cell.winner-cell .cg-cell-num {
  color: #09060e;
  font-weight: 900;
}

/* ==========================================================================
   ESTÉTICA 5: TAPITAS DE COCA-COLA ("PROMO BAJO LA TAPITA")
   ========================================================================== */
.caps-stage-cabinet {
  width: 100%;
  max-width: 920px;
  background: linear-gradient(165deg, #21070b 0%, #110407 55%, #080305 100%);
  border: 3px solid #e61a27;
  border-radius: 28px;
  padding: 18px 22px 20px;
  box-shadow:
    0 25px 75px rgba(0, 0, 0, 0.9),
    0 0 45px rgba(230, 26, 39, 0.38),
    inset 0 2px 15px rgba(255, 255, 255, 0.12);
  position: relative;
}

.caps-promo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #b80d19 0%, #e61a27 50%, #990812 100%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  padding: 12px 18px;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 8px 25px rgba(230, 26, 39, 0.35);
}

.caps-promo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.caps-promo-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #ffe885;
  text-transform: uppercase;
}

.caps-promo-title {
  font-family: var(--brand-font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.caps-counter-pill {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.caps-board-viewport {
  position: relative;
  background:
    radial-gradient(circle at 50% 50%, rgba(230, 26, 39, 0.15), rgba(5, 2, 4, 0.95)),
    #090305;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 12px 16px;
  height: clamp(260px, 48dvh, 410px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9);
}

.caps-board-grid {
  --coke-cap-size: 56px;
  --coke-cap-gap: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  align-items: center;
  gap: var(--coke-cap-gap);
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.coke-cap-item {
  width: var(--coke-cap-size);
  height: var(--coke-cap-size);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.14s ease;
  cursor: pointer;
}

.coke-cap-inner {
  width: var(--coke-cap-size);
  height: var(--coke-cap-size);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.75));
  transition: all 0.12s ease;
}

.coke-cap-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Oculto por defecto: solo se muestra cuando la tapita se ilumina */
.coke-cap-mini-label {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%) scale(0.75);
  opacity: 0;
  pointer-events: none;
  font-size: 0.68rem;
  font-weight: 800;
  color: #ffd700;
  background: rgba(15, 4, 7, 0.92);
  border: 1px solid rgba(255, 215, 0, 0.65);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  z-index: 25;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.85), 0 0 10px rgba(255, 215, 0, 0.35);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

/* Estado 1: Tapita iluminada durante el sorteo */
.coke-cap-item.cap-lit {
  transform: scale(1.32) translateY(-5px);
  z-index: 20;
}

.coke-cap-item.cap-lit .coke-cap-inner {
  filter:
    drop-shadow(0 0 16px #ffd700)
    drop-shadow(0 0 28px #ff2a39)
    brightness(1.35);
}

.coke-cap-item.cap-lit .coke-cap-mini-label {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Estado 2: Estela luminosa reciente */
.coke-cap-item.cap-trail {
  transform: scale(1.1);
  z-index: 5;
}

.coke-cap-item.cap-trail .coke-cap-inner {
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.65)) brightness(1.15);
}

.coke-cap-item.cap-trail .coke-cap-mini-label {
  opacity: 0.45;
  transform: translateX(-50%) scale(0.88);
}

/* Estado 3: Tapita ganadora seleccionada que se destapa */
.coke-cap-item.cap-winner-selected {
  transform: scale(1.45);
  z-index: 25;
  animation: capPopShake 0.4s ease;
}

.coke-cap-item.cap-winner-selected .coke-cap-inner {
  filter:
    drop-shadow(0 0 24px #ffffff)
    drop-shadow(0 0 40px #ffd700)
    brightness(1.4);
}

.coke-cap-item.cap-winner-selected .coke-cap-mini-label {
  opacity: 1;
  transform: translateX(-50%) scale(1.05);
  color: #ffffff;
  background: #e61a27;
  border-color: #ffd700;
}

@keyframes capPopShake {
  0% { transform: scale(1.2) rotate(0deg); }
  25% { transform: scale(1.5) rotate(-12deg); }
  50% { transform: scale(1.55) rotate(12deg); }
  75% { transform: scale(1.48) rotate(-6deg); }
  100% { transform: scale(1.45) rotate(0deg); }
}

/* ==========================================================================
   OVERLAY GIGANTE 3D: EL INTERIOR DE LA TAPITA DESTAPADA
   ========================================================================== */
.giant-cap-reveal-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: radial-gradient(circle at 50% 50%, rgba(28, 6, 10, 0.88) 0%, rgba(6, 3, 5, 0.96) 100%);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  perspective: 1200px;
  transition: opacity 0.28s ease;
}

.giant-cap-reveal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.giant-cap-3d-wrapper {
  width: clamp(240px, 36dvh, 320px);
  height: clamp(240px, 36dvh, 320px);
  position: relative;
  transform-style: preserve-3d;
  transform: scale(0.35) rotateY(0deg) rotateX(25deg);
  transition: transform 0.85s cubic-bezier(0.22, 1.35, 0.36, 1);
}

.giant-cap-reveal-overlay.flipped .giant-cap-3d-wrapper {
  transform: scale(1) rotateY(180deg) rotateX(0deg);
}

.giant-cap-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.giant-cap-front {
  transform: rotateY(0deg);
}

.giant-cap-inside {
  transform: rotateY(180deg);
  filter:
    drop-shadow(0 18px 40px rgba(0, 0, 0, 0.9))
    drop-shadow(0 0 38px rgba(255, 215, 0, 0.45));
}

.giant-inner-cap-svg {
  width: 100%;
  height: 100%;
  display: block;
  animation: slowCapGleam 8s linear infinite;
}

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

/* Texto impreso en el sello plástico blanco interior de la tapita */
.under-cap-printed-content {
  position: absolute;
  width: 66%;
  height: 66%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  z-index: 4;
}

.under-cap-stamp-top {
  font-family: var(--brand-font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #b80d19;
  border-bottom: 1.5px dashed rgba(184, 13, 25, 0.4);
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.under-cap-winner-name {
  font-family: 'Montserrat', var(--brand-font-display), sans-serif;
  font-weight: 900;
  font-size: 1.75rem;
  line-height: 1.1;
  color: #14213d;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  word-break: normal;
  overflow-wrap: break-word;
  /* Efecto realista de tinta impresa por inyección en el plástico interno de la tapita */
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8),
    1px 1px 2px rgba(20, 33, 61, 0.28);
  margin: 4px 0 8px;
}

.under-cap-stamp-bottom {
  font-family: var(--brand-font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #475569;
  border-top: 1.5px dashed rgba(71, 85, 105, 0.35);
  padding-top: 4px;
}

.caps-close-overlay-btn {
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.65);
  border-color: rgba(255, 255, 255, 0.35);
  font-size: 0.78rem;
  padding: 7px 16px;
}


