/* ==========================================================================
   AirNet Event Control — Broadcast Motion Graphics Engine for vMix (1080p / 4K)
   Supports dynamic X/Y positioning, variable width/length, scale, and 3 Broadcast Themes:
   1. theme-worldtour (UCI WorldTour Aero 3D)
   2. theme-panoramic (ESPN / F1 Wide Cinema Bar)
   3. theme-glass (Modern 4K Frosted Glass Capsule)
   ========================================================================== */

:root {
  --an-navy-950: #020611;
  --an-navy-900: #061024;
  --an-navy-850: #0a1b38;
  --an-navy-800: #102a54;
  --an-cyan-500: #00b4d8;
  --an-cyan-400: #38bdf8;
  --an-cyan-300: #7dd3fc;
  --an-cyan-100: #e0f2fe;
  --an-gold-600: #d97706;
  --an-gold-500: #f59e0b;
  --an-gold-400: #fbbf24;
  --an-gold-300: #fde047;
  --an-white: #ffffff;
  --an-slate-300: #cbd5e1;
  --an-slate-400: #94a3b8;
  --vmix-scale: 1;
}

.vmix-body,
.vmix-stage,
.vmix-stage * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Fondo 100% transparente real únicamente en la página de salida vMix */
html.vmix-html,
body.vmix-body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: transparent !important;
  background-color: rgba(0, 0, 0, 0) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* Lienzo nativo 1920x1080 con escalado automático a 3840x2160 (4K) */
.vmix-stage {
  position: relative;
  width: 1920px;
  height: 1080px;
  transform-origin: top left;
  transform: scale(var(--vmix-scale, 1));
  pointer-events: none;
}

/* Guías opcionales de margen seguro de televisión (?guides=1) */
.vmix-safe-guides.is-hidden {
  display: none;
}

.vmix-safe-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.safe-action {
  position: absolute;
  inset: 54px 96px;
  border: 1px dashed rgba(56, 189, 248, 0.35);
}

.safe-title {
  position: absolute;
  inset: 108px 192px;
  border: 1px dashed rgba(251, 191, 36, 0.35);
}

.safe-action span,
.safe-title span {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
}

/* ==========================================================================
   KEYFRAMES CINEMATOGRÁFICOS DE BROADCAST
   ========================================================================== */
@keyframes stingerSweep {
  0% {
    transform: translateX(-120%) skewX(-18deg);
    opacity: 1;
  }
  100% {
    transform: translateX(240%) skewX(-18deg);
    opacity: 0;
  }
}

@keyframes ambientSheen {
  0%, 70% {
    transform: translateX(-150%) skewX(-22deg);
  }
  100% {
    transform: translateX(280%) skewX(-22deg);
  }
}

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

