/* =============================================
   VOLLEYSCORE — style.css v9
   Banco siempre abajo (sin rotar) - Solo cancha rota
   ============================================= */

/* ═══════════════════════════════════════════════════════════════════════════
   VARIABLES GLOBALES
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --court-bg: #eab676;
  /*--court-bg: #f5c842;*/
  --court-line: rgba(255,255,255,0.4);
  --court-mid-line: rgba(255,255,255,0.6);
  --net-color: #f5c842;
  --body-bg: #0f0f1a;
  --card-bg: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.1);
  --text-main: #f0f0f0;
  --text-muted: rgba(240,240,240,0.45);
  --selected-ring: #f5c842;
  --radius: 8px;
}

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

body {
  background: var(--body-bg);
  color: var(--text-main);
  font-family: 'Barlow', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PANEL DE PARTIDOS GUARDADOS
   ═══════════════════════════════════════════════════════════════════════════ */
.panel-partidos {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  max-height: 70vh;
  background: #1a1a2e;
  border: 1px solid var(--border);
  border-radius: 12px;
  z-index: 300;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-partidos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid var(--border);
  font-weight: bold;
}

.lista-partidos-panel {
  padding: 10px;
  overflow-y: auto;
  max-height: 60vh;
}

.partido-item-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
  flex-wrap: wrap;
}

.partido-nombre-panel {
  font-size: 11px;
  word-break: break-all;
  flex: 1;
  font-family: monospace;
}

.partido-acciones-panel {
  display: flex;
  gap: 5px;
}

.partidos-vacio {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER Y CONTROLES PRINCIPALES
   ═══════════════════════════════════════════════════════════════════════════ */
.match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  padding: 10px 20px;
}
.match-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.meta-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-main);
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  padding: 4px 8px;
  outline: none;
}
.meta-input:focus { border-color: rgba(255,255,255,0.35); }

.modal-numero {
  max-width: 320px;
  text-align: center;
}

.modal-numero-hint {
  font-size: 13px;
  color: #aaa;
  margin: 6px 0 14px;
}

.input-numero {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 2px;
  border-radius: 10px;
  border: 2px solid #444;
  background: #1c1c1c;
  color: #fff;
  outline: none;
}

.input-numero:focus {
  border-color: #4a90d9;
}

/* Barra de controles unificada */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.controls-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.center-controls {
  justify-content: center;
  flex: 1;
}

/* Botones genéricos */
.ctrl-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-main);
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.ctrl-btn:hover { background: rgba(255,255,255,0.14); }
.ctrl-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.ctrl-btn.small { font-size: 15px; padding: 4px 8px; }
.ctrl-btn.danger { border-color: rgba(220,60,60,0.4); color: #e07070; }
.ctrl-btn.danger:hover { background: rgba(220,60,60,0.15); }
.ctrl-btn.next-set-btn { border-color: rgba(80,180,255,0.5); color: #80c8ff; }

.rotate-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.rotate-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

/* Checkbox auto rotación */
.check-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOMBRES DE EQUIPOS Y COLORES
   ═══════════════════════════════════════════════════════════════════════════ */
.team-names-bar {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.team-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.team-name-wrap.align-right {
  justify-content: flex-end;
}
.names-spacer { flex: 0 0 50px; }
.team-name-input {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 900;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.15);
  color: var(--text-main);
  width: 100%;
  outline: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.team-name-input.right { text-align: right; }
.team-name-input:focus { border-bottom-color: rgba(255,255,255,0.5); }

/* Selectores de color */
.color-dots {
  display: flex;
  gap: 5px;
}
.color-dots input[type="color"] {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  background: none;
  -webkit-appearance: none;
}
.color-dots input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-dots input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }

/* ═══════════════════════════════════════════════════════════════════════════
   MARCADOR (PUNTOS Y SETS)
   ═══════════════════════════════════════════════════════════════════════════ */
.scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}
.score-mid {
  text-align: center;
  min-width: 160px;
}
.sets-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 2px;
}
.sets-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
}
.sets-sep {
  font-size: 11px;
  color: var(--text-muted);
}
.pts-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pts {
  font-family: 'Barlow Condensed', sans-serif;
  /*font-size: 68px;*/
	font-size: 52px;
  font-weight: 900;
  line-height: 1;
  min-width: 52px;
  text-align: center;
}
.score-sep {
  font-size: 30px;
  font-weight: 900;
  font-family: 'Barlow Condensed', sans-serif;
  color: var(--text-muted);
  min-width: 36px;
  display: inline-block;
  text-align: center;
  transition: color 0.2s;
}
.set-announce-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}
.set-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.match-announce {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--net-color);
  min-height: 16px;
}

