/* =================================
   CONFIGURACIÓN GENERAL
================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;

    background: #eef6fb;

    color: #263238;

    min-height: 100vh;
}


/* =================================
   PANTALLAS
================================= */

.pantalla {
    display: none;

    min-height: 100vh;

    padding: 30px;
}

.pantalla.activa {
    display: flex;
}


/* =================================
   INICIO
================================= */

#inicio {
    justify-content: center;

    align-items: center;

    text-align: center;

    background:
        linear-gradient(
            135deg,
            #0f3d5b,
            #1d6fa5
        );

    color: white;
}


.inicio-contenido {
    width: 90%;

    max-width: 750px;
}


.icono-inicio {
    font-size: 75px;

    margin-bottom: 15px;
}


.inicio-contenido h1 {
    font-size: 48px;

    margin-bottom: 30px;
}


.descripcion {
    background: rgba(255,255,255,0.13);

    padding: 25px;

    border-radius: 18px;

    margin-bottom: 30px;
}


.descripcion p {
    font-size: 18px;

    line-height: 1.6;

    margin-bottom: 18px;
}


.descripcion p:last-child {
    margin-bottom: 0;
}


/* =================================
   BOTÓN PRINCIPAL
================================= */

.boton-principal {
    border: none;

    padding: 17px 35px;

    border-radius: 12px;

    background: #ffb703;

    color: #263238;

    font-size: 18px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.25s;
}


.boton-principal:hover {
    transform: scale(1.05);
}


/* =================================
   ESCENARIOS
================================= */

#escenarios {
    justify-content: center;

    align-items: center;
}


.contenedor {
    width: 100%;

    max-width: 1000px;

    text-align: center;
}


.contenedor h1 {
    font-size: 42px;

    color: #0f3d5b;

    margin-bottom: 10px;
}


.subtitulo {
    font-size: 18px;

    margin-bottom: 35px;
}


.escenarios-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 25px;
}


.escenario {
    min-height: 190px;

    border: none;

    border-radius: 20px;

    padding: 25px;

    cursor: pointer;

    color: white;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    gap: 12px;

    box-shadow:
        0 8px 20px
        rgba(0,0,0,0.12);

    transition: 0.25s;
}


.escenario:hover {
    transform: translateY(-7px);

    box-shadow:
        0 14px 25px
        rgba(0,0,0,0.18);
}


.escenario span {
    font-size: 55px;
}


.escenario strong {
    font-size: 23px;
}


.escuela {
    background: #3a86ff;
}


.casa {
    background: #43aa8b;
}


.calle {
    background: #f4a261;
}


.vehiculo {
    background: #9b5de5;
}


/* =================================
   ESCENA DEL SISMO
================================= */

#escena {
    justify-content: center;

    align-items: center;

    background: #172f3e;
}


.escena-contenedor {
    position: relative;

    width: 100%;

    max-width: 1100px;

    border-radius: 25px;

    overflow: hidden;

    box-shadow:
        0 15px 40px
        rgba(0,0,0,0.35);
}


/* =================================
   IMAGEN
================================= */

.imagen-escenario {
    display: block;

    width: 100%;

    height: min(70vh, 700px);

    max-height: 80vh;

    object-fit: cover;

    object-position: center;

    animation:
        temblor 0.15s infinite;
}


/* =================================
   ANIMACIÓN DEL SISMO
================================= */

@keyframes temblor {

    0% {
        transform: translate(0, 0);
    }

    20% {
        transform: translate(
            3px,
            -2px
        );
    }

    40% {
        transform: translate(
            -3px,
            2px
        );
    }

    60% {
        transform: translate(
            2px,
            3px
        );
    }

    80% {
        transform: translate(
            -2px,
            -3px
        );
    }

    100% {
        transform: translate(
            0,
            0
        );
    }
}


/* =================================
   MENSAJE EMERGENTE
================================= */

.mensaje-sismo {
    position: absolute;

    left: 50%;

    top: 50%;

    transform:
        translate(
            -50%,
            -50%
        );

    width: 420px;

    max-width: 85%;

    background: white;

    padding: 30px;

    border-radius: 20px;

    text-align: center;

    box-shadow:
        0 10px 35px
        rgba(0,0,0,0.4);

    animation:
        aparecer 0.5s ease;
}


@keyframes aparecer {

    from {
        opacity: 0;

        transform:
            translate(
                -50%,
                -45%
            )
            scale(0.9);
    }

    to {
        opacity: 1;

        transform:
            translate(
                -50%,
                -50%
            )
            scale(1);
    }
}


.alerta {
    font-size: 50px;

    margin-bottom: 5px;
}


.mensaje-sismo h1 {
    color: #e63946;

    font-size: 32px;

    margin-bottom: 10px;
}


.mensaje-sismo p {
    font-size: 18px;
}


.pregunta-alerta {
    font-weight: bold;

    margin-top: 8px;

    margin-bottom: 20px;
}


/* =================================
   BOTÓN CONTINUAR
================================= */

