﻿@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: transparent;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  overflow: hidden;
  user-select: none;
  padding: 30px;
  width: 100vw;
  height: 100vh;
  position: relative;
  margin: 0;
}

/* Aumenta cada vista independiente sin modificar el lienzo transparente de OBS. */
#wrap,
#zocalo,
#spotlight,
#weather-zocalo,
#track-map-overlay,
#results-overlay,
#fastest-lap-overlay,
#laps-header-overlay,
#event-badge-overlay,
#race-control-overlay,
#countdown-overlay,
#side-by-side-overlay,
#penalty-overlay,
#comment-feed-overlay,
#session-timer-overlay,
#grid-overlay,
#battle-overlay,
#flag-overlay,
#best-sectors-overlay,
#advances-overlay,
#pilot-action-overlay,
#sponsors-overlay,
#license-watermark,
.lb-card {
  zoom: 1.2;
}

#wrap {
  position: absolute;
  left: 20px;
  top: 20px; /* Siempre arriba ya que el logo está dentro del cabezal */
  width: 360px; /* Barra compacta y proporcional */
  max-height: calc(83.333333vh - 40px); /* Compensa el aumento del componente */
  display: flex;
  flex-direction: column;
  background: rgba(15, 15, 15, 0.85);
  border-top: 4px solid #e60000; /* Naranja cambiado a Rojo */
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  border-radius: 6px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: top 0.3s ease, max-height 0.3s ease, opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  opacity: 0;
  transform: translateX(-30px);
  pointer-events: none;
}
#wrap.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* ── Header ── */
#session-name {
  font-size: 7.5px;
  color: #888;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #111111;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 32px;
}

/* Estilos del logo removidos */

#header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

#weather-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #141414;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #aaaaaa;
  flex-wrap: wrap;
  gap: 8px;
  transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease, padding 0.4s ease, border-bottom 0.4s ease;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0 6px;
  border-bottom: 0px solid transparent;
}

#weather-bar.show {
  opacity: 1;
  max-height: 50px;
  padding: 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#weather-bar .weather-label,
#weather-bar .weather-city {
  display: none;
}

#weather-bar .weather-icon {
  width: 20px;
  height: 20px;
}

#weather-bar .weather-temp {
  font-size: 9.5px;
  font-weight: 800;
  color: #ffffff;
}

#weather-bar .weather-desc {
  font-size: 8.5px;
  font-weight: 600;
  color: #888888;
  text-transform: uppercase;
}

#weather-bar .weather-humidity,
#weather-bar .weather-wind,
#weather-bar .weather-track,
#weather-bar .weather-time {
  font-size: 9px;
  font-weight: 600;
  color: #aaaaaa;
  display: flex;
  align-items: center;
  gap: 2px;
}

#flag-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease, max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease, padding 0.4s ease, border-bottom 0.4s ease;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0 10px;
  border-bottom: 0px solid transparent;
}
#flag-bar.show {
  opacity: 1;
  max-height: 40px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 8px;
}
#flag-bar.flag-green { background: #2ecc71; color: #000000; }
#flag-bar.flag-yellow { background: #f1c40f; color: #000000; }
#flag-bar.flag-red { background: #e60000; color: #ffffff; }

#flag-bar.flag-black { background: #111111; color: #ffffff; border-bottom: 1.5px solid #ffffff; }
#flag-bar.flag-checkered { background: #111111; color: #ffffff; border-bottom: 1.5px solid #ffffff; }
#flag-bar.flag-safetycar {
  background: #f1c40f;
  color: #000000;
  animation: flashYellow 1s infinite alternate;
}
@keyframes flashYellow {
  from { background: #f1c40f; }
  to { background: #d4ac0d; }
}

#fastest-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111111;
  font-size: 9px;
  font-weight: 700;
  color: #aaaaaa;
  transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease, padding 0.4s ease, border-top 0.4s ease;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0 10px;
  border-top: 0px solid transparent;
}
#fastest-bar.show {
  opacity: 1;
  max-height: 40px;
  padding: 5px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
#fastest-label {
  color: #f1c40f;
  font-weight: 900;
  letter-spacing: 1px;
  font-size: 9px;
}
#fastest-info {
  color: #ffffff;
  font-weight: 800;
  text-transform: uppercase;
}

#footer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  font-size: 8px;
  font-weight: 600;
  color: #555555;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease, padding 0.4s ease, border-top 0.4s ease;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0 10px;
  border-top: 0px solid transparent;
}
#footer-bar.show {
  opacity: 1;
  max-height: 30px;
  padding: 3px 10px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* ── Mini Laps Ticker (bottom full-width) ── */
#mini-laps-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 86px;
  display: flex;
  align-items: stretch;
  opacity: 0;
  pointer-events: none;
  z-index: 110;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform: translateY(10px);
  border-top: 3px solid #e60000;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.6);
}
#mini-laps-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
body.view-tower #mini-laps-overlay { display: none !important; }

/* Left info block */
.ml-info {
  background: #0d0d0d;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 22px;
  min-width: 192px;
  border-right: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  gap: 2px;
}
.ml-laps {
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1;
}
.ml-session {
  font-size: 10.2px;
  font-weight: 700;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.ml-page-indicator {
  font-size: 9px;
  font-weight: 600;
  color: #e60000;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* Pilots container (clips & animates) */
.ml-pilots-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: #111111;
}
.ml-pilots {
  display: flex;
  align-items: stretch;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
/* Animation states */
.ml-pilots.slide-out-left {
  animation: mlSlideOutLeft 0.35s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
.ml-pilots.slide-in-right {
  animation: mlSlideInRight 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}
@keyframes mlSlideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-40px); }
}
@keyframes mlSlideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Individual pilot card */
.ml-pilot {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 14px;
  border-right: 1px solid rgba(255,255,255,0.05);
  gap: 10px;
  min-width: 0;
}
.ml-pilot:last-child { border-right: none; }

/* Position badge */
.ml-pos {
  font-size: 21.6px;
  font-weight: 900;
  color: rgba(255,255,255,0.2);
  line-height: 1;
  min-width: 22px;
  text-align: right;
  flex-shrink: 0;
}
.ml-pos.first { color: #e60000; }
.ml-pos.second { color: #aaaaaa; }
.ml-pos.third { color: #cd7f32; }

/* Car number badge */
.ml-num {
  background: #e60000;
  color: #fff;
  font-size: 10.8px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  min-width: 29px;
  text-align: center;
}

/* Name + time block */
.ml-info-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 1.2px;
}
.ml-name {
  font-size: 13.2px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ml-time {
  font-size: 11.4px;
  font-weight: 700;
  color: #888888;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}
.ml-time.best { color: #f1c40f; }

/* Empty slot placeholder */
.ml-pilot.empty .ml-name { color: #333; }
.ml-pilot.empty .ml-time { color: #333; }

/* ── Zocalo (lower-third) ── */
#zocalo {
  position: absolute;
  bottom: 42px;
  left: 50%;
  transform: translateX(-50%) translateY(26px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  padding: 0;
  background:
    linear-gradient(90deg, rgba(230,0,0,0.98) 0 7px, transparent 7px),
    linear-gradient(135deg, rgba(18,18,18,0.96), rgba(5,5,5,0.92));
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 48px rgba(0,0,0,0.55), 0 0 0 1px rgba(230,0,0,0.22);
  z-index: 100;
  min-width: 430px;
  min-height: 74px;
  white-space: nowrap;
  transition: opacity 0.36s ease-out, transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  overflow: visible;
}
#zocalo::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(230,0,0,0.95), rgba(255,255,255,0.16), transparent);
}
#zocalo::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 10px;
  width: 58px;
  height: 2px;
  background: #e60000;
  opacity: 0.9;
}
#zocalo.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
#zocalo .z-name {
  order: 2;
  display: block;
  padding: 30px 32px 16px 24px;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
#zocalo .z-role {
  order: 1;
  position: absolute;
  top: 12px;
  left: 31px;
  font-size: 9px;
  line-height: 1;
  font-weight: 900;
  color: #e60000;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 0;
  border-left: 0;
}
#zocalo .z-photo {
  order: 0;
  width: 78px;
  height: 92px;
  object-fit: cover;
  flex-shrink: 0;
  display: none;
  margin: -20px 0 -8px 18px;
  align-self: center;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 14px 30px rgba(0,0,0,0.55);
  background: #111;
}
#zocalo.has-photo .z-role {
  left: 119px;
}
#zocalo.has-photo .z-name {
  padding-left: 20px;
}

/* ── Standalone Event Badge Overlay (Premium Broadcast Style) ── */
#event-badge-overlay {
  position: absolute;
  bottom: 40px;
  left: 20px;
  display: flex;
  align-items: stretch;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform: translateY(18px);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
  min-height: 72px;
}
#event-badge-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
body.view-tower #event-badge-overlay {
  display: none !important;
}

