/* ===== CLASIF_CAMPEONATO — Campeonato para participantes (solo totales) =====
   Mismo aspecto que la clasificación por equipos clásica. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

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

html, body {
  min-height: 100%;
  background: #1a1a2e;
  color: #fff;
  font-family: 'Inter', Arial, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 80px;
}

/* ===== Título ===== */
.page-title {
  font-size: clamp(18px, 3.5vw, 28px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #e0e0e0;
  margin: 26px 0 8px;
  text-align: center;
}
.page-sub {
  max-width: 640px;
  margin-bottom: 18px;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.5;
  color: #aab;
}

/* ===== Tu posición ===== */
.yo-caja {
  width: 100%;
  max-width: 640px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.yo-caja[hidden] { display: none; }
.yo-dato {
  padding: 10px 14px;
  border-radius: 10px;
  background: #16213e;
  border: 1px solid rgba(232,148,45,.45);
}
.yo-dato small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #aab; }
.yo-dato b { font-size: 20px; font-weight: 900; color: #e8942d; }

/* ===== Pestañas y buscador ===== */
.tabs {
  width: 100%;
  max-width: 640px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  overflow: hidden;
}
.tabs button {
  padding: 11px 6px;
  border: 0;
  background: #16213e;
  color: #a0c4ff;
  font: 800 13px 'Inter', Arial, sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}
.tabs button + button { border-left: 1px solid rgba(255,255,255,.15); }
.tabs button[aria-pressed="true"] { background: #e8942d; color: #fff; }

.buscar {
  width: 100%;
  max-width: 640px;
  margin: 10px 0 12px;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: #16162b;
  color: #fff;
  font: 600 15px 'Inter', Arial, sans-serif;
}
.buscar::placeholder { color: #778; }

/* ===== Tabla ===== */
.table-wrapper {
  width: 100%;
  max-width: 640px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
}
.table-wrapper[hidden] { display: none; }
table { width: 100%; border-collapse: collapse; }

thead th {
  background: #16162b;
  padding: 12px 10px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #888;
  border-bottom: 2px solid rgba(255,255,255,.1);
  text-align: center;
}
thead th:nth-child(2) { text-align: left; }

td {
  padding: 10px;
  font-size: clamp(13px, 2vw, 15px);
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-align: center;
}
td.pos { width: 56px; font-weight: 800; font-size: clamp(14px, 2.5vw, 18px); }
/* Nombres de piloto siempre en mayúsculas, vengan como vengan del dato. */
td.nombre { text-align: left; font-weight: 700; text-transform: uppercase; overflow-wrap: anywhere; }
td.total { width: 90px; font-weight: 900; font-size: clamp(14px, 2.5vw, 18px); color: #e8942d; }

/* ===== Podio y resto ===== */
tr.top1 { background: linear-gradient(90deg, #c87a1a 0%, #e8942d 50%, #d4851f 100%); }
tr.top2 { background: linear-gradient(90deg, #1a5276 0%, #2471a3 50%, #1a5276 100%); }
tr.top3 { background: linear-gradient(90deg, #2e6ea0 0%, #3b8ac4 50%, #2e6ea0 100%); }
tr.top1 td, tr.top2 td, tr.top3 td { color: #fff; }
tr.normal:nth-child(odd)  { background: #2a2a3e; }
tr.normal:nth-child(even) { background: #232337; }

/* Tu fila */
tr.yo td { box-shadow: inset 0 0 0 9999px rgba(228,44,54,.28); }
.tu {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e42c36;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  vertical-align: middle;
}

.empty-msg { padding: 30px 20px; text-align: center; font-size: 15px; color: #888; }
.empty-msg[hidden] { display: none; }

/* ===== Botón Inicio ===== */
.home-btn {
  position: fixed;
  top: 14px;
  left: 14px;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px;
  background: #16213e;
  color: #a0c4ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-decoration: none;
  z-index: 100;
}
.home-btn:hover { background: #1a3a5c; color: #fff; }

@media (max-width: 480px) {
  body { padding: 12px 8px 80px; }
  td { padding: 8px 6px; }
}

/* ===================== MODO CLARO ===================== */
:root[data-theme="light"] body { background: #eef1f6; color: #1f2733; }
:root[data-theme="light"] .page-title { color: #24303f; }
:root[data-theme="light"] .page-sub { color: #5a6472; }
:root[data-theme="light"] .home-btn { background: rgba(0,0,0,.06); color: #24303f; border-color: rgba(0,0,0,.12); }
:root[data-theme="light"] .yo-dato { background: #ffffff; }
:root[data-theme="light"] .yo-dato small { color: #5a6472; }
:root[data-theme="light"] .tabs { border-color: rgba(0,0,0,.14); }
:root[data-theme="light"] .tabs button { background: #ffffff; color: #2b3442; }
:root[data-theme="light"] .tabs button + button { border-left-color: rgba(0,0,0,.14); }
:root[data-theme="light"] .tabs button[aria-pressed="true"] { background: #e8942d; color: #fff; }
:root[data-theme="light"] .buscar { background: #ffffff; color: #1f2733; border-color: rgba(0,0,0,.18); }
:root[data-theme="light"] .table-wrapper { box-shadow: 0 8px 26px rgba(20,30,50,.10); }
:root[data-theme="light"] thead th { background: #e7ebf3; color: #5a6472; border-bottom-color: rgba(0,0,0,.14); }
:root[data-theme="light"] tr.normal:nth-child(odd)  { background: #ffffff; }
:root[data-theme="light"] tr.normal:nth-child(even) { background: #f4f6fa; }
:root[data-theme="light"] tr.normal td { color: #24303f; border-bottom-color: rgba(0,0,0,.06); }
