 #btnCargarTorneo { margin-bottom: 1em; display:none; }
  /* ===================================================
   🎯 CONTENEDOR PRINCIPAL DEL MÓDULO DE TORNEOS
   =================================================== */
.torneo-container {
  background: radial-gradient(circle at top left, #1a0030, #080010);
  color: #eee;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.5px;
  padding: 20px;
  border-radius: 20px;
  border: 2px solid rgba(160, 90, 255, 0.5);
  box-shadow: 0 0 20px rgba(130, 0, 255, 0.3);
  max-width: 1000px;
  margin: 40px auto;
}

.torneo-container h1,
.torneo-container h2,
.torneo-container h3 {
  color: #c79bff;
  text-shadow: 0 0 6px #a770ff;
  text-align: center;
}

.torneo-container button {
  background: linear-gradient(145deg, #4f1aff, #a64dff);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(140, 0, 255, 0.5);
  transition: all 0.2s ease;
}

.torneo-container button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(180, 100, 255, 0.8);
}

.torneo-container input[type="text"] {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(150, 100, 255, 0.3);
  border-radius: 8px;
  color: #fff;
  padding: 5px 10px;
  outline: none;
  width: 180px;
}

.torneo-container input[type="number"] {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(150, 100, 255, 0.3);
  border-radius: 8px;
  color: #fff;
  padding: 5px 10px;
  outline: none;
  width: 30px;
}

.torneo-container input[type="text"]::placeholder {
  color: #aaa;
}

/* ===================================================
   🧱 SECCIONES Y BLOQUES
   =================================================== */
.torneo-container #zonaRondas,
.torneo-container .bloqueFinal {
  background: rgba(30, 0, 60, 0.5);
  border: 2px solid #803dff;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(128, 61, 255, 0.6);
  margin: 20px auto;
  padding: 20px;
  width: 90%;
  max-width: 900px;
}

.torneo-container .bloqueRonda {
  margin-bottom: 25px;
  padding: 15px;
  border-radius: 12px;
  background: rgba(50, 0, 100, 0.5);
  box-shadow: 0 0 10px rgba(180, 100, 255, 0.4);
}

/* ===================================================
   📋 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(255, 255, 255, 0.2);
  padding: 8px;
  text-align: center;
}

.torneo-container th {
  background: rgba(140, 60, 255, 0.2);
  color: #fff;
  text-shadow: 0 0 3px #a770ff;
}

.torneo-container tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

.torneo-container .tablaVersus h3,
.torneo-container .tablaResultados h3 {
  color: #d6aaff;
  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, #6a0eff, #b04dff);
}

.torneo-container .btnImprimirRonda:hover,
.torneo-container #btnImprimirFinal:hover,
.torneo-container #btnDescargarExcel:hover {
  box-shadow: 0 0 14px rgba(200, 140, 255, 0.9);
}

/* ===================================================
   👥 FORMULARIO DE JUGADORES
   =================================================== */
.torneo-container #contador {
  display: block;
  margin: 10px 0;
  text-align: center;
  font-weight: bold;
  color: #c9a0ff;
}

.torneo-container .jugadorItem {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.torneo-container .jugadorItem button {
  background: #ff4d6d;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.torneo-container .jugadorItem button:hover {
  background: #ff6b8c;
  box-shadow: 0 0 10px rgba(255, 100, 150, 0.7);
}

/* ===================================================
   📱 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(50, 0, 100, 0.35);
  border-radius: 12px;
  padding: 20px;
  margin: 25px 0;
  box-shadow: inset 0 0 12px rgba(160, 80, 255, 0.25);
}

/* === 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: #d6aaff;
}

/* 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(100, 0, 180, 0.1);
  border: 1px solid rgba(180, 100, 255, 0.3);
  border-radius: 10px;
  padding: 12px;
  box-shadow: inset 0 0 10px rgba(180, 100, 255, 0.3);
}

.torneo-botones {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

#contador {
  margin-top: 10px;
  font-weight: bold;
  color: #c9a0ff;
}

/* === 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); /* 4 columnas exactas */
  justify-content: center; /* ✅ centra el grid completo */
  justify-items: center; /* centra cada celda */
  align-items: center;
  gap: 5px;
  background: rgba(100, 0, 180, 0.1);
  border: 1px solid rgba(180, 100, 255, 0.3);
  border-radius: 12px;
  box-shadow: inset 0 0 15px rgba(180, 100, 255, 0.3);
  width: 90%;
  max-width: 880px; /* ✅ ajusta al espacio real visible */
  margin: 0 auto;
  padding: 25px 15px;
}

.jugadorItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  background: rgba(90, 0, 170, 0.35);
  border: 1px solid rgba(200, 120, 255, 0.4);
  border-radius: 10px;
  padding: 8px 10px;
  width: 100%;
  max-width: 180px; /* ✅ ancho visualmente equilibrado */
  box-shadow: 0 0 8px rgba(180, 100, 255, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jugadorItem input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(150, 100, 255, 0.4);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  padding: 6px 8px;
  outline: none;
  text-align: center;
  min-width: 0;
}

.jugadorItem input::placeholder {
  color: #bbb;
}

.jugadorItem button {
  background: #ff4d6d;
  border: none;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0 0 8px rgba(255, 80, 120, 0.7);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.jugadorItem button:hover {
  background: #ff6b8c;
  box-shadow: 0 0 12px rgba(255, 120, 160, 0.9);
}

/* ===================================================
   📱 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%; /* ✅ para que no se desborde en móviles */
}

/* ===================================================
   🟣 BOTÓN DE INFORMACIÓN
   =================================================== */
.btn-info {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: linear-gradient(145deg, #5a00ff, #9b4dff);
  color: #fff;
  font-weight: bold;
  font-size: 20px;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(180, 100, 255, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 2000;
}

.btn-info:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(220, 160, 255, 0.9);
}

/* ===================================================
   🪩 MODAL DE INFORMACIÓN
   =================================================== */
.modal-info {
  display: none;
  position: fixed;
  z-index: 1500;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 0, 40, 0.85);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.3s ease;
}

.modal-content-info {
  background: radial-gradient(circle at top left, #250046, #10001c);
  border: 2px solid rgba(170, 80, 255, 0.5);
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(150, 60, 255, 0.7);
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  text-align: center;
  color: #eee;
  position: relative;
  font-family: 'Orbitron', sans-serif;
}

.cerrar-modal {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 26px;
  color: #cbaaff;
  cursor: pointer;
  transition: color 0.2s;
}
.cerrar-modal:hover {
  color: #fff;
}

/* ===================================================
   📖 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%;
}

.texto-hoja {
  color: #d8caff;
  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; /* 🔒 evita que se encoja en flex */
  width: 350px;   /* ✅ tamaño que quieras */
  box-shadow: 0 0 10px rgba(150, 100, 255, 0.6);
  height: auto;
}


.hoja-lado h3 {
  color: #c69bff;
  text-shadow: 0 0 6px #a770ff;
  margin-bottom: 8px;
}

.hoja-info.activa h3 {
  color: #c69bff;
  text-shadow: 0 0 6px #a770ff;
  margin-bottom: 8px;
}

.hoja-lado p {
  color: #ddd;
  line-height: 1.5;
}

/* ===================================================
   📱 RESPONSIVE PARA CELULARES (modal info)
   =================================================== */
@media (max-width: 700px) {
  /* Modal más compacto */
  .modal-content-info {
    max-width: 95%;
    padding: 20px 15px;
  }

  /* Imagen centrada más pequeña */
  .img-centro {
    width: 80%;
    max-width: 240px;
    margin-bottom: 10px;
  }

  /* Reorganiza las hojas con imagen lateral */
  .hoja-lado {
    flex-direction: column;       /* 🔄 imagen arriba, texto abajo */
    align-items: center;          /* centra todo */
    text-align: center;           /* texto centrado */
  }

  .hoja-lado img {
    width: 70%;                   /* más chica y adaptable */
    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;
  }

  /* Botones más pequeños */
  .controles-info button {
    padding: 6px 12px;
    font-size: 13px;
  }

  /* Cierra más cerca del borde */
  .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, #4f1aff, #a64dff);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(140, 0, 255, 0.5);
  transition: all 0.2s ease;
}

.controles-info button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(180, 100, 255, 0.8);
}

/* ===================================================
   ✨ ANIMACIÓN DE ENTRADA
   =================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