/* Red accent stripe on far left */
.eb-accent-stripe {
  width: 5px;
  background: linear-gradient(180deg, #ff2020 0%, #b00000 100%);
  flex-shrink: 0;
  opacity: 0;
}

/* Logo block */
.eb-logo-block {
  background: #111111;
  width: 96px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-right: 1px solid rgba(255,255,255,0.07);
  opacity: 0;
}
.eb-logo-block img {
  max-width: 74px;
  max-height: 50px;
  object-fit: contain;
  display: block;
}
.eb-logo-fallback {
  font-size: 22px;
  color: #333;
}

/* Separator line */
.eb-sep {
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, #e60000 30%, #e60000 70%, transparent 100%);
  flex-shrink: 0;
  margin: 8px 0;
  opacity: 0;
}

/* Main text block */
.eb-text-block {
  background: #111111;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 20px 0 16px;
  min-width: 200px;
  gap: 2px;
  opacity: 0;
}

/* Event name label (small, at top) */
.eb-event-label {
  font-size: 8.5px;
  font-weight: 700;
  color: #e60000;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0;
}

/* Circuit / main title */
.eb-title {
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
}

/* Session subtitle */
.eb-subtitle {
  font-size: 9px;
  font-weight: 700;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0;
  margin-top: 1px;
}

/* ── Animations ── */
#event-badge-overlay.show .eb-accent-stripe {
  animation: ebFadeIn 0.3s ease forwards;
}
#event-badge-overlay.show .eb-logo-block {
  animation: ebFadeIn 0.4s ease 0.1s forwards;
}
#event-badge-overlay.show .eb-sep {
  animation: ebSepGrow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) 0.2s forwards;
}
#event-badge-overlay.show .eb-text-block {
  animation: ebSlideLeft 0.45s cubic-bezier(0.25, 0.8, 0.25, 1) 0.15s forwards;
}
#event-badge-overlay.show .eb-event-label {
  animation: ebTextRise 0.35s ease 0.3s forwards;
}
#event-badge-overlay.show .eb-title {
  animation: ebTextRise 0.35s ease 0.35s forwards;
}
#event-badge-overlay.show .eb-subtitle {
  animation: ebTextRise 0.35s ease 0.42s forwards;
}

@keyframes ebFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes ebSepGrow {
  from { opacity: 0; transform: scaleY(0); }
  to   { opacity: 1; transform: scaleY(1); }
}
@keyframes ebSlideLeft {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes ebTextRise {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Race Control Overlay ── */
#race-control-overlay {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
#race-control-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
body.view-tower #race-control-overlay {
  display: none !important;
}
.rc-title {
  background: #e60000;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 6px 20px;
  border-radius: 8px;
  text-transform: uppercase;
  white-space: nowrap;
}
.rc-text {
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 8px;
  text-align: center;
  max-width: 80vw;
  line-height: 1.3;
}

/* ── Countdown Overlay ── */
#countdown-overlay {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  opacity: 0;
  pointer-events: none;
  z-index: 101;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
#countdown-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
body.view-tower #countdown-overlay {
  display: none !important;
}
.cd-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.cd-title-box {
  background: #e60000;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 6px 16px;
  border-radius: 8px 0 0 8px;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cd-title-box .cd-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  animation: cdSpin 2s linear infinite;
}
@keyframes cdSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.cd-value-box {
  background: rgba(0,0,0,0.85);
  color: #ffcc00;
  font-size: 22px;
  font-weight: 900;
  padding: 6px 20px;
  border-radius: 0 8px 8px 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  min-width: 80px;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cd-value-box.cd-expired {
  color: #e60000;
  animation: cdPulse 1s ease-in-out infinite;
}
@keyframes cdPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Flag Overlay (independent floating) ── */
#flag-overlay {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  opacity: 0;
  pointer-events: none;
  z-index: 103;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
#flag-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
body.view-tower #flag-overlay {
  display: none !important;
}
.flo-flag-box {
  background: #111;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 8px 24px;
  border-radius: 8px;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  border-left: 4px solid #e60000;
}
.flo-flag-box.flag-green { border-left-color: #2ecc71; }
.flo-flag-box.flag-yellow { border-left-color: #f1c40f; }
.flo-flag-box.flag-red { border-left-color: #e60000; }
.flo-flag-box.flag-checkered { border-left-color: #fff; }
.flo-flag-box.flag-black { border-left-color: #555; }
.flo-flag-box.flag-safetycar { border-left-color: #f1c40f; animation: flashYellow 1s infinite alternate; }

/* ── Side-by-Side Overlay ── */
#side-by-side-overlay {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  z-index: 89;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
#side-by-side-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.sbs-title {
  position: relative;
  background: #e60000;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2.2px;
  line-height: 1;
  padding: 6px 22px 5px;
  border-radius: 3px 3px 0 0;
  text-transform: uppercase;
  box-shadow: 0 5px 18px rgba(0,0,0,.22);
}
.sbs-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
  z-index: -1;
}
.sbs-cards {
  display: grid;
  grid-template-columns: 326px 46px 326px;
  align-items: center;
  gap: 8px;
}
.sbs-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: rgba(15, 15, 15, 0.92);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
}
.sbs-card::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--broadcast-red), var(--broadcast-red-dark));
}
.sbs-driver-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  min-height: 67px;
  padding: 10px 14px 9px;
  gap: 12px;
}
.sbs-identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.sbs-no {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 42px;
  padding: 0 8px;
  background: #e60000;
  border: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: -.6px;
}
.sbs-name {
  overflow: hidden;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.05;
  text-align: left;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.sbs-cls {
  min-height: 11px;
  color: var(--broadcast-muted, #b4b8bf);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.sbs-stats {
  display: grid;
  grid-template-columns: 44px 52px minmax(62px, 1fr) minmax(62px, 1fr) 58px;
  gap: 1px;
  margin: 0 12px 12px;
  padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sbs-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 35px;
  padding: 4px 5px 5px;
  background: rgba(255,255,255,.035);
  border: 0;
}
.sbs-stat:first-child { border-radius: 3px 0 0 3px; }
.sbs-stat:last-child { border-radius: 0 3px 3px 0; }
.sbs-stat + .sbs-stat { box-shadow: inset 1px 0 0 rgba(255,255,255,.045); }
.sbs-label {
  color: var(--broadcast-muted, #b4b8bf);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .85px;
  line-height: 1;
  text-transform: uppercase;
}
.sbs-stat span:last-child {
  overflow: hidden;
  width: 100%;
  color: var(--broadcast-text, #fff);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sbs-stat-short span:last-child { font-size: 13px; }
.sbs-vs {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 42px;
  height: 42px;
  background: #0a0b0d;
  border: 3px solid var(--broadcast-red);
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.4px;
  box-shadow: 0 0 0 2px rgba(8,9,11,.9);
  z-index: 2;
}
.sbs-vs::before,
.sbs-vs::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 9px;
  height: 2px;
  background: var(--broadcast-red);
  transform: translateY(-50%);
}
.sbs-vs::before { right: 100%; }
.sbs-vs::after { left: 100%; }
.sbs-vs span { transform: skewX(-8deg); }

/* ── Penalty Overlay ── */
#penalty-overlay {
  position: absolute;
  top: 80px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(230, 0, 0, 0.15);
  border: 1px solid #e60000;
  border-radius: 6px;
  padding: 8px 16px;
  opacity: 0;
  pointer-events: none;
  z-index: 95;
  transition: opacity 0.3s ease;
}
#penalty-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.penalty-icon {
  font-size: 20px;
  color: #f1c40f;
}
.penalty-text {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  max-width: 400px;
}

/* ── Comment Feed Overlay ── */
#comment-feed-overlay {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  z-index: 85;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: opacity 0.4s ease, transform 0.4s ease;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 8px 20px;
  max-width: 80vw;
}
#comment-feed-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.cf-label {
  font-size: 8px;
  font-weight: 800;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.cf-text {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  animation: cf-fade 6s ease-in-out;
}
@keyframes cf-fade {
  0% { opacity: 0.3; transform: translateY(4px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; }
  100% { opacity: 0.8; }
}

/* ── Battle Overlay ── */
#battle-overlay {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  z-index: 102;
  transition: opacity 0.4s ease, transform 0.4s ease;
  width: auto;
  min-width: 540px;
  max-width: 90%;
}
#battle-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
body.view-tower #battle-overlay {
  display: none !important;
}
.battle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.battle-title-bar {
  background: #e60000;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 5px 16px;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.6);
  width: 100%;
  box-sizing: border-box;
}

