/* ==========================================================================
   SoloQ Challenge — sistema de diseño
   Reemplaza el runtime de Tailwind (400 KB de JS) por CSS estatico.
   Paleta tomada del cliente de League of Legends: azul profundo + oro.
   ========================================================================== */

:root {
  --bg-0: #010a13;
  --bg-1: #040911;
  --bg-2: #091428;
  --bg-3: #0e1f38;
  --line: #1e282d;
  --line-soft: #1e282d99;

  --text: #f0e6d2;
  --text-dim: #9ca3af;
  --text-mute: #6b7280;

  --gold: #c89b3c;
  --gold-soft: #c89b3c26;
  --gold-line: #c89b3c66;
  --teal: #0ac8b9;
  --blue: #0397ab;
  --green: #10b981;
  --red: #f43f5e;
  --violet: #a855f7;
  --amber: #f59e0b;

  --font-display: "Cinzel", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --max-w: 100%;   /* antes 1400px: dejaba franjas vacias en pantallas anchas */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, #0e2a4a 0%, transparent 60%),
    var(--bg-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 800; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
/* Red de seguridad: ninguna imagen debe exceder su contenedor. Sin esto, un
   icono de 300x300 se pinta a tamano nativo y desborda la fila. */
img { display: block; border: 0; max-width: 100%; }

/* --- Utilidades ---------------------------------------------------------- */

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 12px; }
.hidden { display: none !important; }
.mono { font-family: var(--font-mono); }
.display { font-family: var(--font-display); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.dim { color: var(--text-dim); }
.mute { color: var(--text-mute); }
.gold { color: var(--gold); }
.green { color: var(--green); }
.red { color: var(--red); }
.teal { color: var(--teal); }

/* --- Barra superior ------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(1, 10, 19, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  max-width: var(--max-w);
  margin: 0 auto;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: linear-gradient(160deg, var(--gold-soft), transparent);
  border: 1px solid var(--gold-line);
  color: var(--gold);
  font-size: 15px;
}
.brand h1 { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.02em; line-height: 1.15; }
.brand small { display: block; color: var(--text-mute); font-size: 10px; font-family: var(--font-mono); line-height: 1.2; }

.status-pills { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
  line-height: 1.6;
}
.pill > .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-mute); flex: 0 0 auto; }
.pill.ok { border-color: #10b98166; color: #6ee7b7; }
.pill.ok > .dot { background: var(--green); }
.pill.warn { border-color: #f59e0b66; color: #fcd34d; }
.pill.warn > .dot { background: var(--amber); }
.pill.bad { border-color: #f43f5e66; color: #fda4af; }
.pill.bad > .dot { background: var(--red); animation: pulse 1.4s infinite; }
.pill.info { border-color: #0397ab66; color: #67e8f9; }
.pill.info > .dot { background: var(--teal); }
button.pill:hover { border-color: var(--gold-line); color: var(--gold); }

/* --- Selector de cola ---------------------------------------------------- */

.queue-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.queue-switch button {
  padding: 7px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-mute);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  transition: background 0.15s, color 0.15s;
}
.queue-switch button:hover { color: var(--text); }
.queue-switch button[aria-selected="true"] {
  background: var(--gold);
  color: var(--bg-0);
  box-shadow: 0 0 14px #c89b3c44;
}

/* --- Fila de navegacion (cola + pestanas + marca de tiempo) --------------- */

.navrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 6px;
  max-width: var(--max-w);
  margin: 0 auto;
  flex-wrap: wrap;
}
.navrow .tabs { padding: 0; flex: 1 1 auto; }
.navrow .hint { margin-left: auto; }
@media (max-width: 760px) {
  .navrow .hint { margin-left: 0; flex-basis: 100%; }
}

/* --- Pestanas ------------------------------------------------------------ */

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 6px 13px;
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text); background: var(--bg-1); }
.tab-btn[aria-selected="true"] {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: var(--gold-line);
}

.panel { display: none; padding: 10px 12px 28px; max-width: var(--max-w); margin: 0 auto; }
.panel.active { display: block; }

