* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    background: #0F1912;
    color: #EDEFEC;

    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-pagina {
    width: 100%;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 30px;

    background: #1A2B20;
    color: #EDEFEC;
    border-bottom: 1px solid #2A3D30;
}

.marca {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 17px;
    font-weight: 700;
}

.racha {
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;
}

.racha span {
    color: #FF7A5C;
}

.juego {
    width: 90%;
    max-width: 800px;

    flex: 1;
    min-height: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tablero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;

    width: 100%;
}

.carta-jugador {
    position: relative;

    width: 260px;

    background: #1A2B20;
    border-radius: 16px;
    border: 1px solid #2A3D30;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);

    padding: 26px 14px;
    text-align: center;
}

.foto-jugador {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;

    background: #0F1912;
    margin-bottom: 12px;
}

.nombre-jugador {
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #EDEFEC;

    min-height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.etiqueta-fee {
    font-size: 11px;
    color: #8A9690;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.fee-valor {
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 27px;
    color: #3FA873;
    margin-top: 3px;
}

.fee-valor.oculto {
    color: #45564c;
    font-size: 27px;
}

.vs {
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #8A9690;
}

.botones-guess {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-top: 12px;
}

.btn-guess {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 9px 10px;

    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.3px;
    text-transform: uppercase;

    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-mayor {
    background: #3FA873;
    color: #0F1912;
}

.btn-mayor:hover {
    background: #4fc186;
    transform: translateY(-2px);
}

.btn-menor {
    background: #FF7A5C;
    color: #0F1912;
}

.btn-menor:hover {
    background: #ff9880;
    transform: translateY(-2px);
}

.carta-jugador.correcto {
    border: 2px solid #3FA873;
}

.carta-jugador.incorrecto {
    border: 2px solid #FF7A5C;
}

.mensaje-final {
    margin-top: 20px;
    text-align: center;
    min-height: 60px;
}

.mensaje-final p {
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 10px;
    color: #EDEFEC;
}

#btnReiniciar {
    background: #3FA873;
    color: #0F1912;
    border: none;
    border-radius: 10px;
    padding: 11px 28px;

    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;

    cursor: pointer;
}

.traspaso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
}

.logo-traspaso {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.flecha-traspaso {
    color: #8A9690;
    font-size: 12px;
}

@media (max-width: 700px) {
    body {
        overflow: auto;
    }

    .juego {
        justify-content: flex-start;
        padding-top: 20px;
    }

    .tablero {
        flex-direction: column;
        gap: 10px;
    }

    .carta-jugador {
        width: 90%;
        max-width: 270px;
        padding: 16px 10px;
    }

    .foto-jugador {
        width: 86px;
        height: 86px;
        margin-bottom: 8px;
    }

    .nombre-jugador {
        font-size: 17px;
        min-height: 1.6em;
    }

    .etiqueta-fee {
        font-size: 10px;
        margin-top: 4px;
    }

    .fee-valor,
    .fee-valor.oculto {
        font-size: 24px;
    }

    .logo-traspaso {
        width: 28px;
        height: 28px;
    }

    .btn-guess {
        padding: 7px 8px;
        font-size: 11px;
    }

    .carta-jugador.siguiente {
        order: -1;
    }

    .carta-jugador.conocido {
        order: 1;
    }

    .vs {
        order: 0;
        font-size: 14px;
    }
}

[hidden] {
    display: none !important;
}

.contador-ronda {
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #8A9690;
    text-align: center;
    margin: 0 0 10px;
}

@keyframes shake-suave {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.carta-jugador.incorrecto {
    animation: shake-suave 0.4s ease;
}

.contador-puntos-dia {
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #EDEFEC;

    margin: 0 auto 12px;
    text-align: center;
    width: 100%;
}

#valorPuntosDia {
    color: #3FA873;
}

.flotante-puntos-ganados {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);

    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 90px;
    color: #3FA873;
    text-shadow: 0 4px 20px rgba(63, 168, 115, 0.5);

    pointer-events: none;
    z-index: 9999;

    animation: flotar-puntos-centro 1.2s ease-out forwards;
}

@keyframes flotar-puntos-centro {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    25% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    40% {
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -60%) scale(1.1);
    }
}