.battle-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 4px;
}
.battle-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.battle-top-line {
  display: flex;
  align-items: stretch;
}
.battle-pos {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  background: #111;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px 0;
}
.battle-name {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #1a1a1a;
  padding: 4px 8px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  border-left: 3px solid #e60000;
}
.battle-bottom-line {
  display: flex;
  align-items: stretch;
  margin-top: 2px;
}
.battle-num {
  font-size: 11px;
  font-weight: 800;
  color: #e60000;
  background: #0d0d0d;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 3px 0;
}
.battle-time {
  flex: 1;
  font-size: 12px;
  font-weight: 800;
  color: #00e676;
  background: #050505;
  padding: 3px 8px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Spotlight (driver highlight) ── */
#spotlight {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(30px) skewX(-12deg);
  opacity: 0;
  pointer-events: none;
  padding: 10px 20px;
  background: #0f0f0f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid #e60000;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  z-index: 90;
  min-width: 480px;
  transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
#spotlight.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) skewX(-12deg);
}
#spotlight .s-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transform: skewX(12deg);
}
#spotlight .s-number {
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  background: #e60000;
  padding: 2px 10px;
  display: inline-block;
  border-bottom: 2px solid #ffffff;
  font-style: italic;
}
#spotlight .s-brand,
#spotlight .s-nation {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 2px;
}
#spotlight .s-name {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  display: inline-block;
  font-style: italic;
}
#spotlight .s-cls {
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  background: #e60000;
  padding: 2px 8px;
  text-transform: uppercase;
  display: inline-block;
  font-style: italic;
}
#spotlight .s-right {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}
#spotlight .s-last {
  font-size: 14px;
  font-weight: 800;
  color: #e60000;
  font-style: italic;
}
#spotlight .s-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  font-style: italic;
}
#spotlight .s-stat-label {
  font-size: 8px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
}
#spotlight .s-stat span:last-child {
  font-size: 13px;
  font-weight: 700;
  color: #ccc;
}
#spotlight .s-laps {
  font-size: 11px;
  font-weight: 600;
  color: #aaaaaa;
  font-style: italic;
}
#spotlight .s-sectors {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transform: skewX(12deg);
}
#spotlight .s-sector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-style: italic;
}
#spotlight .sec-label {
  font-size: 8px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 1px;
}
#spotlight .sec-val {
  font-size: 12px;
  font-weight: 700;
  color: #aaa;
  transition: color 0.3s;
}
.sec-val.sec-purple { color: #aa66ff; }
.sec-val.sec-green { color: #2ecc71; }
.sec-val.sec-red { color: #e60000; }
.sec-val.sec-white { color: #ddd; }
#spotlight .s-curr-lap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  font-style: italic;
}
#spotlight .s-curr-lap .sec-val {
  color: #f1c40f;
  font-family: monospace;
  font-size: 14px;
  font-weight: 800;
}

/* ── Weather Zocalo (floating card) ── */
#weather-zocalo {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 24px;
  background: #0f0f0f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid #e60000;
  transform: translateX(-50%) translateY(30px) skewX(-12deg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  z-index: 95;
  min-width: 380px;
  white-space: nowrap;
  transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
#weather-zocalo.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) skewX(-12deg);
}
#weather-zocalo .wz-city {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  display: inline-block;
  transform: skewX(12deg);
  font-style: italic;
}
#weather-zocalo .wz-icon {
  width: 28px;
  height: 28px;
  display: inline-block;
  transform: skewX(12deg);
}
#weather-zocalo .wz-temp {
  font-size: 16px;
  font-weight: 900;
  color: #e60000;
  display: inline-block;
  transform: skewX(12deg);
  font-style: italic;
}
#weather-zocalo .wz-desc {
  font-size: 10px;
  font-weight: 800;
  color: #aaaaaa;
  text-transform: uppercase;
  display: inline-block;
  transform: skewX(12deg);
  font-style: italic;
}
#weather-zocalo .wz-humidity,
#weather-zocalo .wz-wind {
  font-size: 10px;
  font-weight: 700;
  color: #888888;
  display: inline-block;
  transform: skewX(12deg);
}
#weather-zocalo .wz-right {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  transform: skewX(12deg);
}
#weather-zocalo .wz-track,
#weather-zocalo .wz-time {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  font-style: italic;
}


/* ── Views (OBS query parameter views) ── */
body.view-tower #zocalo,
body.view-tower #spotlight,
body.view-tower #weather-zocalo,
body.view-tower #track-map-overlay,
body.view-tower #results-overlay,
body.view-tower #fastest-lap-overlay,
body.view-tower #laps-header-overlay,
body.view-tower #best-sectors-overlay,
body.view-tower #advances-overlay,
body.view-tower #pilot-action-overlay,
body.view-tower #crawl-superior {
  display: none !important;
}
body.view-zocalo #wrap {
  display: none !important;
}
body.view-sponsors #wrap {
  display: none !important;
}
body.view-sponsors #sponsors-overlay {
  bottom: auto;
  right: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 300;
}
body.view-sponsors .sp-img {
  max-height: 120px;
  max-width: 400px;
}

#event-name {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #aaaaaa;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #e60000;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e60000; /* Naranja cambiado a Rojo */
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

/* ── Filter Bar ── */
#filter-bar {
  display: none !important;
}

#category-filter {
  flex: 1;
  background: rgba(20, 20, 20, 0.9);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  text-transform: uppercase;
  font-family: 'Outfit', sans-serif;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 18px;
  padding-right: 30px;
  transition: border-color 0.3s;
}

#category-filter:focus {
  border-color: #e60000; /* Naranja cambiado a Rojo */
}

#filter-bar {
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 10px;
}

#category-filter {
  flex: 1;
  background: rgba(20, 20, 20, 0.9);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  text-transform: uppercase;
  font-family: 'Outfit', sans-serif;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 16px;
  padding-right: 24px;
  transition: border-color 0.3s;
}

#category-filter:focus {
  border-color: #e60000;
}

/* Toggle Switch "SOLO EN PISTA" */
.toggle-container {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #888888;
  user-select: none;
  gap: 6px;
  flex-shrink: 0;
}

.toggle-container input {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 28px;
  height: 16px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  transition: background-color 0.3s, border-color 0.3s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 2px;
  bottom: 2px;
  background-color: #888888;
  border-radius: 50%;
  transition: transform 0.3s, background-color 0.3s;
}

.toggle-container input:checked + .toggle-slider {
  background-color: rgba(46, 204, 113, 0.2);
  border-color: #2ecc71;
}

.toggle-container input:checked + .toggle-slider::before {
  transform: translateX(12px);
  background-color: #2ecc71;
}

.toggle-container input:checked ~ .toggle-label {
  color: #2ecc71;
}

/* ── Column headers ── */
#col-headers {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.4);
  font-size: 8px;
  font-weight: 800;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ch-pos { width: 22px; text-align: center; }
.ch-space { width: 2px; }
.ch-name { flex: 1; padding-left: 6px; }
.ch-laps { width: 18px; text-align: center; }
.ch-last { width: 55px; text-align: right; }
.ch-diff { width: 50px; text-align: right; }

/* ── Driver list ── */
#list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px;
  position: relative;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Scrollbar personalizado delgado y elegante */
#list::-webkit-scrollbar {
  width: 6px;
}
#list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
#list::-webkit-scrollbar-thumb {
  background: rgba(230, 0, 0, 0.35); /* Naranja cambiado a Rojo */
  border-radius: 3px;
}
#list::-webkit-scrollbar-thumb:hover {
  background: rgba(230, 0, 0, 0.7); /* Naranja cambiado a Rojo */
}

