/* =====================================================
   PALEntropía — COMBATES
   combates.css
   ===================================================== */


/* =====================================================
   BASE
   ===================================================== */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background:
        linear-gradient(
            180deg,
            #07111f 0%,
            #0b1830 45%,
            #111f38 100%
        );

    color: #eaf6ff;

    padding-bottom: 40px;
}


/* =====================================================
   BOTÓN MENÚ PRINCIPAL
   ===================================================== */

#botonMenuPrincipal {

    position: fixed;

    top: 16px;
    left: 16px;

    width: 46px;
    height: 46px;

    border: 1px solid #58d9ff;
    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #102c49,
            #071725
        );

    color: #ffffff;

    font-size: 21px;

    cursor: pointer;

    z-index: 1000;

    box-shadow:
        0 0 12px rgba(70, 210, 255, 0.25);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

#botonMenuPrincipal:hover {

    transform: scale(1.08);

    box-shadow:
        0 0 20px rgba(70, 210, 255, 0.5);
}


/* =====================================================
   CABECERA
   ===================================================== */

#cabecera {

    text-align: center;

    padding:
        30px
        20px
        20px;

    border-bottom:
        1px solid
        rgba(90, 220, 255, 0.25);

    background:
        linear-gradient(
            180deg,
            rgba(8, 27, 48, 0.95),
            rgba(8, 20, 36, 0.7)
        );
}

#cabecera h1 {

    margin: 0;

    font-size: 32px;

    letter-spacing: 2px;

    color: #ffffff;

    text-shadow:
        0 0 8px rgba(75, 220, 255, 0.5),
        0 0 20px rgba(75, 220, 255, 0.2);
}

#subtitulo {

    margin-top: 7px;

    font-size: 17px;

    letter-spacing: 3px;

    text-transform: uppercase;

    color: #63ddff;
}


/* =====================================================
   CONTENEDOR
   ===================================================== */

#combates {

    width: min(
        1100px,
        calc(100% - 24px)
    );

    margin:
        24px
        auto
        0;
}


/* =====================================================
   CABECERA DE COMBATES
   ===================================================== */

#cabeceraCombates {

    text-align: center;

    padding: 22px 16px;

    margin-bottom: 24px;

    border:
        1px solid
        rgba(82, 218, 255, 0.35);

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(14, 40, 65, 0.95),
            rgba(8, 24, 42, 0.95)
        );

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3);
}

#cabeceraCombates h2 {

    margin:
        0
        0
        10px;

    font-size: 25px;

    color: #ffffff;

    text-shadow:
        0 0 10px
        rgba(73, 218, 255, 0.4);
}

#estadoCombates {

    margin: 0;

    color: #9eeaff;

    font-size: 15px;

    line-height: 1.5;
}


/* =====================================================
   RONDAS
   ===================================================== */

.rondaTorneo {

    margin-bottom: 30px;

    padding: 18px;

    border:
        1px solid
        rgba(91, 215, 255, 0.25);

    border-radius: 20px;

    background:
        rgba(6, 20, 35, 0.82);

    box-shadow:
        0 10px 28px
        rgba(0, 0, 0, 0.28);
}


/* =====================================================
   TÍTULO DE RONDA
   ===================================================== */

.rondaTorneo h2 {

    margin:
        0
        0
        18px;

    padding-bottom: 12px;

    border-bottom:
        1px solid
        rgba(90, 220, 255, 0.2);

    font-size: 21px;

    color: #67e3ff;

    letter-spacing: 1px;
}


/* =====================================================
   PASAN DIRECTAMENTE
   ===================================================== */

.pasanDirectamente {

    margin-bottom: 20px;

    padding: 13px 15px;

    border-radius: 12px;

    background:
        rgba(22, 52, 72, 0.7);

    border:
        1px solid
        rgba(100, 220, 255, 0.18);

    color: #bceeff;

    font-size: 14px;

    line-height: 1.7;
}

.pasanDirectamente strong {

    color: #ffffff;
}


/* =====================================================
   LISTA DE COMBATES
   ===================================================== */

