/* ==========================================================
   🌌 eLigaMaster - ESTILO PRINCIPAL OPTIMIZADO (2025)
   ========================================================== */

/* ==== RESET GENERAL ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: radial-gradient(circle at center, #00142e 0%, #000814 100%);
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================
   🧭 ENCABEZADO Y MENÚ
   ========================================================== */
header {
  background: linear-gradient(90deg, #001f3f, #001a33);
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

header img {
  height: 45px;
}

header h1 {
  font-size: 1.5rem;
  color: #00bfff;
  font-weight: 700;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

nav ul li a:hover {
  color: #00bfff;
}

/* ==========================================================
   ⚽ SECCIÓN HERO
   ========================================================== */
.hero {
  background: radial-gradient(circle at top, #001a3d, #000b1a);
  text-align: center;
  padding: 100px 20px;
}

.hero h2 {
  font-size: 2rem;
  color: #00bfff;
  margin-bottom: 10px;
}

.hero h2 span {
  color: #fff;
  font-weight: 700;
}

.hero p {
  color: #ccc;
  margin-bottom: 25px;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* ==========================================================
   🔵 BOTONES
   ========================================================== */
.btn-primary, .btn-secondary {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 18px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: #007bff;
  color: #fff;
}

.btn-primary:hover {
  background: #00bfff;
  box-shadow: 0 0 10px rgba(0,191,255,0.6);
}

.btn-secondary {
  background: transparent;
  border: 1px solid #00bfff;
  color: #00bfff;
}

.btn-secondary:hover {
  background: #00bfff;
  color: #fff;
}

/* ==========================================================
   🏆 TORNEOS / NOTICIAS / INSCRIPCIÓN
   ========================================================== */
.tournaments, .news, .register {
  text-align: center;
  padding: 80px 20px;
}

.tournaments h2, .news h2, .register h2 {
  color: #00bfff;
  font-size: 1.8rem;
  margin-bottom: 30px;
}

.tournament-grid, .news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1000px;
  margin: 0 auto;
}

.tournament-card, .news-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  transition: all 0.25s ease;
}

.tournament-card:hover, .news-card:hover {
  background: rgba(0,191,255,0.12);
  border-color: #00bfff;
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0,191,255,0.3);
}

.tournament-card h3, .news-content h3 {
  color: #00bfff;
  margin-bottom: 10px;
}

.tournament-card p, .news-content p {
  color: #ccc;
}

.news-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.news-content {
  padding: 15px;
}

.register p {
  color: #ccc;
  margin-bottom: 25px;
}

/* ==========================================================
   📊 TABLA DE CLASIFICACIÓN GENERAL
   ========================================================== */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 5px;
}

.tabla-clasificacion {
  width: 100%;
  border-collapse: collapse;
  min-width: 1300px; /* 🔥 más ancha para nombres largos */
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0,0,0,0.25);
}