/* Botones de anotar punto (+ grandes) */
.score-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: var(--text-main);
  font-size: 34px;
  font-weight: 900;
  font-family: 'Barlow Condensed', sans-serif;
  line-height: 1;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.score-btn:hover { filter: brightness(1.2); }
.score-btn:active { transform: scale(0.92); }

/* ═══════════════════════════════════════════════════════════════════════════
   CANCHA Y RED
   ═══════════════════════════════════════════════════════════════════════════ */
.court-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
}
.team-zone {
  flex: 1;
  max-width: 450px;
}
.court {
  background: var(--court-bg);
  border: 2px solid var(--court-line);
  border-radius: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: visible;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Red central */
.net-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: stretch;
  width: 40px;
  margin: 0 4px;
}
.net-line {
  flex: 1;
  width: 6px;
  background: #f5c842;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(245,200,66,0.6);
  min-width: 6px;
}
.net-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  background: rgba(0,0,0,0.4);
  border-radius: 20px;
  margin: 2px 0;
}
.saque-arrow {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  transition: content 0.3s;
}
.pelota-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s;
  padding: 4px 10px;
  border-radius: 30px;
  color: #ffffff;
  text-shadow: 0 0 3px rgba(0,0,0,0.5);
}
.pelota-btn:hover { transform: scale(1.4); background: rgba(0,0,0,0.3); }
.pelota-btn:active { transform: scale(0.95); }

/* ═══════════════════════════════════════════════════════════════════════════
   JUGADORES EN CANCHA
   ═══════════════════════════════════════════════════════════════════════════ */