/* --- Titulos de seccion -------------------------------------------------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  flex-wrap: wrap;
}
.section-head h2 { font-family: var(--font-display); font-size: 16px; letter-spacing: 0.01em; }
.section-head p { color: var(--text-mute); font-size: 11px; font-family: var(--font-mono); }

.card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card.flat { background: var(--bg-1); }

/* --- Podio: 3 tarjetas compactas ----------------------------------------- */
/* Tres columnas que se reparten el ancho. Cada tarjeta tiene cabecera
   (medalla, avatar, nombre, liga) y una rejilla de 6 cifras que ocupa el resto:
   asi no quedan datos pegados a los bordes ni huecos en el centro. */

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 880px) { .podium { grid-template-columns: 1fr; } }

.podium-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.podium-card:hover { background: var(--bg-3); }
.podium-card.rank-1 { border-top-color: var(--gold); }
.podium-card.rank-2 { border-top-color: #94a3b8; }
.podium-card.rank-3 { border-top-color: #b45309; }

.podium-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.podium-medal { font-size: 16px; line-height: 1; flex: 0 0 auto; }
.podium-card .avatar { width: 32px; height: 32px; border-radius: 8px; flex: 0 0 auto; }
.podium-name { display: flex; align-items: baseline; gap: 5px; min-width: 0; flex: 1 1 auto; }
.podium-name b {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.podium-name .xs { flex: 0 0 auto; }

/* Rejilla de cifras: ocupa todo el ancho disponible */
.podium-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  padding: 6px 4px;
  background: var(--bg-0);
  border-radius: 6px;
  border: 1px solid var(--line-soft);
}
@media (max-width: 1200px) { .podium-grid { grid-template-columns: repeat(3, 1fr); row-gap: 6px; } }

.pod-stat { text-align: center; min-width: 0; }
.pod-label {
  display: block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  white-space: nowrap;
}
.pod-stat strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pod-stat strong.xs { font-size: 11px; }

.podium-bar { height: 4px; background: #4c0519; border-radius: 999px; overflow: hidden; }
.podium-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--teal)); }


/* --- Avatar de invocador -------------------------------------------------- */
/* Regla base. Debe existir SIEMPRE: sin ella los iconos (300x300 px) se pintan
   a tamano nativo y desbordan la fila. Los tamanos concretos se ajustan con
   .avatar.sm (tabla) y .avatar.lg (modal). */

.avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-0);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.avatar.sm { width: 34px; height: 34px; border-radius: 8px; }
.avatar.lg { width: 52px; height: 52px; border-radius: 10px; }

/* --- Tabla de clasificacion ---------------------------------------------- */

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
}
table { width: 100%; border-collapse: collapse; table-layout: auto; }
/* En pantallas estrechas se desplaza en horizontal en vez de aplastarse */
.table-wrap > table { min-width: 880px; }

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-2);
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-mute);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.1s; cursor: pointer; }
tbody tr:hover { background: var(--bg-3); }
tbody td { font-size: 14px; line-height: 1.35; }

/* Utilidades de celda */
.strong { font-weight: 800; color: var(--text); font-size: 14px; }
.xs { font-size: 11px; }
.block { display: block; }
td.center { text-align: center; }
td.right { text-align: right; }

.rank-cell { text-align: center; font-family: var(--font-mono); font-weight: 800; color: var(--text-mute); font-size: 14px; }
.rank-cell.top { color: var(--gold); }