.listaCombates {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                280px,
                1fr
            )
        );

    gap: 16px;
}


/* =====================================================
   TARJETA DE COMBATE
   ===================================================== */

.cruceCombate {

    position: relative;

    padding: 16px;

    border:
        1px solid
        rgba(88, 220, 255, 0.28);

    border-radius: 16px;

    background:
        linear-gradient(
            145deg,
            rgba(17, 42, 66, 0.96),
            rgba(8, 24, 41, 0.96)
        );

    box-shadow:
        0 6px 18px
        rgba(0, 0, 0, 0.25);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.cruceCombate:hover {

    transform:
        translateY(-3px);

    border-color:
        rgba(94, 225, 255, 0.65);

    box-shadow:
        0 10px 24px
        rgba(35, 180, 220, 0.18);
}


/* =====================================================
   NÚMERO DE COMBATE
   ===================================================== */

.numeroCombate {

    margin-bottom: 13px;

    text-align: center;

    font-size: 13px;

    font-weight: bold;

    letter-spacing: 1px;

    text-transform: uppercase;

    color: #65ddff;
}


/* =====================================================
   PARTICIPANTES
   ===================================================== */

.participantesCombate {

    display: grid;

    grid-template-columns:
        1fr
        auto
        1fr;

    align-items: center;

    gap: 9px;
}


/* =====================================================
   NOMBRE DEL PARTICIPANTE
   ===================================================== */

.participanteCombate {

    min-height: 58px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding:
        10px
        8px;

    border:
        1px solid
        rgba(130, 225, 255, 0.22);

    border-radius: 11px;

    background:
        rgba(7, 25, 43, 0.9);

    color: #f0fbff;

    text-align: center;

    font-size: 14px;

    font-weight: bold;

    line-height: 1.35;
}


/* =====================================================
   VS / ESPADA
   ===================================================== */

.versusCombate {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 34px;
    height: 34px;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #123b59,
            #071b2e
        );

    border:
        1px solid
        rgba(95, 222, 255, 0.45);

    font-size: 16px;

    box-shadow:
        0 0 12px
        rgba(70, 210, 255, 0.18);
}


/* =====================================================
   GANADOR PENDIENTE
   ===================================================== */

.ganadorPendiente {

    color: #ffe89a;

    border-color:
        rgba(255, 214, 88, 0.3);

    background:
        linear-gradient(
            145deg,
            rgba(62, 51, 20, 0.75),
            rgba(28, 28, 16, 0.8)
        );

    font-size: 13px;
}


/* =====================================================
   VOLVER
   ===================================================== */

#volver {

    width: min(
        1100px,
        calc(100% - 24px)
    );

    margin:
        25px
        auto
        0;

    text-align: center;
}

#botonVolver {

    display: inline-block;

    padding:
        12px
        20px;

    border:
        1px solid
        rgba(87, 220, 255, 0.4);

    border-radius: 12px;

    background:
        rgba(12, 35, 55, 0.9);

    color: #aeeeff;

    text-decoration: none;

    font-size: 14px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

#botonVolver:hover {

    transform:
        translateY(-2px);

    background:
        rgba(20, 57, 82, 0.95);

    border-color:
        rgba(95, 225, 255, 0.75);

    color: #ffffff;
}


/* =====================================================
   MÓVIL
   ===================================================== */

@media (
    max-width: 600px
) {

    #cabecera {

        padding:
            25px
            15px
            18px;
    }

    #cabecera h1 {

        font-size: 27px;
    }

    #subtitulo {

        font-size: 14px;

        letter-spacing: 2px;
    }

    #combates {

        width:
            calc(100% - 14px);

        margin-top: 14px;
    }

    #cabeceraCombates {

        padding:
            18px
            12px;

        border-radius: 15px;
    }

    #cabeceraCombates h2 {

        font-size: 21px;
    }

    #estadoCombates {

        font-size: 13px;
    }

    .rondaTorneo {

        padding: 12px;

        border-radius: 16px;
    }

    .rondaTorneo h2 {

        font-size: 19px;
    }

    .listaCombates {

        grid-template-columns:
            1fr;

        gap: 12px;
    }

    .cruceCombate {

        padding: 13px;
    }

    .participanteCombate {

        min-height: 54px;

        font-size: 13px;
    }

    .pasanDirectamente {

        font-size: 12px;

        padding: 11px;
    }

}