.driver {
  display: flex;
  align-items: center;
  height: 26px; /* Fila más baja y compacta */
  background: rgba(22, 22, 22, 0.85);
  position: relative;
  will-change: transform;
  transition: background 0.8s ease-out, color 0.8s ease-out;
  border-radius: 2px;
  flex-shrink: 0;
}

.driver-content {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  flex: 1;
}


/* ── Barra de progreso en pista ── */
.driver .track-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1px;
  width: 0%;
  background: linear-gradient(90deg, #e60000, #ff4444);
  box-shadow: 0 0 4px rgba(230, 0, 0, 0.6);
  border-radius: 0 1px 1px 0;
  transition: none;
  pointer-events: none;
}

/* Flash effect */
.driver.active-flash {
  transition: none !important;
  background: #ffffff !important;
  color: #000000 !important;
}

.driver.active-flash .pos {
  color: #000000 !important;
}

.driver.active-flash .name {
  color: #000000 !important;
}

.driver.active-flash .car-no-badge {
  background: rgba(0, 0, 0, 0.08) !important;
  color: #000000 !important;
  border-color: rgba(0, 0, 0, 0.2) !important;
}

.driver.active-flash .cls {
  background: rgba(0, 0, 0, 0.08) !important;
  color: rgba(0, 0, 0, 0.6) !important;
}

.driver.active-flash .val {
  color: #000000 !important;
}

.driver.active-flash .val.lead {
  color: #000000 !important;
}

/* On-track indicator */
.driver.on-track {
  border-left: 2px solid #2ecc71;
}

/* Row elements */
.driver .pos {
  width: 22px;
  text-align: center;
  font-size: 10px;
  font-weight: 900;
  color: #ffffff;
}

.driver .accent-bar {
  width: 2px;
  height: 14px;
  background: #e60000; /* Naranja cambiado a Rojo */
  flex-shrink: 0;
  border-radius: 1px;
}

.driver .name-group {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  padding-left: 5px;
  padding-right: 4px;
}

.driver .driver-text {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.driver .name-clip,
.driver .cls-clip {
  overflow: hidden;
  white-space: nowrap;
  min-width: 0;
}

.driver .name-clip {
  flex: 1 1 auto;
}

.driver .cls-clip {
  flex: 0 0 auto;
  max-width: 42px;
}

.driver .name,
.driver .cls {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
}

.driver .name {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: 0.2px;
  max-width: 100%;
}

.driver .car-no-badge {
  font-size: 8px;
  font-weight: 800;
  color: #e60000;
  background: rgba(230, 0, 0, 0.12);
  border: 1px solid rgba(230, 0, 0, 0.25);
  padding: 1px 2px;
  border-radius: 2px;
  min-width: 16px;
  text-align: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Brand logo & nation flag in tower rows */
.driver .dr-brand,
.driver .dr-nation {
  width: 12px;
  height: 12px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 1px;
}

/* Pulsating red dot for cars on track */
.driver .track-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #e60000;
  box-shadow: 0 0 5px rgba(230, 0, 0, 0.9);
  animation: trackPulse 1s ease-in-out infinite;
  flex-shrink: 0;
  margin-left: 2px;
}

@keyframes trackPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.2); }
}

.driver .cls {
  font-size: 7.5px;
  font-weight: 800;
  color: #666666;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5px 3px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  max-width: none;
}

.driver .name.marquee,
.driver .cls.marquee {
  animation: rowTextMarquee 4.8s ease-in-out infinite;
}

.driver .cls.marquee {
  animation-duration: 5.8s;
}

@keyframes rowTextMarquee {
  0%, 18% { transform: translateX(0); }
  58%, 82% { transform: translateX(calc(var(--marquee-shift, 0px) * -1)); }
  100% { transform: translateX(0); }
}

body.tower-mode-changing #wrap {
  animation: towerModeSoftSwitch 0.36s ease-out both;
}

body.tower-mode-changing .driver {
  transition: background 0.28s ease, opacity 0.28s ease, transform 0.28s ease;
}

@keyframes towerModeSoftSwitch {
  0% {
    opacity: 0.72;
    transform: translateX(-6px) scale(0.992);
    filter: brightness(0.9);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: brightness(1);
  }
}

/* F1-inspired compact tower mode */
body.tower-f1-compact #wrap {
  width: 348px;
  border-top: 3px solid #e60000;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.92);
  box-shadow: 0 18px 42px rgba(0,0,0,0.35);
}

body.tower-f1-compact #logo-row {
  padding: 7px 10px !important;
}

body.tower-f1-compact #logo-row img {
  max-height: 36px !important;
}

body.tower-f1-compact #header {
  padding: 7px 10px;
  background: rgba(0,0,0,0.72);
}

body.tower-f1-compact #event-name {
  max-width: 210px;
  color: #f2f2f2;
  font-size: 9px;
  letter-spacing: 0.35px;
}

body.tower-f1-compact #session-name {
  color: #8d8d8d;
  font-size: 7.5px;
}

body.tower-f1-compact .live-badge {
  font-size: 8px;
  letter-spacing: 0.7px;
}

body.tower-f1-compact #weather-bar {
  min-height: 22px;
  padding: 4px 8px;
  gap: 9px;
  background: rgba(255,255,255,0.035);
}

body.tower-f1-compact #col-headers {
  padding: 4px 6px;
  color: #777;
  background: rgba(0,0,0,0.55);
  letter-spacing: 0.35px;
}

body.tower-f1-compact .ch-pos { width: 23px; }
body.tower-f1-compact .ch-space { width: 2px; }
body.tower-f1-compact .ch-name { padding-left: 8px; }
body.tower-f1-compact .ch-laps { width: 22px; }
body.tower-f1-compact .ch-last { width: 48px; }
body.tower-f1-compact .ch-diff { width: 48px; }

body.tower-f1-compact #list {
  gap: 1px;
  padding: 2px 3px 3px;
}

body.tower-f1-compact .driver {
  height: 28px;
  border-radius: 3px;
  background: rgba(20, 20, 20, 0.94);
  border-left: 0;
}

body.tower-f1-compact .driver:nth-child(even) {
  background: rgba(28, 28, 28, 0.94);
}

body.tower-f1-compact .driver.on-track {
  border-left: 2px solid #2ecc71;
}

body.tower-f1-compact .driver .accent-bar,
body.tower-f1-compact .driver .dr-brand,
body.tower-f1-compact .driver .dr-nation,
body.tower-f1-compact .driver .track-dot,
body.tower-f1-compact .driver .cls-clip,
body.tower-f1-compact .driver .val.adv,
body.tower-f1-compact .driver .sector-dots {
  display: none !important;
}

body.tower-f1-compact .driver .pos {
  width: 23px;
  font-size: 10px;
  color: #dcdcdc;
  background: rgba(0,0,0,0.35);
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.tower-f1-compact .driver .name-group {
  padding-left: 7px;
  padding-right: 6px;
  gap: 5px;
}

body.tower-f1-compact .driver .car-no-badge {
  min-width: 22px;
  padding: 1px 4px;
  color: #ffffff;
  background: #e60000;
  border-color: #e60000;
  border-radius: 2px;
  font-size: 8px;
}

body.tower-f1-compact .driver .name {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

body.tower-f1-compact .driver .val {
  font-size: 9.5px;
  font-weight: 800;
}

body.tower-f1-compact .driver .val.laps {
  width: 22px;
  color: #8f8f8f;
}

body.tower-f1-compact .driver .val.last {
  width: 48px;
  color: #ffffff;
}

body.tower-f1-compact .driver .val.last.pit {
  color: #111;
  background: #f1c40f;
  border-radius: 3px;
  padding: 1px 4px;
  text-align: center;
  width: 34px;
  margin-left: 6px;
  margin-right: 8px;
}

body.tower-f1-compact .driver .val.diff {
  width: 48px;
  padding-right: 5px;
  color: #e60000;
}

body.tower-f1-compact .driver .val.diff.lead {
  color: #2ecc71;
  font-size: 8px;
  letter-spacing: 0.2px;
}

body.tower-f1-compact .driver .track-progress-bar {
  height: 0;
}

/* F1 Compact keeps only the fastest readable race tower */
body.tower-f1-compact:not(.tower-f1-timing) .ch-laps,
body.tower-f1-compact:not(.tower-f1-timing) .ch-last,
body.tower-f1-compact:not(.tower-f1-timing) .driver .val.laps,
body.tower-f1-compact:not(.tower-f1-timing) .driver .val.last {
  display: none !important;
}

body.tower-f1-compact:not(.tower-f1-timing) #wrap {
  width: 318px;
}

body.tower-f1-compact:not(.tower-f1-timing) .ch-diff {
  width: 54px;
}

body.tower-f1-compact:not(.tower-f1-timing) .driver .val.diff {
  width: 54px;
  font-size: 10px;
}

body.tower-f1-compact:not(.tower-f1-timing) .driver .name {
  font-size: 10.2px;
}

body.tower-f1-compact:not(.tower-f1-timing) .driver {
  height: 27px;
}

/* F1 Data mode: compact visual language with extra telemetry context */
body.tower-f1-data #wrap {
  width: 392px;
  border-top: 3px solid #e60000;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.92);
  box-shadow: 0 18px 42px rgba(0,0,0,0.35);
}