@keyframes lowerThirdEnter {
  0% {
    opacity: 0;
    transform: translate3d(-52px, 24px, 0) scale(0.97);
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

@keyframes lowerThirdExit {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  100% {
    opacity: 0;
    transform: translate3d(42px, 16px, 0) scale(0.98);
    clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
  }
}

@keyframes boardEnter {
  0% {
    opacity: 0;
    transform: translate3d(60px, 0, 0) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes boardExit {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  100% {
    opacity: 0;
    transform: translate3d(68px, 0, 0);
  }
}

@keyframes rowCascadeIn {
  0% {
    opacity: 0;
    transform: translate3d(38px, 0, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes textSlideUp {
  0% {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes badgePop {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }
  70% {
    transform: scale(1.04);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes dataUpdateFlash {
  0% {
    filter: brightness(1.85);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes eqBounce1 {
  0%, 100% { height: 5px; }
  50% { height: 13px; }
}
@keyframes eqBounce2 {
  0%, 100% { height: 12px; }
  50% { height: 4px; }
}
@keyframes eqBounce3 {
  0%, 100% { height: 7px; }
  50% { height: 14px; }
}

@keyframes goldPulse {
  0%, 100% {
    box-shadow:
      0 26px 60px rgba(0, 0, 0, 0.85),
      0 0 28px rgba(245, 158, 11, 0.35),
      inset 0 0 18px rgba(251, 191, 36, 0.16);
  }
  50% {
    box-shadow:
      0 26px 60px rgba(0, 0, 0, 0.85),
      0 0 46px rgba(251, 191, 36, 0.65),
      inset 0 0 26px rgba(251, 191, 36, 0.28);
  }
}

/* ==========================================================================
   CAPA DE RÓTULO INFERIOR (LOWER THIRD) — POSICIÓN Y ESCALA DINÁMICAS
   ========================================================================== */
.vmix-layer-lowerthird {
  position: absolute;
  left: 90px;
  top: 830px;
  width: 1360px;
  z-index: 20;
  transform-origin: top left;
}

.vmix-layer-lowerthird.is-hidden {
  display: none;
}

.vmix-layer-lowerthird.is-entering .an-lt-chassis {
  animation: lowerThirdEnter 0.62s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.vmix-layer-lowerthird.is-exiting .an-lt-chassis {
  animation: lowerThirdExit 0.38s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

.vmix-layer-lowerthird.is-updating .an-lt-chassis {
  animation: dataUpdateFlash 0.45s ease-out;
}

/* ==========================================================================
   CHASIS PRINCIPAL DEL RÓTULO (WORLDTOUR AERO 3D + TEMAS)
   ========================================================================== */
.an-lt-chassis {
  position: relative;
  background:
    linear-gradient(135deg, rgba(2, 7, 18, 0.98) 0%, rgba(7, 20, 44, 0.97) 52%, rgba(14, 38, 76, 0.96) 100%);
  border: 1px solid rgba(56, 189, 248, 0.55);
  border-bottom: 5px solid var(--an-cyan-400);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.85),
    0 0 32px rgba(0, 180, 216, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  overflow: hidden;
}

/* Tema 2: Barra Panorámica TV (Estilo ESPN / F1) */
.an-lt-chassis.theme-panoramic {
  clip-path: polygon(16px 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
  border-bottom: 4px solid var(--an-gold-400);
  border-top: 2px solid var(--an-cyan-400);
  background:
    linear-gradient(90deg, rgba(2, 6, 17, 0.98) 0%, rgba(10, 27, 56, 0.97) 50%, rgba(2, 6, 17, 0.98) 100%);
}

/* Tema 3: Cristal 4K Moderno (Bordes Redondeados + Doble Neón) */
.an-lt-chassis.theme-glass {
  clip-path: none;
  border-radius: 20px;
  border: 2px solid rgba(56, 189, 248, 0.65);
  border-bottom: 5px solid var(--an-gold-400);
  background:
    radial-gradient(circle at 15% 20%, rgba(14, 165, 233, 0.25), transparent 55%),
    linear-gradient(135deg, rgba(3, 9, 23, 0.95) 0%, rgba(9, 24, 48, 0.94) 100%);
}

/* Textura de telemetría diagonal */
.an-lt-chassis::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(56, 189, 248, 0.03) 0px,
      rgba(56, 189, 248, 0.03) 2px,
      transparent 2px,
      transparent 10px
    );
  pointer-events: none;
}

/* Línea láser animada superior */
.an-lt-laser-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--an-gold-400), var(--an-cyan-400), #ffffff, var(--an-cyan-400), var(--an-gold-400));
  background-size: 200% 100%;
  animation: laserFlow 4s linear infinite;
  z-index: 6;
}

/* Hoja de luz cinética (Stinger Wipe) en la entrada */
.an-lt-stinger {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 42%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(56, 189, 248, 0.4) 45%,
    rgba(251, 191, 36, 0.9) 85%,
    #ffffff 100%
  );
  pointer-events: none;
  z-index: 5;
  animation: stingerSweep 0.82s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Brillo periódico sutil en vivo */
.an-lt-sheen {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 26%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.085) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 4;
  animation: ambientSheen 6s infinite ease-in-out;
}

/* Variante especial: GANADOR CONFIRMADO (Tema Oro Oficial) */
.an-lt-chassis.is-winner {
  background:
    linear-gradient(135deg, rgba(8, 12, 24, 0.99) 0%, rgba(28, 24, 12, 0.98) 55%, rgba(62, 42, 8, 0.96) 100%);
  border: 2px solid rgba(251, 191, 36, 0.85);
  border-bottom: 6px solid var(--an-gold-400);
  animation: goldPulse 3.2s infinite ease-in-out;
}

/* Cinta Superior de Telemetría */
.an-lt-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 28px 0 0;
  background: linear-gradient(90deg, rgba(2, 6, 17, 0.96) 0%, rgba(6, 18, 38, 0.92) 100%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.32);
}

.an-lt-chassis.is-winner .an-lt-header {
  border-bottom-color: rgba(251, 191, 36, 0.5);
}

.an-lt-header-left {
  display: flex;
  align-items: center;
  height: 100%;
}

.an-brand-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 4px 24px 4px 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 55%, #cbd5e1 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  border-left: 6px solid var(--an-gold-400);
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.55);
}

.an-lt-chassis.is-winner .an-brand-plate {
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 100%);
  border-left-color: var(--an-gold-500);
}

.an-brand-logo-img {
  height: 30px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.an-lt-context-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 14px;
  padding: 4px 14px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--an-cyan-300);
}

.an-lt-chassis.is-winner .an-lt-context-tag {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.55);
  color: var(--an-gold-300);
}

.an-svg-icon {
  width: 16px;
  height: 16px;
  color: var(--an-gold-400);
  flex-shrink: 0;
}

.an-lt-event-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--an-white);
}

.an-event-loc {
  color: var(--an-gold-400);
  font-weight: 700;
}

/* Cuerpo Principal 3D */
.an-lt-main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr auto;
  align-items: stretch;
  min-height: 122px;
}

/* Escudo Oficial Bicimaya + Escudo 3D de Dorsal */
.an-lt-dorsal-pod {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px 10px 14px;
  background: linear-gradient(155deg, rgba(16, 42, 84, 0.95) 0%, rgba(2, 6, 17, 0.98) 100%);
  border-right: 3px solid var(--an-gold-400);
  position: relative;
}

.an-event-crest-pod {
  width: 96px;
  height: 100px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badgePop 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.02s both;
}

.an-event-crest-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(250, 204, 21, 0.42));
}

