/* ── Reset y base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --verde-oscuro:  #1a4d2e;
  --verde-medio:   #2d6a4f;
  --verde-claro:   #52b788;
  --crema:         #f8f5f0;
  --gris-claro:    #e9e5df;
  --gris-texto:    #5a5650;
  --negro:         #1c1c1c;
  --rojo:          #c0392b;
  --azul:          #2471a3;
  --radio:         6px;
  --sombra:        0 2px 8px rgba(0,0,0,.10);
}

html { font-size: 16px; }

body {
  font-family: 'Georgia', serif;
  background: var(--crema);
  color: var(--negro);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────── */
header {
  background: var(--verde-oscuro);
  color: #fff;
  padding: 2rem 1.5rem;
  text-align: center;
}

.header-inner { max-width: 860px; margin: 0 auto; }

header h1 {
  font-size: 2.4rem;
  letter-spacing: .06em;
  font-weight: normal;
  text-transform: uppercase;
}

header .subtitulo {
  margin-top: .4rem;
  font-size: .95rem;
  opacity: .75;
  font-style: italic;
}

/* ── Main ───────────────────────────────────────────────── */
main {
  flex: 1;
  max-width: 860px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* ── Estado vacío ────────────────────────────────────────── */
.vacio {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gris-texto);
}

.vacio code {
  background: var(--gris-claro);
  padding: .15em .45em;
  border-radius: 4px;
  font-size: .9rem;
  font-family: monospace;
}

/* ── Tarjeta de torneo ───────────────────────────────────── */
.torneo {
  background: #fff;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  margin-bottom: 2rem;
  overflow: hidden;
  border: 1px solid var(--gris-claro);
}

.torneo-header {
  background: var(--verde-medio);
  padding: .9rem 1.4rem;
}

.torneo-header h2 {
  color: #fff;
  font-size: 1.2rem;
  font-weight: normal;
  letter-spacing: .03em;
}

.torneo-body { padding: 0; }

/* ── Sección de escenario ────────────────────────────────── */
.escenario {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--gris-claro);
}

.escenario:last-child { border-bottom: none; }

.escenario-titulo {
  font-size: 1rem;
  font-weight: bold;
  font-family: 'Georgia', serif;
  margin-bottom: .65rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--negro);
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  font-size: .7rem;
  font-family: sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .15em .5em;
  border-radius: 3px;
  color: #fff;
  flex-shrink: 0;
}

.badge-real { background: var(--verde-oscuro); }
.badge-sim  { background: #7d6608; }

/* ── Líneas de datos ─────────────────────────────────────── */
.linea {
  margin-bottom: .45rem;
  font-size: .97rem;
  line-height: 1.5;
}

.linea:last-child { margin-bottom: 0; }

.etiqueta {
  font-weight: bold;
  margin-right: .3em;
}

.equipo { display: inline; }

.equipo em {
  font-style: normal;
  color: var(--gris-texto);
  font-size: .9em;
}

/* ── G / P ───────────────────────────────────────────────── */
.resultado {
  font-weight: 700;
  font-style: normal;
  font-family: sans-serif;
  font-size: .85em;
}

.gano   { color: var(--verde-medio); }
.perdio { color: var(--rojo); }

/* ── Fondo alternado por sección ─────────────────────────── */
.escenario.sin-promedios {
  background: #fdfbf7;
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 1.2rem;
  font-size: .82rem;
  color: var(--gris-texto);
  border-top: 1px solid var(--gris-claro);
  font-family: sans-serif;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  header h1    { font-size: 1.8rem; }
  .torneo-body { padding: 0; }
  .escenario   { padding: .9rem 1rem; }
}