body.tower-f1-data #logo-row {
  padding: 7px 10px !important;
}

body.tower-f1-data #logo-row img {
  max-height: 36px !important;
}

body.tower-f1-data #header {
  padding: 7px 10px;
  background: rgba(0,0,0,0.72);
}

body.tower-f1-data #event-name {
  max-width: 240px;
  color: #f2f2f2;
  font-size: 9px;
  letter-spacing: 0.35px;
}

body.tower-f1-data #session-name {
  color: #8d8d8d;
  font-size: 7.5px;
}

body.tower-f1-data .live-badge {
  font-size: 8px;
  letter-spacing: 0.7px;
}

body.tower-f1-data #weather-bar {
  min-height: 22px;
  padding: 4px 8px;
  gap: 9px;
  background: rgba(255,255,255,0.035);
}

body.tower-f1-data #col-headers {
  padding: 4px 6px;
  color: #777;
  background: rgba(0,0,0,0.55);
  letter-spacing: 0.35px;
}

body.tower-f1-data .ch-pos { width: 23px; }
body.tower-f1-data .ch-space { width: 2px; }
body.tower-f1-data .ch-name { padding-left: 8px; }
body.tower-f1-data .ch-laps { width: 22px; }
body.tower-f1-data .ch-last { width: 48px; }
body.tower-f1-data .ch-diff { width: 48px; padding-right: 28px; }

body.tower-f1-data #list {
  gap: 1px;
  padding: 2px 3px 3px;
}

body.tower-f1-data .driver {
  height: 28px;
  border-radius: 3px;
  background: rgba(20, 20, 20, 0.94);
  border-left: 0;
}

body.tower-f1-data .driver:nth-child(even) {
  background: rgba(28, 28, 28, 0.94);
}

body.tower-f1-data .driver.on-track {
  border-left: 2px solid #2ecc71;
}

body.tower-f1-data .driver .accent-bar,
body.tower-f1-data .driver .track-dot,
body.tower-f1-data .driver .val.adv {
  display: none !important;
}

