#btnCargarTorneo { margin-bottom: 1em; display:none; }

/* ===================================================
 🎯 CONTENEDOR PRINCIPAL DEL MÓDULO DE TORNEOS
 =================================================== */
.torneo-container {
  background: radial-gradient(circle at top left, #071021, #02040b);
  color: #e6f5ff;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.5px;
  padding: 20px;
  border-radius: 20px;
  border: 2px solid rgba(0, 210, 255, 0.55);
  box-shadow:
    0 0 24px rgba(0, 180, 255, 0.35),
    0 0 60px rgba(0, 70, 140, 0.6);
  max-width: 1000px;
  margin: 40px auto;
}

.torneo-container h1,
.torneo-container h2,
.torneo-container h3 {
  color: #e5f7ff;
  text-shadow: 0 0 10px rgba(0, 220, 255, 0.9);
  text-align: center;
}

/* Botones generales */
.torneo-container button {
  background: linear-gradient(145deg, #0054ff, #00c2ff);
  color: #f8fdff;
  border: 1px solid rgba(0, 230, 255, 0.7);
  border-radius: 10px;
  padding: 8px 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(0, 220, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.torneo-container button:hover {
  transform: translateY(-1px) scale(1.04);
  background: linear-gradient(145deg, #0070ff, #26e0ff);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.9);
}

/* Inputs */
.torneo-container input[type="text"],
.torneo-container input[type="number"] {
  background: rgba(4, 16, 32, 0.85);
  border: 1px solid rgba(0, 200, 255, 0.55);
  border-radius: 8px;
  color: #f2fbff;
  padding: 5px 10px;
  outline: none;
  box-shadow: 0 0 10px rgba(0, 150, 220, 0.35);
}

.torneo-container input[type="text"] {
  width: 180px;
}

.torneo-container input[type="number"] {
  width: 30px;
}

.torneo-container input[type="text"]::placeholder {
  color: #88a2c7;
}

/* ===================================================
 🧱 SECCIONES Y BLOQUES
 =================================================== */
.torneo-container #zonaRondas,
.torneo-container .bloqueFinal {
  background: linear-gradient(145deg, rgba(4, 18, 40, 0.92), rgba(2, 8, 24, 0.98));
  border: 2px solid rgba(0, 210, 255, 0.75);
  border-radius: 18px;
  box-shadow:
    0 0 18px rgba(0, 200, 255, 0.6),
    inset 0 0 18px rgba(0, 80, 140, 0.4);
  margin: 20px auto;
  padding: 20px;
  width: 90%;
  max-width: 900px;
}

.torneo-container .bloqueRonda {
  margin-bottom: 25px;
  padding: 15px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(6, 26, 60, 0.85), rgba(2, 10, 30, 0.9));
  box-shadow: 0 0 14px rgba(0, 160, 230, 0.5);
}

/* ===================================================
 📋 TABLAS DE RESULTADOS Y VERSUS
 =================================================== */
.torneo-container table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 10px;
  font-size: 14px;
}

.torneo-container th,
.torneo-container td {
  border: 1px solid rgba(180, 220, 255, 0.18);
  padding: 8px;
  text-align: center;
}

.torneo-container th {
  background: linear-gradient(180deg, rgba(0, 120, 210, 0.8), rgba(0, 80, 160, 0.85));
  color: #f5fbff;
  text-shadow: 0 0 4px rgba(0, 255, 255, 0.9);
}

.torneo-container tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.torneo-container tr:nth-child(odd) {
  background: rgba(0, 20, 60, 0.4);
}

.torneo-container .tablaVersus h3,
.torneo-container .tablaResultados h3 {
  color: #e1f5ff;
  margin-bottom: 8px;
  text-align: center;
}

/* ===================================================
 🖨 BOTONES DE ACCIÓN (IMPRIMIR / DESCARGAR)
 =================================================== */
.torneo-container .btnImprimirRonda,
.torneo-container #btnImprimirFinal,
.torneo-container #btnDescargarExcel {
  margin-top: 12px;
  background: linear-gradient(90deg, #0055ff, #00d4ff);
}

.torneo-container .btnImprimirRonda:hover,
.torneo-container #btnImprimirFinal:hover,
.torneo-container #btnDescargarExcel:hover {
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.95);
}

/* ===================================================
 👥 FORMULARIO DE JUGADORES
 =================================================== */
.torneo-container #contador {
  display: block;
  margin: 10px 0;
  text-align: center;
  font-weight: bold;
  color: #8bd8ff;
}