.tabla-clasificacion th {
  background: linear-gradient(90deg, #031b38, #052b6b);
  color: #00bfff;
  padding: 12px 10px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.tabla-clasificacion td {
  color: #fff;
  padding: 12px 10px;
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  white-space: nowrap;
}

/* === COLUMNA EQUIPO (ajustada más compacta) === */
.col-equipo {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  text-align: left !important;
  padding-left: 20px !important;
  min-width: 320px !important; /* ⚽ ajustado desde 550px */
  max-width: 360px !important;
}

.col-equipo img {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
}

.col-equipo span {
  font-weight: 600 !important;
  color: #fff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: inline-block !important;
  max-width: 380px !important;
  font-size: 1rem !important;
}

/* === COLUMNA RACHA (más ancha) === */
.col-racha {
  min-width: 140px !important; /* 🟩🟨🟥 espacio extra */
  letter-spacing: 3px;
}

/* FILAS */
.tabla-clasificacion tbody tr:nth-child(even) {
  background-color: rgba(255,255,255,0.04);
}

.tabla-clasificacion tbody tr:hover {
  background-color: rgba(255,255,255,0.08);
  transition: 0.2s ease;
}

/* ==========================================================
   🧾 FORMULARIOS
   ========================================================== */
form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input, select, textarea {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  outline: none;
  font-size: 15px;
  transition: all 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: #00bfff;
  background: rgba(255,255,255,0.15);
}

label {
  font-weight: 600;
  color: #ccc;
}

/* ==========================================================
   🏢 PANEL ADMIN
   ========================================================== */
.admin-header {
  background: linear-gradient(90deg, #001f3f, #001a33);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-header h1 {
  font-size: 1.3rem;
  color: #00bfff;
  font-weight: 700;
}

.admin-header .btn-secondary {
  background: transparent;
  border: 1px solid #00bfff;
  color: #00bfff;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.admin-header .btn-secondary:hover {
  background: #00bfff;
  color: #fff;
}

/* ==========================================================
   📱 RESPONSIVE
   ========================================================== */
@media (max-width: 900px) {
  .col-equipo {
    min-width: 380px !important;
    max-width: 400px !important;
  }
  .col-equipo img {
    width: 36px !important;
    height: 36px !important;
  }
}

@media (max-width: 600px) {
  .col-equipo {
    min-width: 350px !important;
    max-width: 370px !important;
  }
  .col-racha {
    min-width: 120px !important;
  }
}

/* ==========================================================
   ⚽ FOOTER
   ========================================================== */
footer {
  text-align: center;
  padding: 20px;
  color: #ccc;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 50px;
}

/* === CLASIFICACIÓN LIGA - COLORES POR POSICIÓN === */

.tabla-clasificacion tr {
  transition: background 0.3s ease, transform 0.2s ease;
  background: #0d1930; /* color base oscuro */
}

.tabla-clasificacion tr:hover {
  background: #11294a;
  transform: scale(1.01);
}

/* 🥇 PRIMER LUGAR */
.tabla-clasificacion tr.campeon {
  background: linear-gradient(90deg, #00ff9d20, #00ff9d10);
  border-left: 4px solid #00ff9d;
}

/* 🔵 ZONA SEGURA (2–16) */
.tabla-clasificacion tr.seguro {
  background: linear-gradient(90deg, #0d47a1, #1565c0);
  border-left: 4px solid #2196f3;
  transition: all 0.3s ease;
}

/* 💡 Efecto al pasar el ratón (brillo leve tipo Champions) */
.tabla-clasificacion tr.seguro:hover {
  background: linear-gradient(90deg, #1976d2, #42a5f5);
  transform: scale(1.01);
  box-shadow: 0 0 10px rgba(33,150,243,0.5);
}

/* ⚠️ MEDIA TABLA (17–20) */
.tabla-clasificacion tr.media {
  background: linear-gradient(90deg, #12203a, #0b1a2f);
  border-left: 4px solid #005577;
}

/* 🔻 DESCENSO (21–24) */
.tabla-clasificacion tr.descenso {
  background: linear-gradient(90deg, #2a0e0e, #1b0808);
  border-left: 4px solid #ff4d4d;
}

.tabla-clasificacion tr.descenso:hover {
  background: linear-gradient(90deg, #3a0f0f, #250808);
}

/* === CORRECCIÓN DE INTERLINEADO Y COLOR VISIBLE === */
.tabla-clasificacion tbody tr {
  border-radius: 8px;
  overflow: hidden;
}

/* === LIGA 2 - COLORES POR POSICIÓN === */
.tabla-clasificacion tr.campeon {
  background: linear-gradient(90deg, #d4af37aa, #caa63f55);
  border-left: 4px solid #ffd700;
  color: #fff7cc;
}

.tabla-clasificacion tr.ascenso {
  background: linear-gradient(90deg, #2a5030, #1b3821);
  border-left: 4px solid #00ff99;
}

.tabla-clasificacion tr.seguro {
  background: linear-gradient(90deg, #0a2344, #071a33);
  border-left: 4px solid #004aad;
}

/* Hover efecto */
.tabla-clasificacion tr:hover {
  transform: scale(1.01);
  background: #112a4a !important;
  transition: all 0.3s ease;
}

.flecha-ascenso {
  display:inline-block;
  color:#00ff99 !important; /* Verde brillante */
  font-size:18px;
  transform: rotate(180deg); /* Mismo diseño de “🔻” invertida */
  margin-left:6px;
  vertical-align:middle;
}

/* ==========================================================
   📅 SECCIÓN JORNADAS (PÚBLICO)
   ========================================================== */

.jornadas-container {
  max-width: 1100px;
  margin: 60px auto;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
}

.jornadas-container h2 {
  text-align: center;
  color: #00bfff;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 25px;
}

/* ===== SELECTOR DE LIGA ===== */
.jornadas-select {
  text-align: center;
  margin-bottom: 25px;
}
.jornadas-select label {
  font-weight: 600;
  color: #ccc;
  margin-right: 8px;
}
.jornadas-select select {
  background: #071a33;
  color: white;
  border: 1px solid #00bfff;
  padding: 8px 15px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.jornadas-select select:hover {
  border-color: #0099ff;
  box-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
}

/* ===== NAVEGACIÓN ENTRE JORNADAS ===== */
.jornada-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  margin-bottom: 20px;
}

.jornada-nav .btn-nav {
  background: linear-gradient(90deg, #007bff, #00bfff);
  color: white;
  border: none;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
}

.jornada-nav .btn-nav:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(0, 191, 255, 0.4);
}

.jornada-nav span {
  font-weight: 700;
  font-size: 18px;
  color: #00bfff;
}

/* ===== TABLA DE PARTIDOS ===== */
.tabla-jornada {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 10px;
}

.tabla-jornada th,
.tabla-jornada td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 12px 10px;
  vertical-align: middle;
}

.tabla-jornada th {
  background: linear-gradient(90deg, #004aad, #007bff);
  color: #fff;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 700;
}

.tabla-jornada th:nth-child(1),
.tabla-jornada td:nth-child(1) {
  width: 40%;
  text-align: left;
}
.tabla-jornada th:nth-child(2),
.tabla-jornada td:nth-child(2) {
  width: 20%;
  text-align: center;
}
.tabla-jornada th:nth-child(3),
.tabla-jornada td:nth-child(3) {
  width: 40%;
  text-align: right;
}

.tabla-jornada tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}
.tabla-jornada tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
}

/* ===== EQUIPOS (LOCAL / VISITANTE) ===== */
.equipo {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.equipo.right {
  justify-content: flex-end;
}
.equipo img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 6px rgba(0, 191, 255, 0.3);
}
.equipo span {
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== RESULTADO ===== */
.resultado {
  display: inline-block;
  min-width: 70px;
  background: rgba(0, 0, 0, 0.4);
  color: #ffdf6b;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
}

/* ===== INFO PARTIDOS ===== */
.info-partidos {
  text-align: center;
  color: #ccc;
  font-weight: 500;
  margin-bottom: 20px;
}

/* ===== ADAPTACIÓN RESPONSIVE ===== */
@media (max-width: 768px) {
  .tabla-jornada th:nth-child(1),
  .tabla-jornada th:nth-child(3),
  .tabla-jornada td:nth-child(1),
  .tabla-jornada td:nth-child(3) {
    width: 35%;
  }
  .tabla-jornada th:nth-child(2),
  .tabla-jornada td:nth-child(2) {
    width: 30%;
  }
}