body.tower-f1-data .driver .pos {
  width: 23px;
  font-size: 10px;
  color: #dcdcdc;
  background: rgba(0,0,0,0.35);
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.tower-f1-data .driver .name-group {
  padding-left: 6px;
  padding-right: 5px;
  gap: 4px;
}

body.tower-f1-data .driver .car-no-badge {
  min-width: 22px;
  padding: 1px 4px;
  color: #ffffff;
  background: #e60000;
  border-color: #e60000;
  border-radius: 2px;
  font-size: 8px;
}

body.tower-f1-data .driver .dr-brand,
body.tower-f1-data .driver .dr-nation {
  width: 11px;
  height: 11px;
}

body.tower-f1-data .driver .driver-text {
  gap: 3px;
}

body.tower-f1-data .driver .name {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0;
}

body.tower-f1-data .driver .cls-clip {
  max-width: 36px;
}

body.tower-f1-data .driver .cls {
  font-size: 7px;
  color: #a8a8a8;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.07);
}

body.tower-f1-data .driver .val {
  font-size: 9.2px;
  font-weight: 800;
}

body.tower-f1-data .driver .val.laps {
  width: 22px;
  color: #8f8f8f;
}

body.tower-f1-data .driver .val.last {
  width: 48px;
  color: #ffffff;
}

body.tower-f1-data .driver .val.last.pit {
  color: #111;
  background: #f1c40f;
  border-radius: 3px;
  padding: 1px 4px;
  text-align: center;
  width: 34px;
  margin-left: 6px;
  margin-right: 8px;
}

body.tower-f1-data .driver .val.diff {
  width: 48px;
  padding-right: 4px;
  color: #e60000;
}

body.tower-f1-data .driver .val.diff.lead {
  color: #2ecc71;
  font-size: 8px;
  letter-spacing: 0.2px;
}

body.tower-f1-data .driver .sector-dots {
  display: flex;
  width: 24px;
  gap: 2px;
  margin-right: 3px;
  flex-shrink: 0;
}

body.tower-f1-data .driver .sd {
  width: 5px;
  height: 5px;
}

body.tower-f1-data .driver .track-progress-bar {
  height: 0;
}

.driver .val {
  font-size: 9.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.driver .val.laps {
  width: 18px;
  text-align: center;
  color: #888888;
}

.driver .val.last {
  width: 55px;
  text-align: right;
  padding-right: 2px;
}

.driver .val.diff {
  width: 50px;
  text-align: right;
  padding-right: 4px;
}

.driver .val.adv {
  min-width: 18px;
  text-align: center;
  font-weight: 800;
  font-size: 8px;
  flex-shrink: 0;
  padding: 1px 4px;
  border-radius: 3px;
  margin: 0 2px;
  line-height: 1.2;
}
.val.adv-up {
  color: #fff;
  background: #2ecc71;
}
.val.adv-down {
  color: #fff;
  background: #e60000;
}
.val.adv-eq {
  color: #fff;
  background: rgba(255,255,255,0.15);
}

/* Color coding */
.val.yellow { color: #f1c40f; }
.val.lead { color: #2ecc71; font-weight: 900; }
.val.gap { color: #e60000; } /* Naranja cambiado a Rojo */

.no-data {
  padding: 30px;
  text-align: center;
  color: #555555;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

@keyframes rowEnter {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.driver.entering {
  animation: rowEnter 0.4s ease-out forwards;
}

.driver.spotlight-active {
  background: rgba(230, 0, 0, 0.25) !important;
  box-shadow: inset 0 0 10px rgba(230, 0, 0, 0.3);
}
.driver.spotlight-active .name {
  color: #ffdd00 !important;
  font-weight: 900;
}
.driver.spotlight-active .car-no-badge {
  border-color: #ffdd00 !important;
  color: #ffdd00 !important;
}
/* ── Track Map Overlay ── */
#track-map-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 4px solid #e60000;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  backdrop-filter: blur(15px);
  z-index: 150;
  width: 750px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
}
#track-map-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* ── Standalone Fastest Lap Overlay ── */
#fastest-lap-overlay {
  position: absolute;
  bottom: 40px;
  right: 40px;
  display: flex;
  flex-direction: column;
  z-index: 100;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none;
}
#fastest-lap-overlay.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.flo-header {
  background: linear-gradient(135deg, #e60000, #b30000);
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px 4px 0 0;
  width: fit-content;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 5px;
}
.flo-body {
  display: flex;
  align-items: stretch;
  background: rgba(12, 12, 12, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 4px 4px 4px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  transition: border-color 0.5s ease;
}
.flo-no {
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #e60000;
  color: #ff3333;
  font-size: 14px;
  font-weight: 950;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 8px rgba(255, 51, 51, 0.2);
}
.flo-name {
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  letter-spacing: 0.8px;
}
.flo-time {
  background: rgba(46, 204, 113, 0.12);
  border-left: 1px solid rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  font-size: 14px;
  font-weight: 950;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 8px rgba(46, 204, 113, 0.2);
}

@keyframes floBodyFlash {
  0% { border-color: #f1c40f; box-shadow: 0 0 20px rgba(241, 196, 15, 0.6); }
  50% { border-color: #f1c40f; box-shadow: 0 0 20px rgba(241, 196, 15, 0.6); }
  100% { border-color: rgba(255, 255, 255, 0.08); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
}
.flo-body.flash-active {
  animation: floBodyFlash 2.5s ease-out;
}

/* ── Standalone Laps Header Overlay ── */
#laps-header-overlay {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  display: flex;
  align-items: stretch;
  z-index: 120;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  height: 32px;
}
#laps-header-overlay.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.lh-session {
  background: rgba(12, 12, 12, 0.95);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0 16px;
  display: flex;
  align-items: center;
  letter-spacing: 1px;
  white-space: nowrap;
}
.lh-laps {
  background: #e60000;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ── Final Results Overlay ── */
#results-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(10, 10, 10, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 4px solid #e60000;
  border-radius: 8px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(15px);
  z-index: 160;
  width: 820px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
}
#results-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.ro-top-bar {
  background: #1a1a1a;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.ro-logo {
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
  margin: 0 auto;
}
.ro-header-row {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  background: #0f0f0f;
  border-bottom: 2px solid #e60000;
}
.ro-session-title {
  flex: 1;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
}
.ro-status-badge {
  background: #e60000;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  letter-spacing: 1px;
}
.ro-table-container {
  padding: 15px 24px;
  flex: 1;
}
.ro-table {
  width: 100%;
  border-collapse: collapse;
}
.ro-table th {
  font-size: 10px;
  font-weight: 800;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ro-table td {
  padding: 8px 8px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}
.ro-table tr:last-child td {
  border-bottom: none;
}
.ro-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.01);
}
.ro-row {
  opacity: 0;
  animation: roRowFadeIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes roRowFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.ro-col-pos { width: 50px; text-align: center; color: #888; font-weight: 800; font-size: 13px; }
.ro-col-auto { width: 60px; text-align: center; }
.ro-auto-badge {
  background: rgba(230, 0, 0, 0.1);
  border: 1px solid #e60000;
  color: #e60000;
  font-size: 10px;
  font-weight: 950;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  min-width: 34px;
}
.ro-col-pilot { text-transform: uppercase; color: #fff; font-weight: 800; font-size: 13px; }
.ro-col-class { width: 100px; text-align: left; color: #888; text-transform: uppercase; font-size: 11px; }
.ro-col-laps { width: 80px; text-align: center; color: #aaa; }
.ro-col-time { width: 120px; text-align: right; color: #2ecc71; font-weight: 800; font-size: 13px; }
.ro-col-diff { width: 100px; text-align: right; color: #f1c40f; font-weight: 800; font-size: 13px; }
.ro-col-diff.lead { color: #888; }

.ro-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #090909;
  padding: 12px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.ro-track-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ro-track-name {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
}
.ro-track-city {
  font-size: 10px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ro-fastest-lap-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px 12px;
  border-radius: 4px;
}
.ro-fl-lbl {
  font-size: 9px;
  font-weight: 800;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ro-fl-auto {
  background: rgba(230, 0, 0, 0.12);
  border: 1px solid #e60000;
  color: #e60000;
  font-size: 10px;
  font-weight: 950;
  padding: 2px 6px;
  border-radius: 3px;
}
.ro-fl-name {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
}
.ro-fl-time {
  font-size: 11px;
  font-weight: 900;
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
}
.tm-top-bar {
  background: linear-gradient(90deg, #1e1e1e, #111111);
  color: #aaaaaa;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.tm-header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.tm-track-name {
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  background: #e60000;
  padding: 4px 14px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(230, 0, 0, 0.3);
}
.tm-body {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  min-height: 350px;
  max-height: 60vh;
}
.tm-body img {
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
  transition: transform 0.3s ease;
}
.tm-body img:hover {
  transform: scale(1.02);
}

/* ── License Watermark ── */
#license-watermark {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(230,0,0,0.85);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 6px 14px;
  border-radius: 4px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  text-transform: uppercase;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
#license-watermark.show {
  opacity: 1;
  transform: translateY(0);
}

/* ── License Block Screen ── */
#license-block {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
#license-block.show {
  opacity: 1;
  pointer-events: auto;
}
.lb-card {
  background: rgba(20,20,20,0.95);
  border: 1px solid rgba(230,0,0,0.3);
  border-radius: 12px;
  padding: 40px 50px;
  text-align: center;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}
.lb-icon { font-size: 40px; margin-bottom: 12px; }
.lb-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #e60000;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.lb-message {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 16px;
}
.lb-hint {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
}
.lb-footer {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #e60000;
  letter-spacing: 0.5px;
}

/* ── Session Timer Overlay ── */
#session-timer-overlay {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10,10,10,0.88);
  border-left: 4px solid #e60000;
  border-radius: 6px;
  padding: 8px 20px;
  pointer-events: none;
  z-index: 85;
  opacity: 0;
  transition: opacity 0.4s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
#session-timer-overlay.show { opacity: 1; }
.st-label {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #e60000;
  text-transform: uppercase;
  letter-spacing: 2px;
  white-space: nowrap;
}
.st-time {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
  line-height: 1;
}

/* ── Grid Overlay (Parrilla de Largada) ── */
#grid-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(10, 10, 10, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 4px solid #e60000;
  border-radius: 8px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(15px);
  z-index: 84;
  width: 600px;
  max-width: 85vw;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  max-height: 80vh;
}
#grid-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.grid-top-bar {
  background: #1a1a1a;
  padding: 6px 16px;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #aaa;
}
.grid-header-row {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  background: #0f0f0f;
  border-bottom: 2px solid #e60000;
}
.grid-session-title {
  flex: 1;
  padding: 12px 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
}
.grid-status-badge {
  background: #e60000;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  letter-spacing: 1px;
}
.grid-table-container {
  padding: 12px 20px;
  flex: 1;
  overflow-y: auto;
}
.grid-table {
  width: 100%;
  border-collapse: collapse;
}
.grid-table th {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.grid-table td {
  padding: 7px 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
  color: #ccc;
}
.grid-table tr:last-child td { border-bottom: none; }
.grid-table tr:nth-child(even) td { background: rgba(255, 255, 255, 0.01); }
.grid-table .grid-pos-col {
  color: #e60000;
  font-weight: 900;
  width: 30px;
}
.grid-table .grid-no-col {
  color: #e60000;
  font-weight: 800;
  width: 40px;
}
.grid-table .grid-name-col {
  color: #fff;
  font-weight: 700;
}
.grid-table .grid-cls-col {
  color: #888;
  font-weight: 600;
  width: 50px;
  text-align: center;
}

/* ── Sector Indicators in Tower Rows ── */
.sector-dots {
  display: inline-flex;
  gap: 2px;
  margin-left: 3px;
  vertical-align: middle;
}
.sd {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  display: inline-block;
  background: #444;
}
.sd.purple { background: #aa66ff; }
.sd.green { background: #2ecc71; }
.sd.red { background: #e60000; }

/* ── Best Sectors Overlay ── */
#best-sectors-overlay {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  background: rgba(15,15,15,0.92);
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 4px solid #e60000;
  border-radius: 6px;
  padding: 10px 20px;
  z-index: 95;
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
#best-sectors-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  animation: fadeInUp 0.4s ease forwards;
}
.bso-title {
  font-size: 10px;
  font-weight: 800;
  color: #e60000;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.bso-sectors {
  display: flex;
  gap: 16px;
}
.bso-sector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 100px;
}
.bso-label {
  font-size: 9px;
  font-weight: 900;
  color: #e60000;
  text-transform: uppercase;
}
.bso-time {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
}
.bso-driver {
  font-size: 9px;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
}

/* ── Top 10 Avances Overlay ── */
#advances-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  z-index: 90;
  transition: opacity 0.4s ease, transform 0.4s ease;
  background: rgba(10,10,10,0.93);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 16px 20px;
  min-width: 360px;
}
#advances-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  animation: fadeInScale 0.35s ease forwards;
}
.ao-top-bar {
  font-size: 12px;
  font-weight: 900;
  color: #e60000;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 10px;
}
.ao-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}
.ao-table th {
  color: #888;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.ao-table th:first-child { width: 30px; text-align: center; }
.ao-table th:nth-child(2) { width: 35px; text-align: center; }
.ao-table th:last-child { width: 50px; text-align: center; }
.ao-table td {
  padding: 4px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: #fff;
  font-weight: 600;
}
.ao-table td:first-child { text-align: center; color: #888; }
.ao-table td:nth-child(2) { text-align: center; font-weight: 900; color: #e60000; }
.ao-table td:last-child { text-align: center; }
.ao-adv-up { color: #2ecc71 !important; font-weight: 800; }
.ao-adv-down { color: #e60000 !important; font-weight: 800; }
.ao-adv-eq { color: #888 !important; }

/* ── Pilot Action Overlay ── */
#pilot-action-overlay {
  position: absolute;
  top: 80px;
  right: 30px;
  opacity: 0;
  pointer-events: none;
  z-index: 90;
  transition: opacity 0.3s ease;
}
#pilot-action-overlay.show {
  opacity: 1;
  pointer-events: auto;
  animation: slideInRight 0.35s ease forwards;
}
.pa-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15,15,15,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 4px solid #e60000;
  border-radius: 6px;
  padding: 10px 16px;
}
.pa-action {
  font-size: 9px;
  font-weight: 900;
  color: #e60000;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-right: 10px;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.pa-number {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  background: #e60000;
  padding: 1px 8px;
  border-radius: 3px;
}
.pa-name {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
}
.pa-cls {
  font-size: 10px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
}

/* ── Crawl Superior ── */
#crawl-superior {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 34px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 105;
  background: rgba(0,0,0,0.85);
  border-bottom: 2px solid #e60000;
  transition: opacity 0.4s ease;
}
#crawl-superior.show {
  opacity: 1;
  pointer-events: auto;
  animation: slideDown 0.35s ease forwards;
}
.crawl-track {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  will-change: transform;
}
.crawl-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 29px;
  font-size: 13.2px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
}
.crawl-item .ci-pos {
  color: #888;
  font-weight: 600;
  min-width: 20px;
}
.crawl-item .ci-no {
  color: #e60000;
  font-weight: 900;
}

@keyframes crawl-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes slideInRight {
  0% { opacity: 0; transform: translateX(30px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes slideDown {
  0% { opacity: 0; transform: translateY(-100%); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── Sponsors Overlay ── */
#sponsors-overlay {
  position: absolute;
  bottom: 40px;
  right: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.4s ease;
}
#sponsors-overlay.show {
  opacity: 1;
  pointer-events: auto;
  animation: fadeInUp 0.4s ease forwards;
}
.sp-bar {
  display: none;
}
.sp-track {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-img {
  max-height: 60px;
  max-width: 220px;
  object-fit: contain;
  border-radius: 4px;
}

/* ─────────────────────────────────────────────────────────────
   Broadcast visual system — motorsport / F1-inspired
   Changes only component presentation; OBS canvas geometry stays intact.
   ───────────────────────────────────────────────────────────── */
:root {
  --broadcast-red: #ff1801;
  --broadcast-red-dark: #b20d00;
  --broadcast-ink: rgba(7, 8, 10, 0.96);
  --broadcast-panel: rgba(17, 19, 22, 0.96);
  --broadcast-panel-2: rgba(27, 29, 33, 0.96);
  --broadcast-line: rgba(255, 255, 255, 0.12);
  --broadcast-muted: #8d929a;
  --broadcast-green: #35d07f;
  --broadcast-purple: #b46cff;
  --broadcast-yellow: #ffd21f;
}

body {
  font-family: "Bahnschrift", "Arial Narrow", "Outfit", sans-serif;
  font-stretch: condensed;
}

.obs-svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.obs-icon {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.obs-icon-lg {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}

/* Timing tower */
#wrap {
  background: linear-gradient(145deg, rgba(7,8,10,.97), rgba(19,21,24,.94));
  border: 1px solid var(--broadcast-line);
  border-top: 0;
  border-left: 0;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0,0,0,.62), inset 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(14px) saturate(115%);
}

#wrap::before {
  content: "";
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  width: 86px;
  height: 3px;
  background: var(--broadcast-red);
  box-shadow: 86px 0 rgba(255,24,1,.45), 172px 0 rgba(255,24,1,.14);
  pointer-events: none;
}

#header {
  min-height: 38px;
  padding: 8px 11px 7px;
  background: linear-gradient(90deg, #0a0b0d 0%, #17191c 100%);
  border-bottom-color: var(--broadcast-line);
}

#event-name {
  color: #f5f6f7;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .55px;
}

#session-name {
  margin-top: 1px;
  color: var(--broadcast-red);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1.25px;
}

.live-badge {
  padding: 4px 7px 4px 6px;
  color: #fff;
  background: var(--broadcast-red);
  border-radius: 2px;
  font-size: 7px;
  letter-spacing: .9px;
  box-shadow: 0 0 14px rgba(255,24,1,.22);
}

.live-dot {
  width: 5px;
  height: 5px;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,.18);
}

#col-headers {
  min-height: 22px;
  padding: 5px 7px;
  color: #777d86;
  background: #090a0c;
  border-bottom-color: rgba(255,255,255,.09);
  font-size: 7px;
  letter-spacing: 1px;
}

#list {
  gap: 1px;
  padding: 2px 3px 3px;
  background: rgba(0,0,0,.28);
}

.driver {
  height: 29px;
  background: linear-gradient(90deg, rgba(31,33,37,.98), rgba(18,20,23,.98));
  border-radius: 1px 4px 4px 1px;
  border: 1px solid rgba(255,255,255,.025);
}

.driver:nth-child(even) {
  background: linear-gradient(90deg, rgba(24,26,30,.98), rgba(13,15,18,.98));
}

.driver::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 7px;
  height: 100%;
  background: linear-gradient(135deg, transparent 48%, rgba(255,255,255,.045) 49%);
  pointer-events: none;
}

.driver .pos {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  color: #f6f6f6;
  background: rgba(0,0,0,.38);
  font-size: 10px;
}

.driver .accent-bar {
  width: 3px;
  height: 100%;
  border-radius: 0;
  background: var(--broadcast-red);
}

.driver .car-no-badge {
  min-width: 22px;
  padding: 2px 4px;
  color: #fff;
  background: var(--broadcast-red);
  border: 0;
  border-radius: 1px 4px 1px 4px;
  font-size: 8px;
  box-shadow: inset -7px 0 rgba(0,0,0,.10);
}

.driver .name {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .25px;
}

.driver .cls {
  color: #a1a5ab;
  background: rgba(255,255,255,.07);
  border-radius: 1px;
}

.driver.on-track {
  border-left: 2px solid var(--broadcast-green);
  box-shadow: inset 5px 0 12px rgba(53,208,127,.08);
}

.driver.spotlight-active {
  background: linear-gradient(90deg, rgba(255,24,1,.34), rgba(22,22,24,.98) 72%) !important;
  box-shadow: inset 0 0 0 1px rgba(255,24,1,.5), 0 0 16px rgba(255,24,1,.12);
}

.driver .track-progress-bar {
  height: 2px;
  background: linear-gradient(90deg, var(--broadcast-red-dark), var(--broadcast-red), #ff7c6c);
}

#weather-bar,
#fastest-bar,
#footer-bar {
  background: rgba(8,9,11,.94);
}

#weather-bar.show {
  border-bottom-color: var(--broadcast-line);
}

#weather-bar .weather-humidity,
#weather-bar .weather-wind,
#weather-bar .weather-track,
#weather-bar .weather-time,
.wz-humidity,
.wz-wind,
.wz-track,
.wz-time {
  align-items: center;
  gap: 4px;
}

#fastest-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--broadcast-purple);
}

#fastest-info {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* Lower thirds and telemetry cards */
#zocalo,
#spotlight,
#weather-zocalo,
#race-control-overlay,
#comment-feed-overlay,
#session-timer-overlay,
#best-sectors-overlay,
#pilot-action-overlay .pa-box {
  background: linear-gradient(105deg, var(--broadcast-ink), var(--broadcast-panel));
  border: 1px solid var(--broadcast-line);
  border-left: 4px solid var(--broadcast-red);
  border-radius: 2px 9px 2px 2px;
  box-shadow: 0 16px 38px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(14px) saturate(120%);
}

#zocalo::before {
  background: linear-gradient(180deg, var(--broadcast-red), var(--broadcast-red-dark));
}

#zocalo .z-name,
#spotlight .s-name,
.pa-name {
  color: #fff;
  font-weight: 900;
  letter-spacing: .25px;
}

#zocalo .z-role,
#spotlight .s-cls,
.pa-cls {
  color: var(--broadcast-muted);
  letter-spacing: 1px;
}

#spotlight .s-number,
.pa-number {
  color: #fff;
  background: var(--broadcast-red);
  border-radius: 1px 5px 1px 5px;
}

#spotlight .s-right {
  background: rgba(0,0,0,.22);
  border-left-color: var(--broadcast-line);
}

