* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(120deg, #071735, #102a5c, #1d3f7a, #071735);
    background-size: 400% 400%;
    animation: fondoMovimiento 18s ease infinite;
    color: white;
}

.contenedor {
    min-height: 100vh;
    width: 100%;
    padding: 20px;
}

.header-logo {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.logo-principal {
    width: 130px;
    height: 130px;
    object-fit: contain;
    animation: flotarLogo 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 204, 0, 0.4));
}

.pantalla {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    text-align: center;
}

.oculto {
    display: none !important;
}

h1 {
    color: #ffcc00;
    font-size: 2.6rem;
    margin: 10px 0;
}

input,
select {
    padding: 15px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    outline: none;
}

button {
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    background: #ffcc00;
    color: #071735;
    font-weight: bold;
    cursor: pointer;
    transition: 0.25s ease;
}

button:hover {
    background: #ffd633;
    transform: translateY(-2px);
}

/* INICIO */

.pantalla-inicio {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 190px);
}

.inicio-card {
    width: 100%;
    max-width: 500px;
    padding: 35px 30px;
    border-radius: 30px;
    background: rgba(16, 42, 92, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    animation: aparecerInicio 0.8s ease;
}

.subtitulo {
    color: #d8e6ff;
    font-size: 1rem;
    margin-bottom: 22px;
}

.inicio-card input,
.inicio-card select,
.btn-iniciar {
    width: 100%;
    margin-top: 10px;
}

.btn-admin {
    display: inline-block;
    margin-bottom: 18px;
    padding: 12px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: 0.3s ease;
}

.btn-admin:hover {
    background: #ffcc00;
    color: #071735;
}

/* JUEGO */

.pantalla-juego {
    animation: aparecerInicio 0.5s ease;
}

.panel-superior {
    display: flex;
    justify-content: space-around;
    gap: 12px;
    background: rgba(16, 42, 92, 0.9);
    padding: 15px;
    border-radius: 18px;
    margin-bottom: 20px;
    font-weight: bold;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.zona-juego {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(360px, 520px) minmax(240px, 1fr);
    gap: 22px;
    align-items: center;
}

.panel-lateral {
    background: rgba(16, 42, 92, 0.88);
    border-radius: 24px;
    padding: 22px;
    min-height: 420px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.panel-lateral h3 {
    margin-top: 0;
    color: #ffcc00;
    font-size: 1.5rem;
}

.panel-rosco {
    display: flex;
    justify-content: center;
    align-items: center;
}

.rosco {
    position: relative;
    width: 460px;
    height: 460px;
    margin: 0 auto;
    border-radius: 50%;
}

.letra {
    position: absolute;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #1d74ff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 0 12px rgba(29, 116, 255, 0.7);
    transition: 0.25s ease;
}

.letra.activa {
    background: #ffcc00;
    color: #071735;
    transform: scale(1.25);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.9);
}

.letra.correcta {
    background: #28a745;
}

.letra.incorrecta {
    background: #dc3545;
}

.letra.saltada {
    background: #ff9800;
}

.tarjeta-pregunta {
    background: rgba(7, 23, 53, 0.75);
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 18px;
}

#letraActual {
    font-size: 3.5rem;
    color: #ffcc00;
    margin: 0;
}

#tipoPregunta {
    font-weight: bold;
    color: #d8e6ff;
}

#definicion {
    line-height: 1.4;
}

#respuestaUsuario {
    width: 100%;
    margin-bottom: 12px;
    text-align: center;
}

.botones {
    display: flex;
    gap: 10px;
}

.botones button {
    width: 100%;
}

.btn-secundario {
    background: #ff9800;
    color: #071735;
}

.btn-secundario:hover {
    background: #ffb13b;
}

.estado-card {
    min-height: 120px;
    background: rgba(7, 23, 53, 0.75);
    border-radius: 20px;
    padding: 25px 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#mensaje {
    font-size: 1.35rem;
    font-weight: bold;
    margin: 0;
}

.leyenda {
    margin-top: 25px;
    text-align: left;
    display: grid;
    gap: 12px;
}

.dot {
    width: 16px;
    height: 16px;
    display: inline-block;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.azul {
    background: #1d74ff;
}

.amarillo {
    background: #ffcc00;
}

.verde {
    background: #28a745;
}

.rojo {
    background: #dc3545;
}

.naranja {
    background: #ff9800;
}

/* FINAL */

.pantalla-final {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 190px);
}

.final-card {
    background: rgba(16, 42, 92, 0.9);
    padding: 35px;
    border-radius: 28px;
    width: 100%;
    max-width: 600px;
}

/* ANIMACIONES */

@keyframes flotarLogo {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-8px) scale(1.04);
    }
}

@keyframes aparecerInicio {
    from {
        opacity: 0;
        transform: translateY(25px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fondoMovimiento {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* RESPONSIVE */

@media (max-width: 1100px) {
    .zona-juego {
        grid-template-columns: 1fr;
    }

    .panel-respuesta {
        order: 2;
    }

    .panel-rosco {
        order: 1;
    }

    .panel-estado {
        order: 3;
    }

    .panel-lateral {
        min-height: auto;
    }
}

@media (max-width: 600px) {
    .contenedor {
        padding: 12px;
    }

    .logo-principal {
        width: 95px;
        height: 95px;
    }

    h1 {
        font-size: 2rem;
    }

    .inicio-card {
        padding: 25px 18px;
    }

    .panel-superior {
        flex-direction: column;
        font-size: 0.95rem;
    }

    .rosco {
        width: 320px;
        height: 320px;
        transform: scale(0.9);
    }

    .letra {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .botones {
        flex-direction: column;
    }
}