/* Estilo base 
.alert-success {
  background: #d4edda;
  color: #155724;
  padding: 10px;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  margin-bottom: 20px;
  font-weight: bold;
}
.bracket-container {
  display: flex;
  position: relative;
  gap: 40px;
  padding: 20px;
  overflow-x: auto;
}

.ronda {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
}

.pelea {
  background: #f0f0f0;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  position: relative;
}

.bracket-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

form {
  margin-top: 20px;
  padding: 10px;
  background: #f9f9f9;
  border: 1px solid #ccc;
}
form label {
  display: block;
  margin-bottom: 10px;
}
form button {
  padding: 8px 16px;
  background: #0077cc;
  color: white;
  border: none;
  cursor: pointer;
}
form button:hover {
  background: #005fa3;
}



body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  padding: 20px;
  margin: 0;
}
.pelea {
  display: block;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px dashed #aaa;
  padding: 10px;
  margin-bottom: 20px;
  transition: background 0.2s;
}
.pelea:hover {
  background: #f0f0f0;
}


h1 {
  text-align: center;
  font-size: 2em;
  margin-bottom: 20px;
}

.bracket {
  display: flex;
  gap: 20px;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 20px;
}

.ronda {
  background: #fff;
  padding: 10px;
  border: 1px solid #ccc;
  min-width: 200px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ronda h2 {
  font-size: 1.2em;
  margin-bottom: 10px;
  text-align: center;
}

.pelea {
  margin-bottom: 20px;
  padding: 10px;
  border-bottom: 1px dashed #aaa;
}

.competidor {
  padding: 6px;
  background: #e0e0e0;
  margin: 4px 0;
  border-radius: 4px;
  font-size: 0.95em;
  text-align: center;
}

.ganador {
  padding: 6px;
  background: gold;
  font-weight: bold;
  margin-top: 5px;
  border-radius: 4px;
  text-align: center;
}

/* Scroll suave en móviles 
.bracket::-webkit-scrollbar {
  height: 8px;
}
.bracket::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

/* 🌐 Media Queries para pantallas pequeñas 
@media (max-width: 768px) {
  h1 {
    font-size: 1.5em;
  }

  .ronda {
    min-width: 160px;
    padding: 8px;
  }

  .ronda h2 {
    font-size: 1em;
  }

  .competidor, .ganador {
    font-size: 0.85em;
    padding: 5px;
  }

  .pelea {
    padding: 8px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .bracket {
    gap: 10px;
  }

  .ronda {
    min-width: 140px;
  }

  .competidor, .ganador {
    font-size: 0.8em;
  }
}

/* Estilos generales 
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f9f9f9;
  color: #333;
}

h1 {
  text-align: center;
  font-size: 2em;
  margin-bottom: 20px;
}

/* Encabezado 
header {
  text-align: center;
  margin-bottom: 20px;
}

header a {
  text-decoration: none;
  font-size: 1.2em;
  color: #007bff;
}

header a:hover {
  color: #0056b3;
}

/* Filtro por categoría 
form {
  text-align: center;
  margin-bottom: 20px;
}

form label {
  font-size: 1.1em;
  margin-right: 10px;
}

form select {
  font-size: 1em;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* Información de peleas 
div[style*="text-align:center"] {
  text-align: center;
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 20px;
}

/* Árbol de peleas 
.bracket {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.ronda {
  margin: 10px;
  width: 300px;
}

.ronda h2 {
  text-align: center;
  font-size: 1.4em;
  color: #333;
}

.pelea {
  background-color: #fff;
  border: 2px solid #007bff;
  margin: 10px 0;
  padding: 10px;
  border-radius: 5px;
  text-align: center;
  display: block;
  text-decoration: none;
  color: #333;
}

.pelea:hover {
  background-color: #007bff;
  color: white;
}

.competidor {
  font-size: 1.1em;
  font-weight: bold;
}

.ganador {
  color: #28a745;
  font-size: 1.2em;
  margin-top: 10px;
}

/* Botón de generación de ronda 
form button {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.1em;
  display: block;
  margin: 20px auto;
}

form button:hover {
  background-color: #0056b3;
}

/* Responsividad 
@media (max-width: 768px) {
  .bracket {
    flex-direction: column;
    align-items: center;
  }

  .ronda {
    width: 100%;
    margin-bottom: 20px;
  }

  .pelea {
    width: 90%;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.6em;
  }

  .ronda h2 {
    font-size: 1.2em;
  }

  .competidor, .ganador {
    font-size: 1em;
  }
}
*/

/* Estilos generales */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f4f4f9;
  color: #333;
}

header {
  text-align: center;
  margin-bottom: 20px;
}

.header-link {
  font-size: 1.2em;
  color: #007bff;
  text-decoration: none;
}

.header-link:hover {
  color: #0056b3;
}

.titulo {
  text-align: center;
  font-size: 2em;
  margin-bottom: 20px;
}

/* Filtro por categoría */
.filtro-form {
  text-align: center;
  margin-bottom: 20px;
}

.filtro-form select {
  font-size: 1em;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* Información de peleas */
.informacion {
  text-align: center;
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 20px;
}

/* Árbol de Torneo */
.bracket {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.ronda {
  width: 250px;
  text-align: center;
}

.pelea {
  background-color: #fff;
  border: 2px solid #007bff;
  margin: 10px 0;
  padding: 10px;
  border-radius: 5px;
  text-align: center;
  display: block;
  text-decoration: none;
  color: #333;
}

.pelea:hover {
  background-color: #007bff;
  color: white;
}

.competidor {
  font-size: 1.1em;
  font-weight: bold;
}

.ganador {
  color: #28a745;
  font-size: 1.2em;
  margin-top: 10px;
}

/* Botón de generación de ronda */
.generar-ronda button {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.1em;
  display: block;
  margin: 20px auto;
}

.generar-ronda button:hover {
  background-color: #0056b3;
}

/* Responsividad */
@media (max-width: 768px) {
  .bracket {
    flex-direction: column;
    align-items: center;
  }

  .ronda {
    width: 100%;
  }

  .pelea {
    width: 90%;
  }
}

@media (max-width: 480px) {
  .titulo {
    font-size: 1.6em;
  }

  .competidor, .ganador {
    font-size: 1em;
  }
}