.an-dorsal-shield {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.16) 0%, rgba(2, 6, 17, 0.85) 100%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-top: 3px solid var(--an-cyan-400);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  padding: 8px 10px;
  animation: badgePop 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.06s both;
}

.an-lt-chassis.is-winner .an-dorsal-shield {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.32) 0%, rgba(20, 14, 4, 0.92) 100%);
  border-color: var(--an-gold-400);
  border-top: 3px solid var(--an-gold-300);
}

.an-dorsal-caption {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--an-gold-400);
  margin-bottom: 2px;
}

.an-dorsal-value {
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  color: var(--an-white);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  text-shadow: 0 3px 14px rgba(0, 180, 216, 0.45);
}

.an-lt-chassis.is-winner .an-dorsal-value {
  color: var(--an-gold-300);
  text-shadow: 0 3px 16px rgba(251, 191, 36, 0.55);
}

/* Identidad Central del Corredor */
.an-lt-identity {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 28px;
  overflow: hidden;
}

.an-lt-name-mask {
  overflow: hidden;
}

.an-lt-rider-name {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: var(--an-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
  animation: textSlideUp 0.52s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.an-lt-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  animation: textSlideUp 0.52s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}

.an-cat-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  background: linear-gradient(135deg, var(--an-gold-500) 0%, var(--an-gold-600) 100%);
  color: var(--an-navy-950);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.an-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.28);
  font-size: 15px;
  font-weight: 700;
  color: var(--an-cyan-100);
}

.an-meta-chip.is-origin {
  color: var(--an-slate-300);
}

.an-mini-svg {
  width: 14px;
  height: 14px;
  color: var(--an-cyan-400);
  flex-shrink: 0;
}

/* Módulo Derecho: Cronómetro / Resultado con Barras de Telemetría */
.an-lt-chrono-pod {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 340px;
  padding: 14px 32px 14px 38px;
  background: linear-gradient(135deg, rgba(2, 6, 17, 0.85) 0%, rgba(12, 32, 68, 0.96) 100%);
  border-left: 3px solid var(--an-cyan-400);
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 0 100%);
  animation: textSlideUp 0.54s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}

.an-lt-chassis.is-winner .an-lt-chrono-pod {
  background: linear-gradient(135deg, rgba(35, 24, 6, 0.95) 0%, rgba(78, 52, 10, 0.96) 100%);
  border-left-color: var(--an-gold-400);
}

.an-chrono-top-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--an-cyan-300);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.an-lt-chassis.is-winner .an-chrono-top-tag {
  color: var(--an-gold-300);
}

.an-eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.an-eq-bars i {
  display: block;
  width: 3px;
  background: var(--an-gold-400);
  border-radius: 1px;
}

.an-eq-bars i:nth-child(1) { animation: eqBounce1 0.9s infinite ease-in-out; }
.an-eq-bars i:nth-child(2) { animation: eqBounce2 0.75s infinite ease-in-out; }
.an-eq-bars i:nth-child(3) { animation: eqBounce3 1.05s infinite ease-in-out; }

