/* =========================================================
   ZL • PARTIDO - DARK MODERN ESPORTS
   Diseño premium con resposive que mantiene estilo PC en mobile
   ========================================================= */

/* ---------- 0) PALETA PREMIUM ---------- */
body.single-zlg_partido{
  --bg-dark:#0a0f1c;        /* fondo principal */
  --bg-card:#131a2d;        /* tarjetas */
  --bg-accent:#1a243f;      /* acentos */
  --border:#2a3655;         /* bordes */
  --text-primary:#f0f4ff;   /* texto principal */
  --text-secondary:#b8c2e6; /* texto secundario */
  --accent-1:#00f0ff;       /* azul neón */
  --accent-2:#8b5cf6;       /* púrpura */
  --accent-3:#f59e0b;       /* ámbar */
  --success:#10b981;        /* verde éxito */
  --danger:#ef4444;         /* rojo */
  --glow:0 0 20px;          /* efecto glow */

  color:var(--text-primary);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0,240,255,.08), transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 100%, rgba(139,92,246,.06), transparent 60%),
    linear-gradient(180deg, var(--bg-dark) 0%, #0d1425 100%);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height:1.6;
}

/* Patrón sutil de grid */
body.single-zlg_partido::before{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background-image: 
    linear-gradient(rgba(42,54,85,.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,54,85,.3) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity:.15;
}

/* ---------- 1) CONTENEDOR PRINCIPAL ---------- */
body.single-zlg_partido .zlgc-part{
  max-width:1200px; margin:0 auto; padding:40px 24px;
}

/* Título */
body.single-zlg_partido .zlgc-part > h1{
  font-size:clamp(2rem,4vw,3rem); font-weight:800; text-align:center;
  background:linear-gradient(135deg, var(--text-primary), var(--accent-1));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  margin:0 0 3rem; letter-spacing:-0.02em;
}

/* ---------- 2) SCORE - DISEÑO PREMIUM ---------- */
body.single-zlg_partido .zlgc-score{
  display:grid; gap:2rem; align-items:center;
  grid-template-columns:1fr auto 1fr;
  grid-template-areas:"teamL vs teamV" "scoreL sep scoreV" "meta meta meta";
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:24px;
  padding:2.5rem;
  margin:0 0 3rem;
  position:relative;
  overflow:hidden;
}

/* Efecto de borde luminoso */
body.single-zlg_partido .zlgc-score::before{
  content:""; position:absolute; inset:0;
  border-radius:24px; padding:2px;
  background:linear-gradient(135deg, var(--accent-1), var(--accent-2));
  mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite:exclude; -webkit-mask-composite:xor;
  pointer-events:none;
}

/* Equipos */
body.single-zlg_partido .zlgc-score .team-left a,
body.single-zlg_partido .zlgc-score .team-right a{
  font-size:clamp(1.25rem,2vw,1.75rem); font-weight:700;
  color:var(--text-primary); text-decoration:none;
  padding:12px 20px; border-radius:12px;
  background:var(--bg-accent); border:1px solid var(--border);
  transition:all 0.3s ease;
}

body.single-zlg_partido .zlgc-score .team-left a:hover,
body.single-zlg_partido .zlgc-score .team-right a:hover{
  background:var(--accent-2); transform:translateY(-2px);
  box-shadow:var(--glow) rgba(139,92,246,.4);
}

/* VS */
body.single-zlg_partido .zlgc-score .vs{
  font-size:1.25rem; font-weight:600; color:var(--text-secondary);
  background:var(--bg-accent); padding:8px 16px; border-radius:8px;
}

/* Marcadores */
body.single-zlg_partido .zlgc-score .score-left,
body.single-zlg_partido .zlgc-score .score-right{
  font-size:clamp(3rem,6vw,4rem); font-weight:900;
  color:#ffffff;
  background:linear-gradient(135deg, rgba(0,240,255,0.9), rgba(139,92,246,0.9));
  border:2px solid rgba(255,255,255,0.3);
  border-radius:16px; padding:1rem 1.5rem;
  box-shadow:0 8px 32px rgba(0,0,0,.5), 0 0 25px rgba(0,240,255,0.4);
  text-shadow:0 2px 4px rgba(0,0,0,0.5);
}

/* Separador */
body.single-zlg_partido .zlgc-score .sep{
  font-size:2rem; font-weight:800; color:var(--accent-1);
}

/* Meta chips */
body.single-zlg_partido .zlgc-meta{
  display:flex; gap:12px; justify-content:center; flex-wrap:wrap;
}

body.single-zlg_partido .zlgc-meta .chip{
  background:var(--bg-accent); color:var(--text-secondary);
  padding:8px 16px; border-radius:20px; font-size:.875rem;
  font-weight:600; border:1px solid var(--border);
}

/* ---------- 3) SECCIONES DE MODALIDADES ---------- */
body.single-zlg_partido .zlgc-sections{
  display:grid; gap:2rem; grid-template-columns:repeat(auto-fit, minmax(400px, 1fr));
}

body.single-zlg_partido .zlgc-box{
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:20px; padding:2rem; position:relative;
  overflow:hidden;
}

body.single-zlg_partido .zlgc-box::before{
  content:""; position:absolute; top:0; left:0; right:0; height:4px;
  background:linear-gradient(90deg,var(--accent-1),var(--accent-2));
}

body.single-zlg_partido .zlgc-box > h3{
  font-size:1.5rem; font-weight:700; color:var(--text-primary);
  margin:0 0 1.5rem; padding:0;
  background:none; box-shadow:none;
}

/* ---------- 4) LISTAS Y JUGADORES ---------- */
body.single-zlg_partido .zlgc-box ul{
  list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:16px;
}

body.single-zlg_partido .zlgc-box li{
  background:var(--bg-accent); border:1px solid var(--border);
  border-radius:12px; padding:1.5rem; transition:all 0.3s ease;
}

body.single-zlg_partido .zlgc-box li:hover{
  border-color:var(--accent-1); transform:translateX(4px);
}

/* Nombres de jugadores */
body.single-zlg_partido .zlgc-box li .player-matchup{
  font-weight:600; color:var(--text-primary);
  display:block; margin-bottom:16px;
  font-size:1.125rem;
}

body.single-zlg_partido .zlgc-box li .player-matchup a{
  color:var(--text-primary); text-decoration:none;
  transition:color 0.3s ease;
}

body.single-zlg_partido .zlgc-box li .player-matchup a:hover{
  color:var(--accent-1); text-decoration:none;
}

body.single-zlg_partido .zlgc-box li .player-matchup .vs-text{
  color:var(--text-secondary); margin:0 8px;
  font-weight:500;
}

/* ---------- 5) RESULTADOS PREMIUM - TARJETAS DE JUEGO ---------- */
body.single-zlg_partido .match-results{
  margin-top:12px;
}

/* Tarjeta individual de juego */
body.single-zlg_partido .game-card{
  background:linear-gradient(135deg, var(--bg-accent), var(--bg-card));
  border:1px solid var(--border);
  border-radius:12px;
  padding:16px;
  margin-bottom:12px;
  position:relative;
  overflow:hidden;
}

body.single-zlg_partido .game-card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:4px;
  height:100%;
  background:linear-gradient(180deg, var(--accent-1), var(--accent-2));
}