/* =====================================================
   MÓVILES MUY PEQUEÑOS
   ===================================================== */

@media (
    max-width: 380px
) {

    .participantesCombate {

        grid-template-columns:
            1fr;

        gap: 7px;
    }

    .versusCombate {

        width: 100%;
        height: 28px;

        border-radius: 8px;
    }

}/* =====================================================
   BOTÓN REHACER EMPAREJAMIENTOS
   ===================================================== */

#botonRehacerEmparejamientos {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 16px auto 0;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease,
                opacity 0.15s ease;
}

#botonRehacerEmparejamientos:hover {
    transform: translateY(-1px);
}

#botonRehacerEmparejamientos:active {
    transform: translateY(0);
}

#botonRehacerEmparejamientos:disabled {
    opacity: 0.5;
    cursor: wait;
}
/* =====================================================
   BOTÓN VS INTERACTIVO
   ===================================================== */
button.versusCombate {
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

button.versusCombate:hover:not(:disabled) {
    transform: scale(1.15);
    background: linear-gradient(145deg, #1d4f76, #0e2b45);
    border-color: rgba(110, 230, 255, 0.8);
    box-shadow: 0 0 16px rgba(70, 210, 255, 0.45);
}

button.versusCombate:active:not(:disabled) {
    transform: scale(0.95);
}

/* =====================================================
   ESTILOS ADICIONALES — GANADOR DE TORNEO Y SERIE
   ===================================================== */

.cruceCombate.combateFinalizado {
    border-color: rgba(255, 215, 0, 0.45);
    background: linear-gradient(145deg, rgba(28, 42, 60, 0.96), rgba(12, 22, 34, 0.96));
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.12);
}

.participanteCombate.ganadorTorneo {
    border-color: #ffd700;
    background: linear-gradient(145deg, rgba(62, 53, 15, 0.9), rgba(30, 26, 8, 0.95));
    color: #ffe680;
    box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.25), 0 0 12px rgba(255, 215, 0, 0.2);
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

.marcadorSerie {
    font-family: monospace, sans-serif;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(88, 166, 255, 0.4);
}



/* =====================================================
   CORRECCIÓN DE REJILLA Y ESTILOS PARA COMBATES FINALIZADOS
   ===================================================== */

/* Rejilla de combatientes adaptada para acomodar el marcador central */
.cruceCombate .participantesCombate {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}

/* Tarjeta cuando el combate ya ha finalizado */
.cruceCombate.combateFinalizado {
    border-color: rgba(255, 215, 0, 0.45);
    background: linear-gradient(145deg, rgba(28, 42, 60, 0.96), rgba(12, 22, 34, 0.96));
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.12);
}

/* Estilo para el combatiente que ha ganado la serie */
.participanteCombate.ganadorTorneo {
    border-color: #ffd700;
    background: linear-gradient(145deg, rgba(62, 53, 15, 0.9), rgba(30, 26, 8, 0.95));
    color: #ffe680;
    box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.25), 0 0 12px rgba(255, 215, 0, 0.2);
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

/* Estilo limpio para el marcador numérico de victorias en medio */
.marcadorSerie {
    font-family: monospace, sans-serif;
    font-size: 0.95rem;
    font-weight: bold;
    color: #58a6ff;
    text-align: center;
    padding: 0 4px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(88, 166, 255, 0.4);
}


/* Estilo del botón circular de simulación individual */
.cruceCombate {
    position: relative; /* Obligatorio para que el botón se posicione dentro de la tarjeta */
}

.botonSimularIndividual {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    z-index: 5;
    padding: 0;
}

.botonSimularIndividual:hover {
    background-color: #30363d;
    border-color: #58a6ff;
    color: #58a6ff;
}