.an-chrono-time {
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
  color: var(--an-gold-400);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  text-shadow: 0 3px 18px rgba(245, 158, 11, 0.45);
}

.an-chrono-time.is-status-label {
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--an-cyan-300);
  text-shadow: 0 2px 12px rgba(56, 189, 248, 0.35);
}

.an-chrono-sub-pill {
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--an-white);
}

/* ==========================================================================
   CAPA DE TABLA DE POSICIONES (LEADERBOARD TOP 5 / CATEGORÍAS)
   ========================================================================== */
.vmix-layer-leaderboard {
  position: absolute;
  top: 72px;
  left: 1120px;
  width: 700px;
  z-index: 15;
  transform-origin: top left;
}

.vmix-layer-leaderboard.is-hidden {
  display: none;
}

.vmix-layer-leaderboard.is-entering .an-board-chassis {
  animation: boardEnter 0.58s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.vmix-layer-leaderboard.is-exiting .an-board-chassis {
  animation: boardExit 0.36s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

.vmix-layer-leaderboard.is-updating .an-board-chassis {
  animation: dataUpdateFlash 0.45s ease-out;
}

.an-board-chassis {
  position: relative;
  background:
    linear-gradient(165deg, rgba(2, 7, 18, 0.98) 0%, rgba(7, 20, 44, 0.97) 65%, rgba(12, 34, 68, 0.96) 100%);
  border: 1px solid rgba(56, 189, 248, 0.55);
  border-top: 5px solid var(--an-gold-400);
  border-bottom: 4px solid var(--an-cyan-400);
  box-shadow:
    0 30px 68px rgba(0, 0, 0, 0.88),
    0 0 34px rgba(0, 180, 216, 0.22);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  overflow: hidden;
}

.an-board-chassis.theme-glass {
  clip-path: none;
  border-radius: 20px;
}

.an-board-header {
  padding: 0 0 16px 0;
  background: linear-gradient(90deg, rgba(2, 6, 17, 0.96) 0%, rgba(14, 38, 76, 0.92) 100%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.35);
}

.an-board-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding-right: 22px;
  background: rgba(2, 6, 17, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.an-board-event-name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--an-gold-400);
}

.an-board-title-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px 0 20px;
}

.an-board-crest-img {
  width: 72px;
  height: 76px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 10px rgba(250, 204, 21, 0.42));
}

.an-board-title-texts {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.an-board-main-title {
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--an-white);
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.an-board-sub-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--an-cyan-300);
  margin-top: 5px;
}

.an-board-col-headers {
  display: grid;
  grid-template-columns: 68px 86px 1fr 165px;
  padding: 9px 22px;
  background: rgba(2, 6, 17, 0.92);
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--an-slate-400);
}

.an-board-rows {
  display: flex;
  flex-direction: column;
}

.an-board-row {
  display: grid;
  grid-template-columns: 68px 86px 1fr 165px;
  align-items: center;
  padding: 11px 22px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.14);
  background: rgba(6, 16, 36, 0.72);
}

.vmix-layer-leaderboard.is-entering .an-board-row {
  animation: rowCascadeIn 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(0.08s + var(--row-idx, 0) * 0.055s);
}

.an-board-row:nth-child(even) {
  background: rgba(10, 27, 56, 0.78);
}

/* Destacado de Podio: 1° Oro, 2° Plata, 3° Bronce */
.an-board-row.is-rank-1 {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.26) 0%, rgba(10, 27, 56, 0.92) 72%);
  border-left: 5px solid var(--an-gold-400);
}

.an-row-pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 34px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 18px;
  font-weight: 900;
  color: var(--an-white);
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}

.an-board-row.is-rank-1 .an-row-pos-badge {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
  color: var(--an-navy-950);
  border-color: #ffffff;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.5);
}

.an-board-row.is-rank-2 .an-row-pos-badge {
  background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%);
  color: var(--an-navy-950);
  border-color: #ffffff;
}