.torneo-container .jugadorItem {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.torneo-container .jugadorItem button {
  background: linear-gradient(145deg, #ff2f4f, #ff6a7a);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid rgba(255, 180, 190, 0.9);
  box-shadow: 0 0 10px rgba(255, 90, 130, 0.7);
}

.torneo-container .jugadorItem button:hover {
  background: linear-gradient(145deg, #ff4f6f, #ff8a9a);
  box-shadow: 0 0 14px rgba(255, 130, 170, 0.9);
}

/* ===================================================
 📱 RESPONSIVE
 =================================================== */
@media (max-width: 700px) {
  .torneo-container table,
  .torneo-container th,
  .torneo-container td {
    font-size: 12px;
  }

  .torneo-container button {
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* ===================================================
 🧭 ORGANIZACIÓN VISUAL DE LA PANTALLA PRINCIPAL
 =================================================== */

/* Espaciado general entre secciones */
.torneo-seccion {
  background: rgba(0, 24, 60, 0.55);
  border-radius: 12px;
  padding: 20px;
  margin: 25px 0;
  box-shadow: inset 0 0 16px rgba(0, 140, 220, 0.35);
}

/* === Configuración inicial === */
.torneo-config {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 15px;
  text-align: center;
}

.torneo-config label {
  font-weight: bold;
  color: #b9e3ff;
}

/* Botón de cargar torneo guardado */
#btnCargarTorneo {
  margin-top: 10px;
}

/* === Sección de jugadores === */
.torneo-jugadores {
  text-align: center;
}

#listaJugadores {
  margin: 15px auto;
  width: 90%;
  max-width: 700px;
  background: rgba(0, 28, 70, 0.4);
  border: 1px solid rgba(0, 200, 255, 0.4);
  border-radius: 10px;
  padding: 12px;
  box-shadow: inset 0 0 14px rgba(0, 130, 210, 0.4);
}

.torneo-botones {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

#contador {
  margin-top: 10px;
  font-weight: bold;
  color: #8bd8ff;
}

/* === Configuración de rondas y controles === */
.torneo-rondas,
.torneo-controles {
  text-align: center;
}

.torneo-controles button {
  margin: 8px;
}

/* === Mejora visual de espaciado general === */
.torneo-container h1 {
  margin-bottom: 25px;
}

.torneo-container h3 {
  margin-bottom: 12px;
}

/* ===================================================
 🎮 LISTA DE JUGADORES EN 4 COLUMNAS CENTRADAS
 =================================================== */
#listaJugadores {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  justify-content: center;
  justify-items: center;
  align-items: center;
  gap: 5px;
  background: rgba(0, 28, 70, 0.5);
  border: 1px solid rgba(0, 200, 255, 0.45);
  border-radius: 12px;
  box-shadow: inset 0 0 18px rgba(0, 140, 220, 0.45);
  width: 90%;
  max-width: 880px;
  margin: 0 auto;
  padding: 25px 15px;
}

.jugadorItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  background: rgba(1, 35, 80, 0.9);
  border: 1px solid rgba(0, 210, 255, 0.7);
  border-radius: 10px;
  padding: 8px 10px;
  width: 100%;
  max-width: 180px;
  box-shadow: 0 0 12px rgba(0, 190, 255, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jugadorItem:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.9);
}

.jugadorItem input {
  flex: 1;
  background: rgba(3, 18, 40, 0.85);
  border: 1px solid rgba(0, 200, 255, 0.7);
  border-radius: 6px;
  color: #f5fbff;
  font-size: 13px;
  padding: 6px 8px;
  outline: none;
  text-align: center;
  min-width: 0;
}

.jugadorItem input::placeholder {
  color: #8da7c9;
}

.jugadorItem button {
  background: linear-gradient(145deg, #ff2f4f, #ff6a7a);
  border: 1px solid rgba(255, 190, 210, 0.9);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0 0 8px rgba(255, 90, 130, 0.9);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.jugadorItem button:hover {
  background: linear-gradient(145deg, #ff4f6f, #ff8a9a);
  box-shadow: 0 0 12px rgba(255, 130, 170, 1);
}

/* ===================================================
 📱 RESPONSIVE
 =================================================== */
@media (max-width: 950px) {
  #listaJugadores {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  #listaJugadores {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #listaJugadores {
    grid-template-columns: 1fr;
  }
}

.logo-rondas {
  width: 550px;
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

/* ===================================================
 🟣 BOTÓN DE INFORMACIÓN
 =================================================== */
.btn-info {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: radial-gradient(circle at 30% 30%, #00f0ff, #0050ff);
  color: #fff;
  font-weight: bold;
  font-size: 20px;
  border: 1px solid rgba(0, 255, 255, 0.9);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.8);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 2000;
}

.btn-info:hover {
  transform: scale(1.12);
  box-shadow: 0 0 26px rgba(0, 255, 255, 1);
}

/* ===================================================
 🪩 MODAL DE INFORMACIÓN
 =================================================== */
.modal-info {
  display: none;
  position: fixed;
  z-index: 1500;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(1, 6, 18, 0.92);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.modal-content-info {
  background: radial-gradient(circle at top left, #04142b, #020712);
  border: 2px solid rgba(0, 220, 255, 0.8);
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(0, 200, 255, 0.9);
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  text-align: center;
  color: #e6f5ff;
  position: relative;
  font-family: 'Orbitron', sans-serif;
}

.cerrar-modal {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 26px;
  color: #8fdfff;
  cursor: pointer;
  transition: color 0.2s;
}
.cerrar-modal:hover {
  color: #ffffff;
}

/* ===================================================
 📖 HOJAS DE INFORMACIÓN
 =================================================== */
.hoja-info {
  display: none;
  animation: fadeIn 0.4s ease;
}

.hoja-info.activa {
  display: block;
}

.img-centro {
  display: block;
  margin: 0 auto 15px;
  border-radius: 12px;
  width: 300px;
  max-width: 100%;
  box-shadow: 0 0 16px rgba(0, 200, 255, 0.7);
}

.texto-hoja {
  color: #e0f2ff;
  font-size: 15px;
  line-height: 1.6;
}

/* Estructura con imagen a la izquierda */
.hoja-lado {
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
}

.hoja-lado img {
  flex-shrink: 0;
  width: 350px;
  box-shadow: 0 0 18px rgba(0, 200, 255, 0.8);
  height: auto;
}

.hoja-lado h3 {
  color: #e5f7ff;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.9);
  margin-bottom: 8px;
}

.hoja-info.activa h3 {
  color: #e5f7ff;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.9);
  margin-bottom: 8px;
}

.hoja-lado p {
  color: #d5e8ff;
  line-height: 1.5;
}

/* ===================================================
 📱 RESPONSIVE PARA CELULARES (modal info)
 =================================================== */
@media (max-width: 700px) {
  .modal-content-info {
    max-width: 95%;
    padding: 20px 15px;
  }

  .img-centro {
    width: 80%;
    max-width: 240px;
    margin-bottom: 10px;
  }

  .hoja-lado {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hoja-lado img {
    width: 70%;
    max-width: 200px;
    margin-bottom: 12px;
  }

  .hoja-lado h3 {
    font-size: 1rem;
    margin-top: 5px;
  }

  .hoja-lado p {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .controles-info button {
    padding: 6px 12px;
    font-size: 13px;
  }

  .cerrar-modal {
    top: 6px;
    right: 10px;
  }
}

/* ===================================================
 🔘 CONTROLES DE NAVEGACIÓN
 =================================================== */
.controles-info {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.controles-info button {
  background: linear-gradient(145deg, #0054ff, #00c2ff);
  color: #fff;
  border: 1px solid rgba(0, 230, 255, 0.8);
  border-radius: 10px;
  padding: 8px 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 220, 255, 0.7);
  transition: all 0.2s ease;
}

.controles-info button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.95);
}

/* ===================================================
 ✨ ANIMACIÓN DE ENTRADA
 =================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