.player-cell { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.player-lines { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.player-name { font-weight: 800; color: var(--text); font-size: 14px; }
.player-tag { font-size: 11px; color: var(--text-mute); font-family: var(--font-mono); }
.avatar.sm { width: 34px; height: 34px; border-radius: 8px; }

/* --- Insignias de liga --------------------------------------------------- */

.tier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-0);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.5;
}
.tier[data-tier="MASTER"], .tier[data-tier="GRANDMASTER"], .tier[data-tier="CHALLENGER"] {
  border-color: #a855f766; color: #d8b4fe; background: #2a1038;
}
.tier[data-tier="DIAMOND"] { border-color: #38bdf866; color: #7dd3fc; background: #082f49; }
.tier[data-tier="EMERALD"] { border-color: #10b98166; color: #6ee7b7; background: #052e23; }
.tier[data-tier="PLATINUM"] { border-color: #14b8a666; color: #5eead4; background: #042f2e; }
.tier[data-tier="GOLD"] { border-color: #eab30866; color: #fde047; background: #2a2005; }
.tier[data-tier="SILVER"] { border-color: #94a3b866; color: #cbd5e1; background: #111827; }
.tier[data-tier="BRONZE"] { border-color: #b4530966; color: #fdba74; background: #2a1608; }
.tier[data-tier="IRON"] { border-color: #6b728066; color: #d1d5db; background: #111827; }
.tier[data-tier="UNRANKED"] { border-color: var(--line); color: var(--text-mute); }

/* --- Barra de winrate (se usa en las tarjetas de campeon) ---------------- */
.wr-bar { width: 100%; height: 4px; background: #4c0519; border-radius: 999px; overflow: hidden; margin-top: 2px; }
.wr-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--teal)); }

/* --- Secuencia de partidas (W/L) ----------------------------------------- */

.streak-dots { display: flex; gap: 3px; align-items: center; flex-wrap: nowrap; }
.streak-dots i {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 4px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  font-family: var(--font-mono);
  border: 1px solid transparent;
}
.streak-dots i.win { background: #10b98133; color: #6ee7b7; border-color: #10b98166; }
.streak-dots i.loss { background: #f43f5e22; color: #fda4af; border-color: #f43f5e44; }
.streak-dots i.remake { background: #6b728033; color: #d1d5db; border-color: #6b728066; }
.streak-dots i.gap { background: transparent; color: var(--text-mute); border-color: var(--line); border-style: dashed; }

/* --- Botones ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--gold-line); color: var(--gold); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--bg-0); }
.btn.primary:hover { filter: brightness(1.1); color: var(--bg-0); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Modales ------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(1, 10, 19, 0.86);
  backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }

.modal-box {
  width: min(1100px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.modal-box.small { width: min(520px, 100%); }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  flex-wrap: wrap;
}
.modal-body { overflow-y: auto; padding: 16px 18px 20px; }
.modal-close {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-mute);
  font-size: 16px;
  flex: 0 0 auto;
}
.modal-close:hover { color: var(--red); border-color: #f43f5e66; }

/* --- Tarjeta de partida -------------------------------------------------- */

.match {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--bg-1);
}
.match.win { border-left: 3px solid var(--green); }
.match.loss { border-left: 3px solid var(--red); }
.match.remake { border-left: 3px solid var(--text-mute); }
.match-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  cursor: pointer;
  flex-wrap: wrap;
}
.match-summary:hover { background: var(--bg-2); }

.match-result { min-width: 74px; }
.match-result strong { display: block; font-size: 11px; letter-spacing: 0.06em; font-family: var(--font-display); }
.match-result span { font-family: var(--font-mono); font-size: 11px; }

.match-champ { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.match-champ img { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-0); }
.match-champ b { font-size: 14px; }
.match-champ small { display: block; font-size: 10px; color: var(--text-mute); font-family: var(--font-mono); }

.items { display: flex; gap: 3px; }
.items i {
  width: 26px; height: 26px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--bg-0);
  overflow: hidden;
  display: block;
}
.items i.empty { background: #04091166; }
.items i img { width: 100%; height: 100%; object-fit: cover; }

.kda {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-0);
  border: 1px solid var(--line);
}
.metric { text-align: right; font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
.metric b { display: block; color: var(--text); font-size: 13px; }

.match-detail { border-top: 1px solid var(--line); background: var(--bg-0); padding: 12px 14px; }
.match-detail[hidden] { display: none; }
.team { margin-bottom: 10px; }
.team:last-child { margin-bottom: 0; }
.team-head {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.team-head.blue { color: #7dd3fc; }
.team-head.red { color: #fda4af; }

.row-player {
  display: grid;
  grid-template-columns: 26px 1fr 90px 1fr 60px;
  gap: 8px;
  align-items: center;
  padding: 5px 6px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.row-player.me { background: var(--gold-soft); border: 1px solid var(--gold-line); }
.row-player img { width: 26px; height: 26px; border-radius: 5px; border: 1px solid var(--line); }
.row-player .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Fila de tramo sin LP (lp_gaps) -------------------------------------- */

.gap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px dashed #47556999;
  border-radius: var(--radius);
  background: #09142899;
  flex-wrap: wrap;
}
.gap-icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: #1e293b;
  border: 1px solid #47556966;
  color: #cbd5e1;
  flex: 0 0 auto;
}
.gap-title { font-weight: 800; font-size: 13px; }
.gap-meta { font-size: 11px; color: var(--text-mute); font-family: var(--font-mono); }

/* --- Rejillas (campeones, records) --------------------------------------- */

.grid { display: grid; gap: 8px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

.champ-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.champ-top { display: flex; align-items: center; gap: 9px; }
.champ-top img { width: 34px; height: 34px; border-radius: 7px; border: 1px solid var(--line); }
.champ-top h4 { font-size: 12px; }
.champ-top small { font-size: 10px; color: var(--text-mute); font-family: var(--font-mono); }
.champ-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; text-align: center; padding: 5px; background: var(--bg-0); border-radius: 6px; font-family: var(--font-mono); font-size: 10px; }
.champ-stats span { display: block; font-size: 9px; color: var(--text-mute); text-transform: uppercase; font-weight: 700; }

.record-card {
  background: linear-gradient(180deg, var(--bg-3), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.record-card.neg { background: linear-gradient(180deg, #1c0d1b, var(--bg-1)); border-color: #f43f5e33; }
.record-cat { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 800; color: var(--text-mute); }
.record-value { font-family: var(--font-mono); font-size: 17px; font-weight: 800; color: var(--gold); }
.record-card.neg .record-value { color: #fda4af; }
.record-holder { font-weight: 800; font-size: 12px; }
.record-detail { font-size: 10px; color: var(--text-mute); border-top: 1px solid var(--line); padding-top: 6px; margin-top: 1px; }

/* --- Graficas ------------------------------------------------------------ */

.chart-box { position: relative; height: 340px; }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--text-mute); font-family: var(--font-mono); font-size: 12px; }

.select {
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.select:focus { outline: 2px solid var(--gold-line); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }

/* --- Versus -------------------------------------------------------------- */

.versus-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; text-align: center; margin-bottom: 18px; }
.versus-head .vs { font-family: var(--font-display); font-size: 12px; color: var(--gold); padding: 6px 14px; border: 1px solid var(--gold-line); border-radius: 999px; background: var(--gold-soft); }

/* --- Estado vacio / carga ------------------------------------------------ */

.empty { text-align: center; padding: 48px 16px; color: var(--text-mute); font-family: var(--font-mono); font-size: 12px; }
.skeleton { text-align: center; padding: 40px; color: var(--text-mute); font-family: var(--font-mono); font-size: 12px; animation: pulse 1.6s infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* --- Avisos (toast) ------------------------------------------------------ */

.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid #10b98155;
  color: #6ee7b7;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow);
  animation: slide-in 0.2s ease-out;
}
.toast.bad { border-color: #f43f5e55; color: #fda4af; }
@keyframes slide-in { from { transform: translateY(10px); opacity: 0; } }

/* --- Formulario de clave ------------------------------------------------- */

.field { width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-0); color: var(--text); font-family: var(--font-mono); font-size: 12px; }
.field:focus { outline: 2px solid var(--gold-line); }
.hint { font-size: 11px; color: var(--text-mute); font-family: var(--font-mono); }
.msg { padding: 10px; border-radius: 8px; font-size: 11px; font-family: var(--font-mono); font-weight: 700; }
.msg.ok { background: #052e23; border: 1px solid #10b98166; color: #6ee7b7; }
.msg.bad { background: #2a0a12; border: 1px solid #f43f5e66; color: #fda4af; }

/* --- Filas clave/valor --------------------------------------------------- */

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.kv:last-child { border-bottom: 0; }
.kv dt { color: var(--text-mute); font-family: var(--font-mono); }
.kv dd { margin: 0; font-family: var(--font-mono); font-weight: 700; }

/* --- En vivo ------------------------------------------------------------- */

.live-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 760px) { .live-grid { grid-template-columns: 1fr; } }
.live-team { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.live-team header { padding: 8px 12px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.live-team.blue header { background: #082f49; color: #7dd3fc; }
.live-team.red header { background: #2a0a12; color: #fda4af; }
.live-row { display: grid; grid-template-columns: 24px 28px 1fr 70px; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line-soft); font-family: var(--font-mono); font-size: 11px; }
.live-row:last-child { border-bottom: 0; }
.live-row.dead { opacity: 0.45; }
.live-row img { width: 28px; height: 28px; border-radius: 5px; border: 1px solid var(--line); }

/* --- Pie ----------------------------------------------------------------- */

.footer { border-top: 1px solid var(--line); padding: 18px 16px; margin-top: 24px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }

/* --- Accesibilidad ------------------------------------------------------- */

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