.jugador {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 30px;
  font-weight: 900;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease-out;
  user-select: none;
  z-index: 2;
  width: 54px;
  height: 54px;
  margin-left: -27px;
  margin-top: -27px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.jugador:hover { filter: brightness(1.1); transform: scale(1.05); }
.jugador.seleccionado {
  border-color: var(--selected-ring) !important;
  box-shadow: 0 0 0 4px rgba(245,200,66,0.5);
  transform: scale(1.05);
}

/* Posiciones LOCAL */
#court-L .pos-1 { top: 83%; left: 25%; }
#court-L .pos-2 { top: 83%; left: 75%; }
#court-L .pos-3 { top: 50%; left: 75%; }
#court-L .pos-4 { top: 17%; left: 75%; }
#court-L .pos-5 { top: 17%; left: 25%; }
#court-L .pos-6 { top: 50%; left: 25%; }
#court-L .pos-1.sacando { top: 94%; left: 25%; }

/* Posiciones VISITANTE */
#court-V .pos-1 { top: 17%; left: 75%; }
#court-V .pos-2 { top: 17%; left: 25%; }
#court-V .pos-3 { top: 50%; left: 25%; }
#court-V .pos-4 { top: 83%; left: 25%; }
#court-V .pos-5 { top: 83%; left: 75%; }
#court-V .pos-6 { top: 50%; left: 75%; }
#court-V .pos-1.sacando { top: 6%; left: 75%; }

/* ═══════════════════════════════════════════════════════════════════════════
   BANCOS (sin rotación - siempre horizontales)
   ═══════════════════════════════════════════════════════════════════════════ */
.benches-row {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  width: 100%;
}
.bench-zone-wrapper {
  flex: 1;
}
.bench-zone {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
}
.bench-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 6px;
  text-align: center;
}
.bench {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  min-height: 48px;
}
.bench .jugador {
  position: static;
  width: 42px !important;
  height: 42px !important;
  margin: 0 !important;
  font-size: 18px;
  flex-shrink: 0;
}
.bench-add-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bench-add-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.4);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.bench-add-btn:hover .bench-add-circle {
  border-color: rgba(255,255,255,0.6);
  color: rgba(255,255,255,0.8);
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════════════════════════════════════
   INFO BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.sel-info-bar {
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(245,200,66,0.05);
  border-top: 1px solid rgba(245,200,66,0.1);
  border-bottom: 1px solid rgba(245,200,66,0.1);
  text-align: center;
  font-family: 'Barlow', monospace;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ESTADÍSTICAS
   ═══════════════════════════════════════════════════════════════════════════ */
.stats-section { border-top: 1px solid var(--border); }
.stats-toggle {
  width: 100%;
  background: var(--card-bg);
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  text-align: left;
}
.stats-toggle:hover { background: rgba(255,255,255,0.06); }
.stats-panel {
  padding: 10px 12px;
  background: var(--card-bg);
}
.stats-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.stat-btn {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 700;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s;
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
}
.stat-btn.positivo { color: #5dcc72; border-color: rgba(80,200,100,0.4); }
.stat-btn.positivo.activo { background: rgba(80,200,100,0.2); border-color: #5dcc72; }
.stat-btn.neutro { color: #e05555; border-color: rgba(220,80,80,0.4); }
.stat-btn.neutro.activo { background: rgba(220,80,80,0.2); border-color: #e05555; }
.stat-btn.accion { font-size: 18px; }
.stat-btn.accion.activo { background: rgba(100,150,255,0.2); border-color: rgba(100,150,255,0.6); color: #99b8ff; }
.stat-divider {
  width: 1px; height: 28px;
  background: var(--border);
  margin: 0 4px;
}
.stat-selected {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}
.action-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-main);
  font-size: 20px;
  padding: 5px 12px;
  cursor: pointer;
}
.action-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════════════════════
   ESTADÍSTICAS AVANZADAS
   ═══════════════════════════════════════════════════════════════════════════ */
.stats-avanzadas {
  margin-top: 12px;
  border-top: 1px solid var(--border);
}
.stats-avanzadas-toggle {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: none;
  color: var(--text-muted);
  font-family: 'Barlow', sans-serif;
  font-size: 20px;
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
}
.stats-avanzadas-toggle:hover {
  background: rgba(255,255,255,0.05);
}
.stats-avanzadas-panel {
  padding: 10px;
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
  margin-top: 5px;
}

.filtros-linea {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.filtro-jugador-linea {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.filtro-jugador-linea select {
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-main);
  padding: 6px 10px;
  font-size: 12px;
  min-width: 110px;
}
.filtro-jugador-linea select option {
  background: #1a1a2e;
  color: var(--text-main);
}
.filtro-jugador-linea select:focus {
  outline: none;
  border-color: rgba(255,255,255,0.4);
}

#btn-puntos-por-saque {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  white-space: nowrap;
  padding: 6px 12px;
}
#btn-puntos-por-saque.activo {
  background: rgba(80,150,255,0.3);
  border-color: #6db3ff;
  color: #6db3ff;
}

.resumen-saques {
  margin-top: 10px;
}
.resumen-equipo-separador {
  font-size: 12px;
  font-weight: bold;
  color: var(--net-color);
  margin-top: 10px;
  margin-bottom: 5px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--border);
}
.resumen-equipo-separador:first-child {
  margin-top: 0;
}
.resumen-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  margin-bottom: 4px;
}
.resumen-jugador {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  min-width: 45px;
}
.resumen-puntos {
  font-size: 13px;
  color: #f5c842;
  min-width: 80px;
}
.resumen-bar {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  overflow: hidden;
}
.resumen-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.resumen-vacio {
  color: var(--text-muted);
  font-style: italic;
  font-size: 12px;
  padding: 10px;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GRÁFICOS
   ═══════════════════════════════════════════════════════════════════════════ */
.graficos-section {
  border-top: 1px solid var(--border);
}
.grafico-set-wrap {
  border-bottom: 1px solid var(--border);
}
.grafico-toggle {
  width: 100%;
  background: var(--card-bg);
  border: none;
  color: var(--text-muted);
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  padding: 8px 14px;
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
}
.grafico-toggle:hover { background: rgba(255,255,255,0.05); }
.grafico-body {
  padding: 10px;
  background: rgba(0,0,0,0.15);
}
.grafico-body canvas {
  width: 100% !important;
  height: 130px !important;
  display: block;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HISTORIAL
   ═══════════════════════════════════════════════════════════════════════════ */
.history-section {
  padding: 12px;
  border-top: 1px solid var(--border);
}
.history-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
}
.history-empty {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px;
  text-align: center;
}
.history-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.45;
}
.h-time { font-size: 10px; color: var(--text-muted); margin-right: 6px; }
.h-set { font-weight: 700; color: var(--net-color); margin: 0 4px; }
.h-score { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 700; margin-right: 8px; }
.h-accion { display: inline; color: var(--text-main); }

.history-item.rotacion    { border-left: 3px solid rgba(100,200,100,0.5); }
.history-item.sustitucion { border-left: 3px solid rgba(200,150,255,0.5); }
.history-item.estadistica { border-left: 3px solid rgba(245,200,66,0.4); }
.history-item.intercambio { border-left: 3px solid rgba(100,180,255,0.4); }
.history-item.punto-L     { border-left: 3px solid rgba(80,150,255,0.6); }
.history-item.punto-V     { border-left: 3px solid rgba(255,100,100,0.6); }

/* ═══════════════════════════════════════════════════════════════════════════
   MODALES
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.modal {
  background: #1a1a2e;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
}
.modal select {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-main);
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  padding: 6px 10px;
  outline: none;
  width: 100%;
}
.modal select option { background: #1a1a2e; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

.modal-wide {
  min-width: 400px;
  max-width: 90vw;
}
.modal-fullscreen {
  width: 90vw;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-ver-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.ver-partido-resumen {
  font-size: 13px;
}
.ver-partido-historial {
  max-height: 400px;
  overflow-y: auto;
  margin-top: 10px;
}
.lista-partidos {
  max-height: 300px;
  overflow-y: auto;
}
.partido-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
  flex-wrap: wrap;
}
.partido-nombre {
  font-size: 12px;
  word-break: break-all;
  flex: 1;
}
.partido-acciones {
  display: flex;
  gap: 5px;
}

.modal-set {
  max-width: 800px;
  width: 90%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 1px;
}

.modal-set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 25px;
}

.modal-set-card {
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.modal-set-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.card-title {
  text-align: center;
  padding: 12px;
  font-weight: bold;
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: white;
}

.card-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.set-action-btn {
  padding: 12px 16px;
  border: none;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.5px;
}

.set-action-btn.load-btn {
  background: linear-gradient(135deg, #2c3e50, #1a1a2e);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}

.set-action-btn.load-btn:hover {
  background: linear-gradient(135deg, #3d566e, #2a2a42);
  transform: scale(1.02);
}

.set-action-btn.save-btn {
  background: linear-gradient(135deg, #27ae60, #1e8449);
  color: white;
}

.set-action-btn.save-btn:hover {
  background: linear-gradient(135deg, #2ecc71, #239b56);
  transform: scale(1.02);
}

.modal-set-footer {
  padding: 15px 25px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.2);
}

.set-btn {
  background: linear-gradient(135deg, #f39c12, #e67e22) !important;
  color: white !important;
  font-weight: bold !important;
  padding: 8px 16px !important;
}

.set-btn:hover {
  background: linear-gradient(135deg, #f1c40f, #f39c12) !important;
  transform: scale(1.02);
}

.panel-partidos {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 5px;
  background: #1e1e2e;
  border-radius: 12px;
  min-width: 280px;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
}

.set-action-btn.reset-btn {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: white;
}

.set-action-btn.reset-btn:hover {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  transform: scale(1.02);
}

.developer-link {
  flex-shrink: 0;
}

.whatsapp-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #25D366;
  color: white;
  padding: 6px 12px;
  border-radius: 40px;
  text-decoration: none;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.2);
}

.whatsapp-link:hover {
  background-color: #128C7E;
  transform: scale(1.02);
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3);
}

.whatsapp-icon {
  width: 14px;
  height: 14px;
}

.match-meta {
  display: flex;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.meta-input {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: white;
  font-family: 'Barlow', sans-serif;
  font-size: 0.85rem;
}

@media (max-width: 700px) {
  .match-header {
    flex-direction: column;
    justify-content: center;
  }
  
  .match-meta {
    width: 100%;
    justify-content: center;
  }
  
  .developer-link {
    align-self: flex-start;
  }
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* ═══════════════════════════════════════════════════════════════════════════
   ROTACIÓN DE VISTA - VERSIÓN FINAL (SIN ESPACIOS VACÍOS)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Fondo celeste para el campo */
.campo {
  background-color: #3c82f7;
  border-radius: 0;
  padding: 15px;
}

/* Contenedor principal */
.court-wrapper {
  margin: 20px auto;
  position: relative;
  z-index: 5;
}

/* El contenido que rota */
.contenido-rotable {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
}

/* Rotaciones normales */
.court-wrapper.rotate-view-0 .contenido-rotable {
  transform: rotate(0deg);
}
.court-wrapper.rotate-view-180 .contenido-rotable {
  transform: rotate(180deg);
}

/* Rotación 90° y -90° */
.court-wrapper.rotate-view-90 .contenido-rotable {
  transform: rotate(90deg);
}
.court-wrapper.rotate-view--90 .contenido-rotable {
  transform: rotate(-90deg);
}

/* Cuando está vertical: proporción corregida */
.court-wrapper.rotate-view-90 .court,
.court-wrapper.rotate-view--90 .court {
  aspect-ratio: auto !important;
  height: auto !important;
  width: 180px !important;
  min-height: 320px !important;
}

/* Escalamos el campo completo */
.court-wrapper.rotate-view-90 .campo,
.court-wrapper.rotate-view--90 .campo {
  width: auto;
  display: inline-block;
  margin: 0 auto;
}

/* Bancos: siempre fijos abajo */
.court-wrapper.rotate-view-90 .benches-row,
.court-wrapper.rotate-view--90 .benches-row,
.court-wrapper.rotate-view-180 .benches-row {
  transform: none;
  margin-top: 10px !important;
  margin-bottom: 0 !important;
  position: relative;
  z-index: 1;
}

/* Centrar el contenido rotado */
.court-wrapper.rotate-view-90 .contenido-rotable,
.court-wrapper.rotate-view--90 .contenido-rotable {
  text-align: center;
  display: flex;
  justify-content: center;
}

/* Rotar números de jugadores SOLO en cancha */
.court-wrapper.rotate-view-90 .court .jugador {
  transform: translate(-50%, -50%) rotate(-90deg) !important;
}
.court-wrapper.rotate-view--90 .court .jugador {
  transform: translate(-50%, -50%) rotate(90deg) !important;
}
.court-wrapper.rotate-view-180 .court .jugador {
  transform: translate(-50%, -50%) rotate(180deg) !important;
}

/* Los números del banco NO rotan */
.bench .jugador {
  transform: none;
}

/* Controles por encima */
.match-header,
.controls-bar,
.team-names-bar,
.scoreboard,
.sel-info-bar {
  position: relative;
  z-index: 20;
  background: var(--body-bg);
}

.score-btn {
  position: relative;
  z-index: 25;
}

/* Márgenes ajustados - SIN ESPACIO VACÍO */
.court-wrapper.rotate-view-90,
.court-wrapper.rotate-view--90 {
  margin: 50px auto 0 auto !important;
  padding: 0 !important;
  min-height: auto !important;
  height: auto !important;
}

/* Forzar eliminación de espacios en elementos relacionados */
.court-wrapper.rotate-view-90 .benches-row,
.court-wrapper.rotate-view--90 .benches-row,
.court-wrapper.rotate-view-90 .bench-zone,
.court-wrapper.rotate-view--90 .bench-zone,
.court-wrapper.rotate-view-90 .bench,
.court-wrapper.rotate-view--90 .bench {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Ajustar el sel-info-bar para que quede pegado */
.court-wrapper.rotate-view-90 + .sel-info-bar,
.court-wrapper.rotate-view--90 + .sel-info-bar {
  margin-top: -5px !important;
  padding-top: 5px !important;
}

/* Prevenir cualquier min-height inline desde JavaScript */
.court-wrapper.rotate-view-90,
.court-wrapper.rotate-view--90 {
  min-height: auto !important;
  height: auto !important;
}

/* Responsive */
@media (max-width: 700px) {
  .court-wrapper.rotate-view-90 .court,
  .court-wrapper.rotate-view--90 .court {
    width: 140px !important;
    min-height: 260px !important;
  }
  
  .court-wrapper.rotate-view-90,
  .court-wrapper.rotate-view--90 {
    margin: 40px auto 0 auto !important;
  }
  
  .court-wrapper.rotate-view-90 + .sel-info-bar,
  .court-wrapper.rotate-view--90 + .sel-info-bar {
    margin-top: -3px !important;
  }
}
/* ═══════════════════════════════════════════════════════════════════════════
   CAMBIO FLOTANTE — badge adosado al jugador de cancha
   ═══════════════════════════════════════════════════════════════════════════ */
.jugador .flotante-badge {
  position: absolute;
  top: -25%;
  right: -25%;
  width: 50%;
  height: 50%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.6em;
  font-weight: 900;
  line-height: 1;
  border: 2px solid #555;
  background: #e0e0e0;
  color: #333;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
  z-index: 4;
  pointer-events: none;
}
/* ═══════════════════════════════════════════════════════════════
   ESTADÍSTICAS HISTÓRICAS
   ═══════════════════════════════════════════════════════════════ */
.stats-page {
  background: var(--body-bg);
  min-height: 100vh;
  padding-bottom: 40px;
}

.stats-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--body-bg);
  z-index: 10;
}

.stats-header h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.stats-back-btn {
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stats-back-btn:hover { background: rgba(255,255,255,0.08); }

.stats-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stats-filters {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stats-toggle {
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.stats-filters-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stats-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.stats-filter-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  min-width: 90px;
}
.stats-filter-label .req { color: #e07070; }

.stats-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.stats-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.stats-chip input { display: none; }
.stats-chip:hover { background: rgba(255,255,255,0.1); }
.stats-chip.activo {
  background: rgba(80,150,255,0.25);
  border-color: #6db3ff;
  color: #b8d4ff;
}

.stats-hint, .stats-loading {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.stats-date {
  padding: 6px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-main);
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
}

.stats-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* Resumen */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.stats-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stats-card-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 30px;
  font-weight: 900;
  color: var(--net-color);
  line-height: 1;
}
.stats-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Tabla */
.stats-table-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.stats-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}
.stats-table-wrap { overflow-x: auto; }
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.stats-table thead th {
  background: rgba(0,0,0,0.3);
  padding: 8px 10px;
  text-align: left;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.stats-table thead th:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-main);
}
.stats-table thead th.sort-activo { color: var(--net-color); }
.stats-table tbody tr {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.stats-table tbody tr:hover { background: rgba(255,255,255,0.05); }
.stats-table td { padding: 8px 10px; color: var(--text-main); }
.stats-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
}
.stats-zero { color: var(--text-muted); }

/* Detalle */
.stats-detail {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.stats-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.stats-detail-header h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
}
.stats-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.stats-detail-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--text-muted);
}
.stats-detail-bar-label span:last-child {
  color: var(--text-main);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
}
.stats-detail-bar-track {
  height: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 5px;
  overflow: hidden;
}
.stats-detail-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2ecc71, #27ae60);
  transition: width 0.3s;
}
.stats-detail-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stats-detail-meta b {
  color: var(--net-color);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
}

