/* ═══════════════════════════════════════════════════════════════════════════
   REFLEJOS F1 — Semáforos de salida + Ranking/Podio
   ═══════════════════════════════════════════════════════════════════════════ */
.ref-wrap { padding: 4px 0 24px; }
.ref-header { text-align: center; margin-bottom: 20px; }
.ref-titulo { font-size: 22px; font-weight: 800; color: var(--color-graphite); }
.ref-subtitulo { font-size: 13px; color: var(--color-slate); margin-top: 4px; line-height: 1.5; }

/* ── Panel del semáforo (escenario táctil) ──────────────────────────────────── */
.ref-stage {
  position: relative;
  background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 100%);
  border-radius: 20px;
  padding: 28px 20px 32px;
  margin: 0 auto 18px;
  max-width: 420px;
  cursor: pointer;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  transition: background 0.15s ease;
  overflow: hidden;
}
.ref-stage.ref-go {
  background: linear-gradient(180deg, #064e10 0%, #06A600 100%);
  animation: ref-go-flash 0.3s ease;
}
@keyframes ref-go-flash { 0% { filter: brightness(1.6); } 100% { filter: brightness(1); } }
.ref-stage.ref-nula {
  background: linear-gradient(180deg, #5a1010 0%, #c0392b 100%);
}

/* Fila de 5 luces */
.ref-lights {
  display: flex; justify-content: center; gap: 12px;
  margin-bottom: 22px;
}
.ref-light {
  width: 44px; height: 44px; border-radius: 50%;
  background: #3a0808;
  border: 3px solid #1a1a1a;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
  transition: all 0.1s ease;
}
.ref-light.on {
  background: radial-gradient(circle at 35% 30%, #ff5a5a, #d50000);
  box-shadow: 0 0 16px rgba(255,40,40,0.8), inset 0 2px 4px rgba(255,255,255,0.3);
  border-color: #ff3030;
}

/* Mensaje central */
.ref-msg { text-align: center; }
.ref-msg-big {
  font-size: 32px; font-weight: 800; color: #fff;
  line-height: 1.1; min-height: 38px;
  font-variant-numeric: tabular-nums lining-nums; font-feature-settings: 'zero' 0;
  letter-spacing: -0.5px;
}
.ref-go .ref-msg-big { font-size: 40px; animation: ref-ya 0.3s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes ref-ya { 0% { transform: scale(0.6); } 100% { transform: scale(1); } }
.ref-msg-sub { font-size: 13px; color: rgba(255,255,255,0.7); margin-top: 6px; }

/* ── Stats ──────────────────────────────────────────────────────────────────── */
.ref-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  max-width: 420px; margin: 0 auto 28px;
}
.ref-stat {
  background: var(--color-white);
  border: 1px solid var(--color-silver);
  border-radius: 12px;
  padding: 14px 16px; text-align: center;
}
.ref-stat-label { font-size: 11px; color: var(--color-slate); text-transform: uppercase; letter-spacing: 0.04em; }
.ref-stat-value {
  font-size: 22px; font-weight: 800; color: var(--color-graphite); margin-top: 4px;
  font-variant-numeric: tabular-nums lining-nums; font-feature-settings: 'zero' 0;
}

/* ── Bote del premio ────────────────────────────────────────────────────────── */
.ref-bote {
  background: linear-gradient(135deg, #fff4c2 0%, #ffe27a 100%);
  border: 2px solid #ffd700;
  border-radius: 16px;
  padding: 18px 20px; text-align: center;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(255,184,0,0.3);
}
.ref-bote-label { font-size: 13px; font-weight: 700; color: #7a5800; }
.ref-bote-valor {
  font-size: 34px; font-weight: 800; color: #5a3e00; line-height: 1.1; margin: 4px 0;
  font-variant-numeric: tabular-nums lining-nums; font-feature-settings: 'zero' 0;
}
.ref-bote-info { font-size: 12px; color: #7a5800; }
.ref-bote-countdown { font-size: 12px; color: #7a5800; margin-top: 6px; font-weight: 600; }
.ref-bote-countdown span { font-variant-numeric: tabular-nums; }

/* ── Sección título ─────────────────────────────────────────────────────────── */
.ref-seccion-titulo {
  font-size: 15px; font-weight: 700; color: var(--color-graphite);
  margin: 24px 0 14px;
}

/* ── Podio (top 3 visual) ───────────────────────────────────────────────────── */
.ref-podio {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 8px; align-items: end;
  max-width: 420px; margin: 0 auto;
}
.ref-podio-col {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.ref-podio-medalla { font-size: 30px; line-height: 1; }
.ref-podio-nombre {
  font-size: 12px; font-weight: 700; color: var(--color-graphite);
  margin: 4px 0 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ref-podio-tiempo {
  font-size: 13px; font-weight: 800; color: var(--color-brand-dk, #058A00);
  font-variant-numeric: tabular-nums lining-nums; font-feature-settings: 'zero' 0;
  margin-bottom: 6px;
}
.ref-podio-base {
  width: 100%; border-radius: 10px 10px 0 0;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 10px; color: #fff; font-weight: 800;
}
/* Alturas del podio: 1º más alto */
.ref-podio-1 .ref-podio-base { height: 80px; background: linear-gradient(180deg, #ffd700, #e8a200); }
.ref-podio-2 .ref-podio-base { height: 60px; background: linear-gradient(180deg, #c0c5cc, #9aa0a8); }
.ref-podio-3 .ref-podio-base { height: 44px; background: linear-gradient(180deg, #d79456, #b8753a); }
.ref-podio-premio {
  font-size: 13px;
  font-variant-numeric: tabular-nums lining-nums; font-feature-settings: 'zero' 0;
}
.ref-podio-col.es-yo .ref-podio-nombre { color: var(--color-brand, #06A600); }
.ref-podio-col.es-yo .ref-podio-nombre::after { content: ' (tú)'; font-size: 10px; }
.ref-podio-col.vacio .ref-podio-base { opacity: 0.3; }

/* ── Tabla (4º en adelante / diario) ────────────────────────────────────────── */
.ref-tabla { max-width: 420px; margin: 14px auto 0; }
.ref-fila {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-silver);
  font-size: 14px;
}
.ref-fila.es-yo {
  background: var(--green-lt, #e8fce8);
  border-radius: 8px; border-bottom-color: transparent;
  font-weight: 700;
}
.ref-fila-pos {
  width: 28px; text-align: center; font-weight: 700; color: var(--color-slate);
  font-variant-numeric: tabular-nums;
}
.ref-fila-nombre { flex: 1; color: var(--color-graphite); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-fila-tiempo {
  font-weight: 800; color: var(--color-brand-dk, #058A00);
  font-variant-numeric: tabular-nums lining-nums; font-feature-settings: 'zero' 0;
}
.ref-fila.es-yo .ref-fila-nombre::after { content: ' (tú)'; font-size: 11px; color: var(--color-brand,#06A600); }

.ref-mi-pos {
  text-align: center; font-size: 13px; color: var(--color-slate);
  margin: 14px 0; padding: 10px;
  background: var(--color-paper); border-radius: 10px;
}
.ref-mi-pos strong { color: var(--color-graphite); }

.ref-tabla-diario { margin-top: 0; }