.boton-continuar {
    border: none;

    background: #1769d2;

    color: white;

    padding: 13px 28px;

    border-radius: 10px;

    font-size: 17px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}


.boton-continuar:hover {
    transform: scale(1.05);

    background: #0f55ad;
}


/* =================================
   JUEGO
================================= */

#juego {
    justify-content: center;
}


.juego-contenedor {
    width: 100%;

    max-width: 900px;
}


.barra-superior {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 20px;
}


.boton-salir {
    border: none;

    background: #dce8ef;

    color: #263238;

    padding: 10px 17px;

    border-radius: 8px;

    cursor: pointer;

    font-weight: bold;
}


.puntuacion {
    background: white;

    padding: 10px 17px;

    border-radius: 8px;

    font-weight: bold;
}


/* =================================
   BARRA DE PROGRESO
================================= */

.progreso {
    width: 100%;

    height: 12px;

    background: #d8e2e8;

    border-radius: 20px;

    overflow: hidden;

    margin-bottom: 12px;
}


#barraProgreso {
    height: 100%;

    width: 33.33%;

    background: #3a86ff;

    transition: width 0.4s;
}


.numero-pregunta {
    text-align: center;

    font-weight: bold;

    color: #607d8b;

    margin-bottom: 15px;
}


/* =================================
   TARJETA DE PREGUNTA
================================= */

.tarjeta-pregunta {
    background: white;

    border-radius: 22px;

    padding: 35px;

    box-shadow:
        0 10px 30px
        rgba(0,0,0,0.12);

    text-align: center;
}


.icono-pregunta {
    font-size: 55px;

    margin-bottom: 5px;
}


#tituloEscenario {
    color: #0f3d5b;

    margin-bottom: 25px;
}


#pregunta {
    font-size: 21px;

    line-height: 1.5;

    font-weight: bold;

    margin-bottom: 25px;
}


/* =================================
   OPCIONES
================================= */

.opciones {
    display: flex;

    flex-direction: column;

    gap: 13px;
}


.opcion {
    width: 100%;

    padding: 16px;

    border: 2px solid #d9e3e8;

    border-radius: 12px;

    background: #f8fafb;

    cursor: pointer;

    text-align: left;

    font-size: 17px;

    transition: 0.2s;
}


.opcion:hover {
    border-color: #3a86ff;

    background: #eef6ff;
}


.opcion:disabled {
    cursor: default;
}


.opcion.correcta {
    border-color: #2a9d8f;

    background: #d9f5ef;
}


.opcion.incorrecta {
    border-color: #e63946;

    background: #ffe1e4;
}


/* =================================
   EXPLICACIÓN
================================= */

.resultado {
    margin-top: 25px;

    padding: 20px;

    border-radius: 15px;
}


.resultado.correcto {
    background: #e0f7f1;
}


.resultado.incorrecto {
    background: #ffe5e8;
}


.resultado h3 {
    margin-bottom: 10px;

    font-size: 22px;
}


.resultado p {
    line-height: 1.5;

    margin-bottom: 18px;
}


.resultado button {
    border: none;

    padding: 12px 25px;

    border-radius: 10px;

    background: #0f3d5b;

    color: white;

    font-weight: bold;

    cursor: pointer;
}


.oculto {
    display: none;
}


/* =================================
   RESULTADO FINAL
================================= */

#final {
    justify-content: center;

    align-items: center;

    text-align: center;
}


.final-contenido {
    width: 90%;

    max-width: 600px;
}


.emoji-final {
    font-size: 80px;

    margin-bottom: 15px;
}


.final-contenido h1 {
    color: #0f3d5b;

    font-size: 40px;

    margin-bottom: 15px;
}


.final-contenido > p {
    font-size: 19px;

    margin-bottom: 25px;
}


.resultado-final {
    background: white;

    padding: 25px;

    border-radius: 20px;

    margin-bottom: 25px;

    box-shadow:
        0 8px 25px
        rgba(0,0,0,0.1);
}


.resultado-final p {
    font-size: 18px;

    margin-bottom: 8px;
}


.resultado-final strong {
    font-size: 45px;

    color: #3a86ff;
}


/* =================================
   CELULAR
================================= */

@media (max-width: 650px) {

    .pantalla {
        padding: 18px;
    }


    .inicio-contenido h1 {
        font-size: 36px;
    }


    .escenarios-grid {
        grid-template-columns: 1fr;
    }


    .escenario {
        min-height: 150px;
    }


    .mensaje-sismo {
        padding: 20px;
    }


    .mensaje-sismo h1 {
        font-size: 25px;
    }


    .tarjeta-pregunta {
        padding: 22px;
    }


    #pregunta {
        font-size: 18px;
    }

}
.ovsi-return { position:fixed; z-index:9999; top:12px; left:12px; padding:10px 14px; color:#fff; background:#071d2d; border:1px solid rgba(255,255,255,.35); border-radius:4px; font:700 13px/1.2 Arial,sans-serif; text-decoration:none; box-shadow:0 4px 18px rgba(0,0,0,.22); }