#spotlight .s-sector {
  background: rgba(255,255,255,.035);
  border-right-color: var(--broadcast-line);
}

#weather-zocalo .wz-temp {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

#weather-zocalo .wz-right {
  border-left-color: var(--broadcast-line);
}

/* Alerts, race control and timers */
#race-control-overlay {
  overflow: hidden;
  border-left: 0;
  border-top: 3px solid var(--broadcast-red);
}

.rc-title,
.cf-label,
.st-label,
.bso-title,
.pa-action {
  color: var(--broadcast-red);
  letter-spacing: 1.6px;
}

.rc-title {
  position: relative;
  color: #fff;
  background: linear-gradient(90deg, var(--broadcast-red), var(--broadcast-red-dark));
  border-right: 8px solid #090a0c;
}

.rc-text,
.cf-text {
  color: #fff;
  font-weight: 800;
}

#countdown-overlay .cd-title-box {
  color: #fff;
  background: linear-gradient(105deg, var(--broadcast-red), var(--broadcast-red-dark));
  border-radius: 2px 0 0 2px;
  clip-path: polygon(0 0, 93% 0, 100% 50%, 93% 100%, 0 100%);
  padding-right: 26px;
}

#countdown-overlay .cd-value-box {
  color: #fff;
  background: var(--broadcast-ink);
  border-color: var(--broadcast-line);
  border-radius: 0 7px 2px 0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(255,255,255,.16);
}

