/*
   PARTIDOS — APUESTAFUTBOL.NET
   Tema claro, Outfit, responsive
*/

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

:root {
  --bg: #FDFDF7;
  --card: #FFFFFF;
  --border: #E5E5E0;
  --text: #1A1A1A;
  --muted: #6B6B6B;
  --accent: #2563EB;
  --local: #367196;
  --draw: #999999;
  --away: #009a82;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.header-date {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

/* ═══ MAIN CONTAINER ═══ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 32px;
  font-weight: 400;
}

/* ═══ MATCHES GRID ═══ */
.matches-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

/* ═══ MATCH CARD ═══ */
.match-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr;
}

.match-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* Card Header — fecha, hora, equipos */
.match-header {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid var(--border);
  min-width: 200px;
}

.match-datetime {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.match-date { 
  font-weight: 600; 
  white-space: nowrap;
}

.match-time {
  padding: 2px 8px;
  background: var(--bg);
  border-radius: 4px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.8rem;
}

.match-teams {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-badge {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.team-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* Card Body — estadísticas */
.match-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  flex: 1;
}

.stat-block {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.stat-block:last-child {
  border-bottom: none;
}

.stat-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ═══ SLIDER 1X2 ═══ */
.seg-track {
  height: 8px;
  display: flex;
  border-radius: 2px;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 6px;
}

.seg-bar {
  height: 100%;
  transition: flex 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.seg-bar.local { background: var(--local); }
.seg-bar.draw  { background: var(--draw); }
.seg-bar.away  { background: var(--away); }

.seg-legend {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.seg-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: flex 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}

.seg-dot {
  display: none; /* Ocultar puntos */
}

.seg-label {
  display: none; /* Ocultar nombres de equipos */
}

.seg-pct {
  font-size: 0.85rem;
  font-weight: 700;
}

.seg-pct.local { color: var(--local); }
.seg-pct.draw  { color: var(--draw); }
.seg-pct.away  { color: var(--away); }

/* ═══ RESULTADOS MÁS PROBABLES ═══ */
.score-grid {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  padding: 4px 0 2px;
}

.score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 2px solid;
  background: var(--bg);
  cursor: pointer;
  transition: transform 0.2s;
  padding: 6px 10px;
}

.score-box:hover {
  transform: translateY(-3px);
}

.score-box.rank-1 {
  width: 90px;
  height: 54px;
  border-color: var(--local);
}

.score-box.rank-2 {
  width: 80px;
  height: 48px;
  border-color: var(--draw);
}

.score-box.rank-3 {
  width: 70px;
  height: 42px;
  border-color: var(--away);
}

.score-result {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.score-box.rank-2 .score-result { font-size: 1.2rem; }
.score-box.rank-3 .score-result { font-size: 1.05rem; }

.score-pct {
  font-size: 0.8rem;
  font-weight: 600;
}

.score-box.rank-1 .score-pct { color: var(--local); }
.score-box.rank-2 .score-pct { color: var(--draw); }
.score-box.rank-3 .score-pct { color: var(--away); }

/* ═══ OVER/UNDER ═══ */
.ou-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ou-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.ou-bar-wrap {
  height: 8px;
  display: flex;
  border-radius: 50px;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 6px;
}

.ou-bar {
  height: 100%;
  transition: flex 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.ou-bar.over  { background: var(--local); }
.ou-bar.under { background: var(--away); }

.ou-legend {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.ou-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: flex 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}

.ou-dot {
  display: none; /* Ocultar puntos */
}

.ou-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
}

.ou-pct {
  font-size: 0.85rem;
  font-weight: 700;
}

.ou-pct.over  { color: var(--local); }
.ou-pct.under { color: var(--away); }

/* ═══ RESPONSIVE ═══ */

/* Móvil: todo vertical */
@media (max-width: 649px) {
  .match-card {
    grid-template-columns: 1fr;
  }
  
  .match-header {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  
  .match-stats {
    grid-template-columns: 1fr;
  }
  
  .stat-block {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  
  .stat-block:last-child {
    border-bottom: none;
  }
}

/* Tablet: equipos a la izquierda, 1 estadística a la derecha */
@media (min-width: 650px) and (max-width: 849px) {
  .match-card {
    grid-template-columns: 220px 1fr;
  }
  
  .match-stats {
    grid-template-columns: 1fr;
  }
  
  .stat-block {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  
  .stat-block:last-child {
    border-bottom: none;
  }
}

/* Desktop pequeño: equipos a la izquierda, 2 estadísticas a la derecha */
@media (min-width: 850px) and (max-width: 1099px) {
  .match-card {
    grid-template-columns: 220px 1fr;
  }
  
  .match-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-block {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  
  .stat-block:nth-child(2n) {
    border-right: none;
  }
  
  .stat-block:nth-child(n+3) {
    border-top: 1px solid var(--border);
  }
}

/* Desktop grande: equipos a la izquierda, 3 estadísticas a la derecha */
@media (min-width: 1100px) {
  .match-card {
    grid-template-columns: 240px 1fr;
  }
  
  .match-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .stat-block {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  
  .stat-block:nth-child(3n) {
    border-right: none;
  }
}

/* ═══ ANIMATIONS ═══ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.match-card {
  animation: fadeIn 0.4s ease both;
}

.match-card:nth-child(1) { animation-delay: 0.05s; }
.match-card:nth-child(2) { animation-delay: 0.10s; }
.match-card:nth-child(3) { animation-delay: 0.15s; }
.match-card:nth-child(4) { animation-delay: 0.20s; }
.match-card:nth-child(5) { animation-delay: 0.25s; }
.match-card:nth-child(6) { animation-delay: 0.30s; }
.match-card:nth-child(7) { animation-delay: 0.35s; }
.match-card:nth-child(8) { animation-delay: 0.40s; }
.match-card:nth-child(9) { animation-delay: 0.45s; }
.match-card:nth-child(10) { animation-delay: 0.50s; }