.stats-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 700px) {
  .stats-filter-label { min-width: 100%; }
  .stats-table { font-size: 12px; }
  .stats-table thead th, .stats-table td { padding: 6px 6px; }
  .stats-card-value { font-size: 24px; }
  .stats-header h1 { font-size: 18px; }
}

/* Colores de ++ y = en la tabla */
.stats-table td.stats-pp { color: #5dcc72; }
.stats-table td.stats-eq { color: #e05555; }

/* Bloque de totales en el detalle */
.stats-detail-totales {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.stats-detail-totales-bloque {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
}
.stats-detail-totales-pp { border-color: rgba(93,204,114,0.4); }
.stats-detail-totales-eq { border-color: rgba(224,85,85,0.4); }
.stats-detail-totales-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  color: var(--net-color);
}
.stats-detail-totales-pp .stats-detail-totales-num { color: #5dcc72; }
.stats-detail-totales-eq .stats-detail-totales-num { color: #e05555; }
.stats-detail-totales-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 4px;
}

.stats-detail-sub {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 20px 0 10px;
}

.stats-evolucion-wrap {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
}
.stats-evolucion-wrap canvas {
  display: block;
  width: 100%;
  border-radius: 4px;
}
/* ═══════════════════════════════════════════════════════════════
   DESGLOSE CLICKEABLE ++ / =
   ═══════════════════════════════════════════════════════════════ */
.stats-detail-totales-bloque.clickeable {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.stats-detail-totales-bloque.clickeable:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.stats-detail-totales-bloque.clickeable:active {
  transform: translateY(0);
}

.stats-desglose-panel {
  margin-top: 8px;
  animation: fadeSlideIn 0.25s ease-out;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   LEYENDA DE EVOLUCIÓN POR FECHA
   ═══════════════════════════════════════════════════════════════ */
.stats-evolucion-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.stats-evolucion-legend-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  transition: background 0.15s;
}
.stats-evolucion-legend-item:hover {
  background: rgba(255,255,255,0.07);
}

.stats-evolucion-legend-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats-evolucion-legend-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 92px;
}

.stats-evolucion-legend-fecha {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  min-width: 82px;
}

.stats-evolucion-legend-rival {
  flex: 1;
  color: var(--text-main);
}

.stats-evolucion-legend-nums {
  display: flex;
  gap: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
}
.stats-evolucion-legend-nums .pp { color: #5dcc72; }
.stats-evolucion-legend-nums .eq { color: #e05555; }

.stats-evolucion-legend-cat {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(245,200,66,0.15);
  color: var(--net-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  white-space: nowrap;
}

.stats-evolucion-legend-liga {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(100,150,255,0.15);
  color: #99b8ff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .stats-evolucion-legend-bottom {
    padding-left: 0;
  }
  .stats-evolucion-legend-fecha { min-width: auto; }
  .stats-evolucion-legend-top { flex-wrap: wrap; }
  .stats-evolucion-legend-rival { flex: 1 1 100%; order: 2; }
}

/* ═══════════════════════════════════════════════════════════════
   PUNTOS DE SAQUE — GANADOS / PERDIDOS
   ═══════════════════════════════════════════════════════════════ */

/* Columna en la tabla */
.stats-table .ps-gan   { color: #5dcc72; font-weight: 700; }
.stats-table .ps-perd  { color: #e05555; font-weight: 700; }
.stats-table .ps-pct   {
  color: var(--text-muted);
  font-size: 11px;
  margin-left: 4px;
}

/* Tarjeta destacada en el detalle */
.stats-detail-totales-saque {
  background: linear-gradient(180deg,
    rgba(245,200,66,0.06) 0%,
    rgba(245,200,66,0.02) 100%) !important;
  border-color: rgba(245,200,66,0.35) !important;
}

.stats-detail-totales-saque-nums {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}
.stats-detail-totales-saque-nums .gan  { color: #5dcc72; }
.stats-detail-totales-saque-nums .perd { color: #e05555; }
.stats-detail-totales-saque-nums .sep  {
  color: var(--text-muted);
  font-size: 22px;
  margin: 0 2px;
}
/* Control "Últimos X partidos" */
.stats-ultimos {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px 6px;
}

.stats-ultimos-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background 0.15s;
}
.stats-ultimos-btn:hover { background: rgba(255,255,255,0.15); }
.stats-ultimos-btn:active { transform: scale(0.94); }

.stats-ultimos-input {
  width: 48px;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
  outline: none;
  -moz-appearance: textfield;
}
.stats-ultimos-input::-webkit-outer-spin-button,
.stats-ultimos-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stats-ultimos-hint {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 4px 0 2px;
  white-space: nowrap;
}
/* ═══════════════════════════════════════════════════════════════════════════
   PUNTOS CON EL SAQUE — numero verde al lado del jugador que saca
   ═══════════════════════════════════════════════════════════════════════════ */
.jugador .saque-puntos {
  position: absolute;
  bottom: -27%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 54%;
  height: 54%;
  padding: 0 2px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.62em;
  font-weight: 900;
  line-height: 1;
  background: #22c55e;
  color: #05230f;
  border: 2px solid rgba(0,0,0,0.45);
  box-shadow: 0 1px 4px rgba(0,0,0,0.6);
  z-index: 6;
  pointer-events: none;
}