/* Header de la tarjeta */
body.single-zlg_partido .game-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
  padding-bottom:8px;
  border-bottom:1px solid rgba(255,255,255,0.1);
}

body.single-zlg_partido .game-title{
  font-size:0.875rem;
  font-weight:600;
  color:var(--accent-1);
  text-transform:uppercase;
  letter-spacing:0.5px;
}

body.single-zlg_partido .game-result{
  font-size:0.875rem;
  font-weight:700;
  background:linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  padding:4px 8px;
  border-radius:6px;
  background-color:rgba(0, 240, 255, 0.1);
}

/* Grid de sets elegante */
body.single-zlg_partido .sets-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:8px;
}

body.single-zlg_partido .set-item{
  text-align:center;
  padding:12px 6px;
  background:var(--bg-dark);
  border:1px solid var(--border);
  border-radius:8px;
  transition:all 0.3s ease;
  position:relative;
}

body.single-zlg_partido .set-item.win{
  background:linear-gradient(135deg, rgba(16, 185, 129, 0.2), transparent);
  border-color:var(--success);
  transform:translateY(-2px);
  box-shadow:0 4px 12px rgba(16, 185, 129, 0.3);
}

body.single-zlg_partido .set-item.loss{
  background:linear-gradient(135deg, rgba(239, 68, 68, 0.2), transparent);
  border-color:var(--danger);
}

body.single-zlg_partido .set-item::before{
  content:attr(data-set);
  position:absolute;
  top:-6px;
  left:50%;
  transform:translateX(-50%);
  font-size:0.625rem;
  font-weight:600;
  color:var(--text-secondary);
  background:var(--bg-card);
  padding:1px 6px;
  border-radius:4px;
  border:1px solid var(--border);
}

body.single-zlg_partido .set-score{
  font-size:1.125rem;
  font-weight:800;
  color:var(--text-primary);
}

body.single-zlg_partido .set-item.win .set-score{
  color:var(--success);
}

body.single-zlg_partido .set-item.loss .set-score{
  color:var(--danger);
}

/* Estado del juego */
body.single-zlg_partido .game-status{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:8px;
  font-size:0.75rem;
  color:var(--text-secondary);
}

body.single-zlg_partido .status-dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--success);
}

body.single-zlg_partido .status-dot.pending{
  background:var(--accent-3);
}

