@import url('https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap');

/* Estilos generales */
.torneo-container {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f8ff;
    color: #333;
    margin: 20px;
    padding: 20px;
}

/* Secciones */
.section {
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Encabezados */
.torneo-container h1 {
    text-align: center;
    font-size: 2.4em;
    color: #0056b3;
    margin-bottom: 25px;
}

.torneo-container h2,
.torneo-container h3 {
    color: #004080;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

/* Formularios y controles */
.form-group {
    margin-bottom: 15px;
}

.torneo-container input[type="text"],
.torneo-container input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

.torneo-container input[type="number"] {
    width: 80px;
}

/* Botones */
.button {
    display: inline-block;
    padding: 12px 25px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: 0.3s;
    text-align: center;
    font-weight: bold;
    margin: 10px 5px;
}

.button:hover {
    background: #0056b3;
}

.reset-button {
    background: #e74c3c;
}

.reset-button:hover {
    background: #c0392b;
}

/* Tablas */
.torneo-container table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.torneo-container th,
.torneo-container td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.torneo-container th {
    background: #007bff;
    color: white;
    font-weight: 500;
}

.torneo-container tr:nth-child(even) {
    background: #f8f9fa;
}

/* Listado de equipos */
.teams-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.group-container {
    background: #e3f2fd;
    border-left: 6px solid #007bff;
    padding: 15px;
    border-radius: 10px;
    min-width: 220px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.group-title {
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    color: #004080;
    margin-bottom: 10px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 4px;
}

/* Cuadros eliminatorios */
.bracket-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.bracket-round {
    text-align: center;
    background: #e3f2fd;
    border: 1px solid #007bff;
    border-radius: 10px;
    padding: 15px;
    min-width: 240px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    margin: 15px;
}

.match {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Ganador */
.winner-container {
    text-align: center;
    background: #ffd700;
    color: #4a3200;
    font-size: 2em;
    font-weight: bold;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    margin-top: 40px;
    border: 4px solid #c79a00;
}

/* Responsividad */
@media (max-width: 768px) {
    .torneo-container {
        margin: 10px;
        padding: 10px;
    }

    .torneo-container h1 {
        font-size: 2em;
    }

    .section {
        padding: 15px;
    }

    .button {
        width: 100%;
    }

    .teams-list {
        grid-template-columns: 1fr;
    }
}