.an-board-row.is-rank-3 .an-row-pos-badge {
  background: linear-gradient(135deg, #fdba74 0%, #d97706 100%);
  color: var(--an-navy-950);
  border-color: #fed7aa;
}

.an-row-bib {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 5px 9px;
  background: rgba(2, 6, 17, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: var(--an-cyan-300);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  border-radius: 4px;
}

.an-board-row.is-rank-1 .an-row-bib {
  border-color: var(--an-gold-400);
  color: var(--an-gold-300);
}

.an-row-athlete {
  padding-right: 12px;
  overflow: hidden;
}

.an-row-athlete-name {
  font-size: 19px;
  font-weight: 900;
  color: var(--an-white);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.an-row-athlete-team {
  font-size: 12px;
  font-weight: 700;
  color: var(--an-cyan-100);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.an-row-chrono {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.an-row-duration {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 20px;
  font-weight: 900;
  color: var(--an-white);
  font-variant-numeric: tabular-nums;
}

.an-board-row.is-rank-1 .an-row-duration {
  color: var(--an-gold-400);
}

.an-row-diff {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 8px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 800;
  color: var(--an-gold-300);
  font-variant-numeric: tabular-nums;
}

.an-row-diff.is-leader-pill {
  background: rgba(16, 185, 129, 0.24);
  border-color: rgba(52, 211, 153, 0.55);
  color: #6ee7b7;
}

.an-board-empty {
  padding: 36px 24px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--an-slate-300);
}

/* ==========================================================================
   NUEVOS GRÁFICOS ESPECIALES DE TRANSMISIÓN (CARA A CARA, RELOJ EN VIVO, CINTILLO, PODIO)
   ========================================================================== */

/* 1. Cara a Cara (VS Líder) */
.an-h2h-body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr 140px 1fr;
  align-items: center;
  gap: 16px;
  min-height: 124px;
  padding: 12px 24px 12px 6px;
}

.an-h2h-fighter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 6px;
  background: rgba(6, 16, 36, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  overflow: hidden;
}

.an-h2h-fighter.is-leader {
  border-left: 4px solid var(--an-gold-400);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.16) 0%, rgba(6, 16, 36, 0.9) 100%);
}

.an-h2h-fighter.is-challenger {
  border-right: 4px solid var(--an-cyan-400);
  text-align: right;
  align-items: flex-end;
}

.an-h2h-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.an-h2h-rank-pill {
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(56, 189, 248, 0.2);
  color: var(--an-cyan-300);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.an-h2h-rank-pill.is-gold {
  background: var(--an-gold-400);
  color: var(--an-navy-950);
}

.an-h2h-bib {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  font-weight: 900;
  color: var(--an-white);
}

.an-h2h-name {
  font-size: 23px;
  font-weight: 900;
  color: var(--an-white);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.an-h2h-sub {
  font-size: 12px;
  font-weight: 700;
  color: var(--an-slate-300);
  margin-top: 2px;
}

.an-h2h-time {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 26px;
  font-weight: 900;
  color: var(--an-gold-400);
  margin-top: 4px;
}

.an-h2h-time.is-cyan {
  color: var(--an-cyan-300);
}

.an-h2h-vs-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.an-vs-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--an-gold-300) 0%, var(--an-gold-600) 100%);
  color: var(--an-navy-950);
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.55);
  border: 2px solid #ffffff;
}

.an-vs-gap-pill {
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(248, 113, 113, 0.6);
  color: #fecaca;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

/* 2. Cronómetro en Vivo + Estadísticas del Pelotón */
.an-clock-stats-body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 265px 1fr auto;
  align-items: stretch;
  min-height: 122px;
}

.an-stats-tiles-row {
  display: grid;
  grid-template-columns: 145px 135px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 22px;
}

.an-stat-mini-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 14px;
  background: rgba(2, 6, 17, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 6px;
  height: 100%;
}

.an-stat-mini-lbl {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--an-slate-300);
  text-transform: uppercase;
}

.an-stat-mini-val {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.05;
  margin-top: 4px;
}

.an-stat-mini-val.is-cyan {
  color: var(--an-cyan-300);
}

.an-stat-mini-val.is-gold {
  color: var(--an-gold-400);
}

.an-stat-mini-leader {
  font-size: 17px;
  font-weight: 900;
  color: var(--an-white);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3. Cintillo / Aviso Libre de Transmisión */
.an-ticker-body {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 32px 14px 20px;
  min-height: 112px;
}

.an-ticker-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

.an-ticker-headline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--an-gold-400);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.an-ticker-msg {
  font-size: 30px;
  font-weight: 900;
  color: var(--an-white);
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-transform: uppercase;
}

/* 4. Destacado de Podio Oficial Top 3 */
.an-board-chassis.is-podium-board {
  border-top: 6px solid var(--an-gold-400);
  box-shadow:
    0 30px 68px rgba(0, 0, 0, 0.9),
    0 0 42px rgba(251, 191, 36, 0.35);
}

.an-board-row.is-podium-row {
  padding: 15px 22px;
}