#session-timer-overlay {
  border-left-color: var(--broadcast-red);
  padding: 9px 22px 8px;
}

.st-time {
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}

#penalty-overlay {
  background: linear-gradient(100deg, #ffd21f, #f0aa00);
  color: #080808;
  border: 0;
  border-left: 6px solid #080808;
  border-radius: 2px 8px 2px 2px;
  box-shadow: 0 16px 36px rgba(0,0,0,.56);
}

.penalty-icon {
  display: flex;
  color: #080808;
}

.penalty-text {
  font-weight: 900;
  letter-spacing: .5px;
}

.flo-flag-box {
  background: var(--broadcast-ink);
  border: 1px solid var(--broadcast-line);
  border-left-width: 7px;
  border-radius: 2px 8px 2px 2px;
  box-shadow: 0 14px 34px rgba(0,0,0,.55);
  letter-spacing: 1.5px;
}

/* Event identity and comparison */
#event-badge-overlay {
  background: linear-gradient(105deg, rgba(7,8,10,.98), rgba(26,28,32,.96));
  border: 1px solid var(--broadcast-line);
  border-radius: 2px 12px 2px 2px;
  box-shadow: 0 18px 42px rgba(0,0,0,.58);
}

.eb-accent-stripe {
  background: linear-gradient(180deg, var(--broadcast-red), var(--broadcast-red-dark));
}

.eb-logo-block {
  background: rgba(255,255,255,.035);
}

.eb-logo-fallback {
  display: flex;
  color: var(--broadcast-red);
}

.eb-event-label {
  color: var(--broadcast-red);
}

.eb-title {
  font-weight: 900;
  letter-spacing: .2px;
}

.sbs-title,
.battle-title-bar {
  background: linear-gradient(90deg, var(--broadcast-red), var(--broadcast-red-dark));
  color: #fff;
  border-radius: 3px 3px 0 0;
  letter-spacing: 1.4px;
}

.sbs-card,
.battle-card {
  background: linear-gradient(115deg, var(--broadcast-panel-2), var(--broadcast-ink));
  border-color: var(--broadcast-line);
  border-radius: 8px;
}

.sbs-no,
.battle-num {
  color: #fff;
  background: var(--broadcast-red);
  border-radius: 3px;
}

.sbs-stat {
  background: rgba(255,255,255,.035);
  border-top-color: var(--broadcast-line);
}

/* Full-screen data cards */
#results-overlay,
#grid-overlay,
#track-map-overlay,
#advances-overlay {
  background: linear-gradient(145deg, rgba(7,8,10,.985), rgba(23,25,29,.975));
  border: 1px solid var(--broadcast-line);
  border-top: 4px solid var(--broadcast-red);
  border-radius: 2px 12px 2px 2px;
  box-shadow: 0 28px 70px rgba(0,0,0,.72), inset 0 1px rgba(255,255,255,.045);
  backdrop-filter: blur(18px) saturate(120%);
}

.ro-top-bar,
.grid-top-bar,
.tm-top-bar,
.ao-top-bar {
  color: #b8bcc2;
  background: linear-gradient(90deg, #090a0c, #1c1e22);
  border-bottom-color: var(--broadcast-line);
  letter-spacing: 2px;
}

.ro-header-row,
.grid-header-row,
.tm-header-row {
  background: rgba(0,0,0,.28);
  border-bottom-color: var(--broadcast-red);
}

.ro-session-title,
.grid-session-title,
.tm-track-name {
  font-weight: 900;
  letter-spacing: .5px;
}

.ro-status-badge,
.grid-status-badge,
.tm-track-name {
  color: #fff;
  background: linear-gradient(105deg, var(--broadcast-red), var(--broadcast-red-dark));
  border-radius: 0;
  box-shadow: none;
}

.ro-table th,
.grid-table th,
.ao-table th {
  color: #7d828a;
  background: rgba(0,0,0,.2);
  border-bottom-color: var(--broadcast-line);
  letter-spacing: 1.1px;
}

.ro-table td,
.grid-table td,
.ao-table td {
  border-bottom-color: rgba(255,255,255,.055);
  font-variant-numeric: tabular-nums;
}

.ro-table tr:nth-child(even) td,
.grid-table tr:nth-child(even) td,
.ao-table tr:nth-child(even) td {
  background: rgba(255,255,255,.025);
}

.ro-auto-badge,
.ro-fl-auto {
  color: #fff;
  background: var(--broadcast-red);
  border: 0;
  border-radius: 1px 4px 1px 4px;
}

.ro-col-time,
.ro-fl-time {
  color: var(--broadcast-purple);
  background: rgba(180,108,255,.1);
}

.ro-footer-row {
  background: #08090b;
  border-top-color: var(--broadcast-line);
}

/* Bottom ticker and sectors */
#mini-laps-overlay {
  background: linear-gradient(90deg, #08090b, #1a1c20 45%, #08090b);
  border-top: 3px solid var(--broadcast-red);
  box-shadow: 0 -12px 32px rgba(0,0,0,.45);
}

.ml-info {
  background: linear-gradient(105deg, var(--broadcast-red), var(--broadcast-red-dark));
  clip-path: polygon(0 0, 91% 0, 100% 50%, 91% 100%, 0 100%);
  padding-right: 24px;
}

.ml-pilot {
  border-right-color: var(--broadcast-line);
}

.ml-num {
  color: #fff;
  background: var(--broadcast-red);
  border-radius: 1px 4px 1px 4px;
}

#best-sectors-overlay {
  border-left-color: var(--broadcast-purple);
}

.bso-title,
.bso-label {
  color: var(--broadcast-purple);
}

.bso-sector {
  padding: 3px 12px;
  background: rgba(180,108,255,.06);
  border-right: 1px solid rgba(180,108,255,.22);
}

.bso-sector:last-child {
  border-right: 0;
}

#crawl-superior {
  background: linear-gradient(90deg, #07080a, #1d1f23 50%, #07080a);
  border-bottom: 3px solid var(--broadcast-red);
  box-shadow: 0 8px 26px rgba(0,0,0,.45);
}

.crawl-item .ci-no {
  color: #fff;
  background: var(--broadcast-red);
  padding: 2px 6px;
  border-radius: 1px 4px 1px 4px;
}

/* Motion tuned for broadcast cuts */
@media (prefers-reduced-motion: no-preference) {
  #wrap.show,
  #zocalo.show,
  #spotlight.show,
  #weather-zocalo.show,
  #event-badge-overlay.show,
  #race-control-overlay.show,
  #countdown-overlay.show,
  #side-by-side-overlay.show,
  #penalty-overlay.show,
  #comment-feed-overlay.show,
  #flag-overlay.show,
  #best-sectors-overlay.show,
  #pilot-action-overlay.show {
    animation-duration: .38s;
    animation-timing-function: cubic-bezier(.2,.75,.2,1);
  }
}
.view-rehearsal > :not(#zocalo, #side-by-side-overlay) { display: none !important; }
.view-layout > [hidden] { display: none !important; }
.view-layout * { animation: none !important; transition: none !important; }