/* Para partidos Bo3 */
body.single-zlg_partido .bo3-indicator{
  position:absolute;
  top:12px;
  right:12px;
  background:var(--accent-2);
  color:white;
  font-size:0.625rem;
  font-weight:700;
  padding:2px 6px;
  border-radius:4px;
  text-transform:uppercase;
}

/* Versión compacta para múltiples juegos */
body.single-zlg_partido .compact-results{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(120px, 1fr));
  gap:8px;
  margin-top:8px;
}

body.single-zlg_partido .compact-game{
  background:var(--bg-accent);
  border:1px solid var(--border);
  border-radius:8px;
  padding:10px;
  text-align:center;
  transition:all 0.3s ease;
}

body.single-zlg_partido .compact-game:hover{
  border-color:var(--accent-1);
  transform:translateY(-2px);
}

body.single-zlg_partido .compact-game.won{
  background:linear-gradient(135deg, rgba(16, 185, 129, 0.15), transparent);
  border-color:var(--success);
}

body.single-zlg_partido .compact-game.lost{
  background:linear-gradient(135deg, rgba(239, 68, 68, 0.15), transparent);
  border-color:var(--danger);
}

body.single-zlg_partido .compact-title{
  font-size:0.75rem;
  font-weight:600;
  color:var(--text-secondary);
  margin-bottom:4px;
}

body.single-zlg_partido .compact-score{
  font-size:1rem;
  font-weight:800;
  color:var(--text-primary);
}

/* ---------- 6) TABLAS ---------- */
body.single-zlg_partido .zlgc-box table{
  width:100%; background:var(--bg-accent); border-radius:12px;
  overflow:hidden; border:1px solid var(--border);
}

body.single-zlg_partido .zlgc-box thead th{
  background:var(--bg-card); color:var(--text-primary);
  padding:1rem; font-weight:600; text-align:left;
  border-bottom:1px solid var(--border);
}

body.single-zlg_partido .zlgc-box tbody td{
  padding:1rem; border-bottom:1px solid var(--border);
  color:var(--text-secondary);
}

body.single-zlg_partido .zlgc-box tbody tr:last-child td{
  border-bottom:none;
}

body.single-zlg_partido .zlgc-box tbody tr:hover td{
  background:rgba(0,240,255,.05); color:var(--text-primary);
}

/* ---------- 7) RESPONSIVE MEJORADO ---------- */
/* Mobile: Solo ajustes de espaciado y scroll horizontal cuando sea necesario */
@media (max-width: 768px) {
  body.single-zlg_partido .zlgc-part { 
    padding: 24px 16px; 
    overflow-x: auto; /* Permite scroll horizontal si es necesario */
  }
  
  /* Mantener el layout de PC pero con espaciado ajustado */
  body.single-zlg_partido .zlgc-score { 
    padding: 1.5rem;
    gap: 1.5rem;
    min-width: min-content; /* Asegura que no se rompa el layout */
  }
  
  /* Ajustar grid de secciones para mobile manteniendo el estilo */
  body.single-zlg_partido .zlgc-sections { 
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Ajustar padding de boxes */
  body.single-zlg_partido .zlgc-box { 
    padding: 1.5rem; 
  }
  
  /* Grid de sets: mantener 3 columnas con scroll horizontal si es necesario */
  body.single-zlg_partido .sets-grid {
    grid-template-columns: repeat(3, minmax(80px, 1fr));
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  
  /* Ajustar header de juego manteniendo alineación horizontal */
  body.single-zlg_partido .game-header {
    flex-direction: row;
    gap: 12px;
    align-items: center;
  }
  
  /* Asegurar que los textos no se desborden */
  body.single-zlg_partido .zlgc-score .team-left a,
  body.single-zlg_partido .zlgc-score .team-right a {
    font-size: clamp(1rem, 3vw, 1.5rem);
    padding: 10px 16px;
    word-break: break-word;
    text-align: center;
  }
  
  /* Ajustar marcadores para mobile */
  body.single-zlg_partido .zlgc-score .score-left,
  body.single-zlg_partido .zlgc-score .score-right {
    padding: 0.75rem 1rem;
    font-size: clamp(2rem, 8vw, 3rem);
  }
  
  /* Meta chips en una sola línea con scroll si es necesario */
  body.single-zlg_partido .zlgc-meta {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
    gap: 8px;
  }
  
  body.single-zlg_partido .zlgc-meta .chip {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* ---------- 8) UTILIDADES ---------- */
body.single-zlg_partido .entry-title{ display:none; }
body.single-zlg_partido .site-main{ background:transparent !important; }

/* Limpieza de estilos heredados */
body.single-zlg_partido .zlgc-part,
body.single-zlg_partido .zlgc-part *{ 
  color:var(--text-primary) !important; 
  text-shadow:none !important; 
}

body.single-zlg_partido .zlgc-part .has-background,
body.single-zlg_partido .zlgc-part [style*="background"],
body.single-zlg_partido .zlgc-part [style*="background-color"]{
  background:transparent !important;
}