/* ═══════════════════════════════════════════
   partido.css — Estilos del componente partido
   ═══════════════════════════════════════════ */

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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f4f6f8;
  color: #111;
  min-height: 100vh;
}

.partido-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* ─── HEADER ─── */
.partido-header {
  background: linear-gradient(135deg, #0d5c2e 0%, #1a7f37 55%, #0d5c2e 100%);
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.25rem;
  color: #fff;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.partido-meta {
  font-size: 11px;
  opacity: .75;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.partido-equipos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.equipo-bloque {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 220px;
}

.equipo-escudo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

.equipo-escudo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.equipo-nombre {
  font-size: 15px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.equipo-goles {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 16px;
}

.gol-item {
  font-size: 11px;
  opacity: .88;
  display: flex;
  align-items: center;
  gap: 4px;
}

.gol-item .gol-min {
  opacity: .7;
  font-size: 10px;
}

.marcador-bloque {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.marcador {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 6px;
  line-height: 1;
}

.partido-estado {
  font-size: 11px;
  background: rgba(0,0,0,.3);
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: .05em;
}

.partido-estado.en-vivo::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #f44336;
  border-radius: 50%;
  margin-right: 5px;
  animation: pulso 1.2s infinite;
  vertical-align: middle;
}

@keyframes pulso {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

/* ─── TABS ─── */
.tabs {
  display: flex;
  border-bottom: 1.5px solid #e0e0e0;
  margin-bottom: 1.25rem;
  gap: 2px;
  overflow-x: auto;
}

.tab-btn {
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  color: #666;
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}

.tab-btn:hover  { color: #111; }
.tab-btn.active { color: #1a7f37; border-bottom-color: #1a7f37; }

.tab-panel        { display: none; }
.tab-panel.active { display: block; }

/* ─── CARD ─── */
.card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card-titulo {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1rem;
}

/* ─── ALINEACIÓN ─── */
.alineacion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.lista-equipo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid #f0f0f0;
}

.lista-equipo-header .nombre    { font-size: 13px; font-weight: 600; }
.lista-equipo-header .formacion { margin-left: auto; font-size: 11px; color: #aaa; }

.dot-local  { width: 10px; height: 10px; border-radius: 50%; background: #1565c0; flex-shrink: 0; }
.dot-visita { width: 10px; height: 10px; border-radius: 50%; background: #f9a825; flex-shrink: 0; }

.jugador-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
}

.jugador-row:last-child { border-bottom: none; }

.dorsal {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.dorsal-local  { background: #e3f2fd; color: #1565c0; }
.dorsal-visita { background: #fff8e1; color: #e65100; }

.jugador-info     { flex: 1; }
.jugador-nombre   { font-weight: 500; line-height: 1.3; }
.jugador-suplente { color: #aaa; font-weight: 400; }

.sustitucion-tag {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  margin-top: 2px;
  color: #888;
}

.sustitucion-tag .sale  { color: #e53935; font-weight: 600; }
.sustitucion-tag .entra { color: #43a047; font-weight: 600; }
.sustitucion-tag .min   { color: #aaa; }

.goles-jugador {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: #888;
  margin-top: 1px;
}

.pos-badge {
  font-size: 10px;
  color: #bbb;
  min-width: 22px;
  text-align: right;
  padding-top: 3px;
}

.cap-badge {
  display: inline-block;
  font-size: 9px;
  background: #ffd600;
  color: #333;
  border-radius: 3px;
  padding: 1px 4px;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}

.suplentes-titulo {
  font-size: 11px;
  color: #bbb;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 10px 0 4px;
}

/* ─── ESTADÍSTICAS ─── */
.stats-cabecera {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
}

.stats-nombre-local  { color: #1565c0; }
.stats-nombre-visita { color: #b71c1c; }

.stat-fila {
  display: grid;
  grid-template-columns: 1fr 130px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.stat-lado        { display: flex; align-items: center; gap: 6px; }
.stat-lado.local  { justify-content: flex-end; }

.stat-valor        { font-size: 14px; font-weight: 600; min-width: 28px; }
.stat-valor.local  { color: #1565c0; text-align: right; }
.stat-valor.visita { color: #b71c1c; }

.stat-etiqueta {
  text-align: center;
  font-size: 12px;
  color: #888;
  line-height: 1.3;
}

.barra-wrap {
  flex: 1;
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.barra-fill        { position: absolute; top: 0; height: 100%; border-radius: 3px; }
.barra-fill.local  { right: 0; background: #1565c0; }
.barra-fill.visita { left: 0;  background: #c62828; }

/* ─── EVENTOS ─── */
.evento {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
}

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

.ev-min {
  font-size: 11px;
  color: #aaa;
  min-width: 28px;
  font-variant-numeric: tabular-nums;
}

.ev-icono {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.ev-icono.gol      { background: #e8f5e9; }
.ev-icono.cambio   { background: #f3e5f5; }
.ev-icono.descanso { background: #f5f5f5; font-size: 10px; color: #aaa; }

.ev-tarjeta { width: 14px; height: 18px; border-radius: 2px; flex-shrink: 0; }
.ev-tarjeta.amarilla { background: #ffd600; }
.ev-tarjeta.roja     { background: #f44336; }

.ev-texto       { flex: 1; line-height: 1.4; }
.ev-texto small { color: #aaa; font-size: 11px; }

.ev-marcador {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.ev-marcador.local  { background: #e3f2fd; color: #1565c0; }
.ev-marcador.visita { background: #ffebee; color: #c62828; }

/* ─── RESPONSIVE ─── */
@media (max-width: 540px) {
  .alineacion-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .marcador        { font-size: 36px; }
  .equipo-nombre   { font-size: 12px; }
  .equipo-escudo   { width: 48px; height: 48px; font-size: 22px; }
  .tab-btn         { padding: 8px 12px; font-size: 12px; }
  .stat-fila       { grid-template-columns: 1fr 90px 1fr; }
}

.jugador-link {
  color: inherit;
  text-decoration: none;
}
.jugador-link:hover {
  text-decoration: underline;
}
