/* =======================================================
   F1 FORMULA 1 - MINIMALIST PREDICTIONS OVERLAY
   Estilo: Ultra-clean, minimalista y elegante (Broadcast F1)
   Alineación: Pegado a la derecha, fuentes grandes y nítidas
   ======================================================= */

.prediction-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex !important;
  opacity: 0;
  pointer-events: none;
  z-index: 99999;
  overflow: hidden;
  transition: opacity 0.3s ease-out;
}

.prediction-overlay.show {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.prediction-overlay.hiding {
  opacity: 0 !important;
}

.prediction-hud-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* ═══════════════════════════════════════════
   PANEL CONTENEDOR F1 (Pegado a la derecha)
   ═══════════════════════════════════════════ */
.prediction-hud-core {
  position: absolute;
  right: 20px; /* Bien pegado al borde derecho */
  top: 56%;
  transform: translateY(-50%);
  width: min(680px, 92vw);
  background: rgba(15, 16, 20, 0.99);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  z-index: 10;
  overflow: hidden;
  font-family: var(--font-f1turbo, "Formula1", "Titillium Web", sans-serif);
  color: var(--f1-white, #ffffff);
}

/* ═══════════════════════════════════════════
   1. STATUS BAR (Race Header Strip)
   ═══════════════════════════════════════════ */
.prediction-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--f1-black, #0f1014);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
  color: var(--f1-gray-300, #8c8c8c);
}

.prediction-status-bar .network-activity {
  display: flex;
  gap: 5px;
  align-items: center;
}

.prediction-status-bar .net-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #333;
}

.prediction-status-bar .net-led.rx {
  background: var(--f1-green, #00d2be);
  box-shadow: 0 0 6px var(--f1-green, #00d2be);
}

.prediction-status-bar .net-led.tx {
  background: var(--f1-red, #d80d0d);
  box-shadow: 0 0 6px var(--f1-red, #d80d0d);
}

.prediction-status-title {
  color: var(--f1-white, #ffffff);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 12px;
}

.prediction-status-divider {
  color: rgba(255, 255, 255, 0.2);
}

.prediction-status-code {
  margin-left: auto;
  color: var(--f1-red, #d80d0d);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════
   2. HEADER MINIMALISTA (Tag + Timer Grande)
   ═══════════════════════════════════════════ */
.prediction-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 8px 24px;
  background: transparent;
}

.prediction-hud-tag {
  font-size: 13px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  color: var(--f1-red, #d80d0d);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.prediction-hud-timer {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.prediction-timer-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--f1-gray-300, #8c8c8c);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.prediction-timer-val {
  font-family: "Formula1", sans-serif;
  font-size: 30px; /* Cronómetro grande y nítido */
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  letter-spacing: 0.5px;
}

.prediction-overlay.resolved .prediction-timer-val {
  color: var(--sector-best, #a855f7);
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
  font-size: 24px;
}

/* ═══════════════════════════════════════════
   3. PREGUNTA (Grande, elegante y sin cajas)
   ═══════════════════════════════════════════ */
.prediction-question {
  padding: 6px 24px 16px 24px;
  font-family: var(--font-f1turbo, "Formula1", sans-serif);
  font-size: 24px; /* Pregunta con presencia clara */
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  word-break: break-word;
}

/* Fina línea divisoria estilo data-stream */
.prediction-stream-line {
  height: 1px;
  background: linear-gradient(90deg, var(--f1-red, #d80d0d) 0%, rgba(255, 255, 255, 0.1) 60%, transparent 100%);
  margin: 0 24px 16px 24px;
}

/* ═══════════════════════════════════════════
   4. FILAS DE OPCIONES (Tipografía Grande)
   ═══════════════════════════════════════════ */
.prediction-options-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 24px 22px 24px;
}

.prediction-option-item {
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: opacity 0.2s ease;
}

.prediction-option-item.winner .prediction-option-text {
  color: var(--f1-green, #00d2be);
}

.prediction-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prediction-option-command {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Badge de comando grande y legible */
.prediction-cmd-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-family: "JetBrains Mono", monospace;
  font-size: 16px; /* Letra de comando grande */
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.prediction-option-item.winner .prediction-cmd-badge {
  background: var(--f1-green, #00d2be);
  color: #000000;
  font-weight: 900;
}

.prediction-option-text {
  font-family: var(--font-f1turbo, "Formula1", sans-serif);
  font-size: 20px; /* Nombre de opción grande */
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-transform: uppercase;
}

.prediction-option-percent {
  font-family: "JetBrains Mono", monospace;
  font-size: 20px; /* Porcentaje grande */
  font-weight: 800;
  color: var(--f1-white, #ffffff);
}

.prediction-option-item.winner .prediction-option-percent {
  color: var(--f1-green, #00d2be);
}

.prediction-option-votes-count {
  font-size: 13px;
  color: var(--f1-gray-300, #8c8c8c);
  margin-left: 6px;
  font-weight: 500;
}

/* Barra de progreso fina y nítida */
.prediction-progress-bg,
.poll-progress-bg {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.prediction-progress-bar,
.poll-progress-bar {
  height: 100%;
  background: var(--f1-red, #d80d0d);
  border-radius: 2px;
  transition: width 0.4s ease-out;
}

/* Colores dinámicos para opciones de encuestas */
.poll-progress-bar.color-a, .poll-cmd-badge.color-a { background: var(--f1-red, #e10600); }
.poll-progress-bar.color-b, .poll-cmd-badge.color-b { background: var(--f1-green, #00d2be); }
.poll-progress-bar.color-c, .poll-cmd-badge.color-c { background: #f59e0b; }
.poll-progress-bar.color-d, .poll-cmd-badge.color-d { background: #a855f7; }
.poll-progress-bar.color-e, .poll-cmd-badge.color-e { background: #3b82f6; }
.poll-progress-bar.color-f, .poll-cmd-badge.color-f { background: #ec4899; }

.prediction-option-item.winner .prediction-progress-bar,
.poll-option-item.winner .poll-progress-bar {
  background: var(--f1-green, #00d2be);
  box-shadow: 0 0 8px var(--f1-green, #00d2be);
}

/* Lista de Votantes */
.prediction-voters-list,
.poll-voters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.prediction-voter-tag,
.poll-voter-tag {
  background: rgba(255, 255, 255, 0.06);
  color: var(--f1-gray-200, #c8c8c8);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; /* Votantes legibles */
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 3px;
}

.prediction-option-item.winner .prediction-voter-tag,
.poll-option-item.winner .poll-voter-tag {
  background: rgba(0, 210, 190, 0.15);
  color: var(--f1-green, #00d2be);
}

/* ═══════════════════════════════════════════
   5. PIE DE TELEMETRÍA (FOOTER)
   ═══════════════════════════════════════════ */
.prediction-hud-footer,
.poll-hud-footer {
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.prediction-cmd-hint,
.poll-cmd-hint {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--f1-gray-300, #8c8c8c);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prediction-cmd-hint::before,
.poll-cmd-hint::before {
  content: "»";
  color: var(--f1-red, #d80d0d);
  font-weight: 900;
  font-size: 14px;
}

.poll-cmd-hint::before {
  color: var(--f1-green, #00d2be);
}

/* ═══════════════════════════════════════════
   6. EXTENSIÓN POLL HUD ESPECÍFICA
   ═══════════════════════════════════════════ */
.poll-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex !important;
  opacity: 0;
  pointer-events: none;
  z-index: 99999;
  overflow: hidden;
  transition: opacity 0.3s ease-out;
}

.poll-overlay.show {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.poll-overlay.hiding {
  opacity: 0 !important;
}

.poll-hud-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.poll-hud-core {
  position: absolute;
  right: 20px;
  top: 56%;
  transform: translateY(-50%);
  width: min(680px, 92vw);
  background: rgba(15, 16, 20, 0.99);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  z-index: 10;
  overflow: hidden;
  font-family: var(--font-f1turbo, "Formula1", "Titillium Web", sans-serif);
  color: var(--f1-white, #ffffff);
}

.poll-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--f1-black, #0f1014);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
  color: var(--f1-gray-300, #8c8c8c);
}

.poll-status-bar .network-activity {
  display: flex;
  gap: 5px;
  align-items: center;
}

.poll-status-bar .net-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #333;
}

.poll-status-bar .net-led.rx {
  background: var(--f1-green, #00d2be);
  box-shadow: 0 0 6px var(--f1-green, #00d2be);
}

.poll-status-bar .net-led.tx {
  background: var(--f1-red, #d80d0d);
  box-shadow: 0 0 6px var(--f1-red, #d80d0d);
}

.poll-status-title {
  color: var(--f1-white, #ffffff);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 12px;
}

.poll-status-divider {
  color: rgba(255, 255, 255, 0.2);
}

.poll-status-code {
  margin-left: auto;
  color: var(--f1-green, #00d2be);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.poll-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 8px 24px;
  background: transparent;
}

.poll-hud-tag {
  font-size: 13px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  color: var(--f1-green, #00d2be);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.poll-hud-timer {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.poll-timer-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--f1-gray-300, #8c8c8c);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.poll-timer-val {
  font-family: "Formula1", sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  letter-spacing: 0.5px;
}

.poll-overlay.resolved .poll-timer-val {
  color: var(--f1-green, #00d2be);
  text-shadow: 0 0 10px rgba(0, 210, 190, 0.4);
  font-size: 24px;
}

.poll-question {
  padding: 6px 24px 16px 24px;
  font-family: var(--font-f1turbo, "Formula1", sans-serif);
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  word-break: break-word;
}

.poll-stream-line {
  height: 1px;
  background: linear-gradient(90deg, var(--f1-green, #00d2be) 0%, rgba(255, 255, 255, 0.1) 60%, transparent 100%);
  margin: 0 24px 16px 24px;
}

.poll-options-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 24px 22px 24px;
}

.poll-option-item {
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: opacity 0.2s ease;
}

.poll-option-item.winner .poll-option-text {
  color: var(--f1-green, #00d2be);
  font-weight: 800;
}

.poll-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.poll-option-command {
  display: flex;
  align-items: center;
  gap: 14px;
}

.poll-cmd-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.poll-option-item.winner .poll-cmd-badge {
  background: var(--f1-green, #00d2be);
  color: #000000;
  font-weight: 900;
}

.poll-option-text {
  font-family: var(--font-f1turbo, "Formula1", sans-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-transform: uppercase;
}

.poll-option-percent {
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
  font-weight: 800;
  color: var(--f1-white, #ffffff);
}

.poll-option-item.winner .poll-option-percent {
  color: var(--f1-green, #00d2be);
}

.poll-option-votes-count {
  font-size: 13px;
  color: var(--f1-gray-300, #8c8c8c);
  margin-left: 6px;
  font-weight: 500;
}

