.resultados-container {
  max-width: 1000px;
  margin: 2.5rem auto 4rem;
  padding: 0 1.25rem;
}

.resultados-header {
  margin-bottom: 2rem;
}

.resultados-header h1 {
  margin: 0.2rem 0 0.4rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.resultados-header p {
  color: var(--muted);
  margin: 0;
}

/* Tabs de categoría */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 2rem;
}

.cat-grupo {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.cat-grupo-label {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-family: 'Outfit', sans-serif;
  padding-left: .1rem;
}

.cat-grupo-btns {
  display: flex;
  gap: .3rem;
}

.cat-tab {
  background: #fff;
  border: 1px solid var(--line);
  padding: .45rem .9rem;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  transition: all .2s;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}

.cat-tab:hover { color: var(--ink); border-color: var(--ink); }

.cat-tab.masculino.active { background: #1e40af; border-color: #1e40af; color: #fff; }
.cat-tab.femenino.active  { background: #9d174d; border-color: #9d174d; color: #fff; }

/* Loading */
.loading-msg {
  text-align: center;
  color: var(--muted);
  padding: 3rem;
  font-size: .95rem;
}

/* Panel de categoría */
.cat-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Sub-tabs Clasificación / Resultados */
.view-tabs {
  display: flex;
  gap: .5rem;
  border-bottom: 2px solid var(--line);
  padding-bottom: .5rem;
}

.view-tab {
  background: none;
  border: none;
  padding: .45rem 1.1rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: all .2s;
}

.view-tab:hover { color: var(--ink); }

.view-tab.active {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: 2px solid #fff;
  margin-bottom: -2px;
}

/* Tabla clasificación */
.tabla-clasificacion {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

.tabla-clasificacion thead tr {
  background: var(--ink);
  color: #fff;
}

.tabla-clasificacion th {
  padding: .6rem .75rem;
  text-align: center;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.tabla-clasificacion th:first-child,
.tabla-clasificacion td:first-child { text-align: center; width: 36px; }

.tabla-clasificacion th.col-equipo,
.tabla-clasificacion td.col-equipo { text-align: left; padding-left: 1rem; }

.tabla-clasificacion td {
  padding: .6rem .75rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.tabla-clasificacion tbody tr:last-child td { border-bottom: none; }

.tabla-clasificacion tbody tr:hover { background: var(--paper); }

.tabla-clasificacion tbody tr.es-plasencia {
  background: #fffbeb;
  font-weight: 700;
}

.tabla-clasificacion tbody tr.es-plasencia td { color: var(--ink); }

.col-pts {
  font-weight: 900;
  font-size: .95rem;
  color: var(--red);
}

.pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 900;
  font-size: .78rem;
}

.pos-1 { background: #fbbf24; color: #78350f; }
.pos-2 { background: #94a3b8; color: #1e293b; }
.pos-3 { background: #b45309; color: #fff; }

/* Resultados por jornada */
.jornadas-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.jornada-bloque {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.jornada-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: .5rem 1rem;
  font-size: .8rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-family: 'Outfit', sans-serif;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

.badge-jornada-stream {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #fee2e2;
  color: #991b1b;
  font-size: .72rem;
  font-weight: 800;
  padding: .2rem .6rem;
  border-radius: 999px;
  text-transform: none;
  letter-spacing: normal;
}

.partido-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr minmax(115px, auto);
  align-items: center;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
  gap: .5rem;
}

.col-streaming {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}

.col-streaming .no-stream {
  color: #cbd5e1;
  font-weight: 700;
  font-size: .85rem;
  user-select: none;
}

.btn-streaming-match {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #dc2626;
  color: #fff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: .75rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s ease;
  box-shadow: 0 2px 6px rgba(220, 38, 38, .25);
  white-space: nowrap;
}

.btn-streaming-match:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(220, 38, 38, .35);
}

.btn-streaming-match.is-twitch {
  background: #9146ff;
  box-shadow: 0 2px 6px rgba(145, 70, 255, .25);
}

.btn-streaming-match.is-twitch:hover {
  background: #772ce8;
  box-shadow: 0 4px 10px rgba(145, 70, 255, .35);
}

.live-dot-red {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

/* Modal de Streaming */
.modal-streaming-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-streaming-card {
  background: #fff;
  border-radius: 16px;
  max-width: 860px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
}

.modal-streaming-header {
  padding: .9rem 1.25rem;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-streaming-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: .95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-streaming-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: .2rem .5rem;
  border-radius: 6px;
  transition: all .2s;
}

.modal-streaming-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.modal-streaming-body {
  position: relative;
  background: #000;
}

.video-responsive {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.modal-streaming-footer {
  padding: .75rem 1.25rem;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  gap: .75rem;
  flex-wrap: wrap;
}

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

.partido-row.es-plasencia { background: #fffbeb; }

.equipo-local  {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  text-align: right;
  font-weight: 600;
  font-size: .9rem;
}
.equipo-visita {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-align: left;
  font-weight: 600;
  font-size: .9rem;
}

.partido-row .escudo-equipo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.equipo-local.plasencia,
.equipo-visita.plasencia { color: var(--red); font-weight: 800; }

.marcador {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  white-space: nowrap;
}

.marcador-gol { min-width: 28px; text-align: center; }

.marcador-sep {
  color: var(--muted);
  font-weight: 400;
  font-size: .9rem;
}

.marcador.victoria-plasencia .marcador-gol:first-child { color: var(--red); }
.marcador.derrota-plasencia  .marcador-gol:last-child  { color: var(--red); }

.partido-pendiente .marcador {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 600;
}

.sin-datos {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
  font-size: .9rem;
}

@media (max-width: 768px) {
  .cat-tabs { gap: .5rem; }
  .cat-grupo-label { font-size: .65rem; }
  .cat-tab { font-size: .78rem; padding: .4rem .75rem; }

  .tabla-clasificacion { font-size: .78rem; }
  .tabla-clasificacion th,
  .tabla-clasificacion td { padding: .5rem .4rem; }

  .col-gf, .col-gc { display: none; }

  .partido-row {
    grid-template-columns: 1fr auto 1fr;
    padding: .6rem .75rem;
    gap: .4rem .3rem;
  }
  .col-streaming {
    grid-column: 1 / -1;
    margin-top: .35rem;
  }
  .col-streaming .no-stream {
    display: none;
  }
  .equipo-local, .equipo-visita {
    font-size: .75rem;
    line-height: 1.25;
    gap: 6px;
  }
  .partido-row .escudo-equipo {
    width: 20px;
    height: 20px;
  }
  .badge-plasencia {
    font-size: .75rem !important;
    padding: 1px 6px 1px 3px !important;
  }
  .badge-plasencia img {
    width: 20px !important;
    height: 20px !important;
  }
  .tabla-clasificacion td.col-equipo {
    font-size: .75rem;
  }
  .tabla-clasificacion td.col-equipo .escudo-equipo {
    width: 22px;
    height: 22px;
  }
  .marcador { font-size: .95rem; }
}

@media (max-width: 480px) {
  .equipo-local, .equipo-visita {
    font-size: .70rem;
    gap: 4px;
  }
  .partido-row .escudo-equipo {
    width: 18px;
    height: 18px;
  }
  .badge-plasencia {
    font-size: .70rem !important;
    padding: 1px 5px 1px 3px !important;
  }
  .badge-plasencia img {
    width: 18px !important;
    height: 18px !important;
  }
  .tabla-clasificacion td.col-equipo {
    font-size: .70rem;
  }
  .tabla-clasificacion td.col-equipo .escudo-equipo {
    width: 20px;
    height: 20px;
  }
}

/* ============================================================
   ESTADÍSTICAS Y MODAL DE ACTA (INTEGRADO)
   ============================================================ */
.modal-acta-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-acta-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.modal-acta-header {
  padding: 1rem 1.25rem;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.acta-marcador-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex: 1;
}

.acta-equipo-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.95rem;
}

.acta-equipo-header img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.acta-resultado-central {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--yellow, #fec30a);
  display: flex;
  gap: 0.3rem;
}

.modal-acta-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}

.modal-acta-close:hover { color: #ffffff; }

.acta-tabs {
  display: flex;
  border-bottom: 1px solid var(--line, #e2e8f0);
  background: #f8fafc;
}

.acta-tab {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.85rem;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.acta-tab.active {
  color: #0f172a;
  border-bottom-color: var(--yellow, #fec30a);
  background: #ffffff;
}

.acta-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.acta-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  gap: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

.acta-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--yellow, #fec30a);
  border-radius: 50%;
  animation: actaSpin 0.8s linear infinite;
}

@keyframes actaSpin { to { transform: rotate(360deg); } }

.stats-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.stats-resumen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
}

.stats-card {
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
}

.stats-card-valor {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #0f172a;
}
.stats-card-valor.verde { color: #10b981; }
.stats-card-valor.amarillo { color: #f59e0b; }
.stats-card-valor.rojo { color: #ef4444; }

.stats-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.stats-racha { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.racha-item {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.8rem;
  color: #ffffff;
}
.racha-item.V { background: #10b981; }
.racha-item.E { background: #f59e0b; }
.racha-item.D { background: #ef4444; }

.btn-acta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #0f172a;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-acta:hover { background: #1e293b; transform: translateY(-1px); }
.btn-acta.en-directo { background: #dc2626; box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25); }

.acta-jugador-foto,
.goleador-foto,
.acta-jugador-row img:not(.escudo-equipo),
.tabla-goleadores img {
  display: none !important;
}
