* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #5cc8ff, #7ee8a2);
    min-height: 100vh;
    color: #222;
}

/* =========================
   LOGIN Y PERFIL
========================= */

.contenedor {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.tarjeta {
    width: 100%;
    max-width: 780px;
    background: white;
    border-radius: 30px;
    padding: 40px 60px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,.18);
}

.icono {
    font-size: 70px;
}

h1 {
    margin: 5px 0;
    font-size: 45px;
    color: #1556a8;
}

.subtitulo {
    font-size: 20px;
    color: #555;
}

.personajes {
    font-size: 35px;
    margin: 25px 0;
}

label {
    display: block;
    font-size: 19px;
    font-weight: bold;
    margin-bottom: 12px;
}

input {
    width: 100%;
    padding: 17px;
    border-radius: 15px;
    border: 2px solid #ddd;
    font-size: 18px;
    text-align: center;
    outline: none;
}

input:focus {
    border-color: #2494e8;
}

button {
    width: 100%;
    margin-top: 18px;
    padding: 17px;
    border: none;
    border-radius: 15px;
    background: #ffb703;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

.error {
    background: #ffe7e7;
    color: #b42318;
    padding: 12px;
    border-radius: 12px;
    margin-top: 18px;
}

.pie {
    margin-top: 30px;
    color: #777;
}

.bienvenida {
    margin: 25px 0;
    padding: 18px;
    background: #e9fff1;
    border-radius: 15px;
    font-size: 20px;
    font-weight: bold;
    color: #18864b;
}

.boton-aventura {
    display: block;
    margin-top: 25px;
    padding: 18px;
    background: #ffb703;
    color: #000;
    text-decoration: none;
    border-radius: 15px;
    font-size: 19px;
    font-weight: bold;
}

.salir {
    color: #777;
    text-decoration: none;
}


/* =========================
   PANEL DE ACTIVIDADES
========================= */

.panel-actividades {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px 50px;
}

.cabecera-estudiante {
    width: 100%;
    background: white;
    border-radius: 22px;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 25px rgba(0,0,0,.12);
}

.cabecera-estudiante h2 {
    margin: 0;
    font-size: 24px;
    color: #1556a8;
}

.cabecera-estudiante p {
    margin: 8px 0 0;
    color: #666;
    font-size: 17px;
}

.salir-panel {
    background: #f2f2f2;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #555;
    font-weight: bold;
}

.titulo-aventura {
    text-align: center;
    margin: 35px 0 25px;
}

.emoji-grande {
    font-size: 55px;
}

.titulo-aventura h1 {
    margin: 5px 0;
    font-size: 42px;
    color: #1556a8;
}

.titulo-aventura p {
    margin-top: 10px;
    font-size: 18px;
    color: #444;
}

.lista-actividades {
    display: grid;
    gap: 20px;
}

.actividad-card {
    width: 100%;
    background: white;
    border-radius: 22px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 22px;
    box-shadow: 0 8px 25px rgba(0,0,0,.12);
}

.actividad-icono {
    width: 80px;
    height: 80px;
    min-width: 80px;
    background: #fff3cf;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 42px;
}

.actividad-info {
    flex: 1;
}

.actividad-info h2 {
    margin: 8px 0;
    font-size: 25px;
    color: #222;
}

.actividad-info p {
    margin: 8px 0;
    color: #555;
    line-height: 1.5;
}

.actividad-info small {
    color: #777;
}

.tema {
    display: inline-block;
    background: #e8f4ff;
    color: #1565c0;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.boton-jugar {
    display: inline-block;
    background: #ffb703;
    padding: 16px 22px;
    border-radius: 14px;
    color: #000;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
    transition: .2s;
}

.boton-jugar:hover,
.boton-aventura:hover {
    transform: translateY(-2px);
}

.sin-actividades {
    background: white;
    padding: 40px;
    border-radius: 22px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,.12);
}

.sin-actividades div {
    font-size: 60px;
}

.volver-panel {
    text-align: center;
    margin-top: 30px;
}

.volver-panel a {
    color: #444;
    text-decoration: none;
    font-weight: bold;
}


/* =========================
   CELULAR / TABLET
========================= */

@media (max-width: 700px) {

    .tarjeta {
        padding: 30px 20px;
    }

    h1 {
        font-size: 36px;
    }

    .cabecera-estudiante {
        align-items: flex-start;
        gap: 15px;
    }

    .actividad-card {
        flex-direction: column;
        text-align: center;
    }

    .actividad-info {
        width: 100%;
    }

    .boton-jugar {
        width: 100%;
        text-align: center;
    }
}

/* =========================
   ACTIVIDAD INTERACTIVA
========================= */

.zona-actividad {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

.barra-actividad {
    background: white;
    border-radius: 18px;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 25px rgba(0,0,0,.12);
    font-weight: bold;
}

.volver-actividad {
    text-decoration: none;
    color: #1556a8;
}

.encabezado-actividad {
    text-align: center;
    margin: 35px 0;
}

.emoji-actividad {
    font-size: 55px;
}

.encabezado-actividad h1 {
    font-size: 38px;
}

.encabezado-actividad p {
    font-size: 18px;
}

.pregunta-arrastrar {
    background: white;
    border-radius: 28px;
    padding: 35px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

.numero-pregunta {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 20px;
    background: #e8f4ff;
    color: #1556a8;
    font-weight: bold;
}

.pregunta-arrastrar h2 {
    font-size: 38px;
    margin: 25px 0 10px;
}

.instruccion-arrastrar {
    font-size: 18px;
    color: #555;
}

.zona-respuesta {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 35px 0;
}

.casilla-respuesta {
    width: 85px;
    height: 95px;
    border: 4px dashed #72b7e8;
    border-radius: 18px;
    background: #f5fbff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fichas-numeros {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin: 25px 0;
}

.ficha-numero {
    width: 75px;
    height: 75px;
    border-radius: 18px;
    background: #ffb703;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    font-weight: bold;
    cursor: grab;
    box-shadow: 0 6px 0 #dc9800;
    user-select: none;
}

.ficha-numero:active {
    cursor: grabbing;
}

.ficha-numero.seleccionada {
    outline: 5px solid #1556a8;
    transform: scale(1.08);
}

.boton-comprobar {
    max-width: 320px;
    background: #22a861;
    color: white;
}

.boton-comprobar:disabled {
    opacity: .6;
}

.mensaje-resultado {
    margin-top: 25px;
    padding: 15px;
    border-radius: 15px;
    font-size: 20px;
    font-weight: bold;
}

.mensaje-correcto {
    background: #e4ffed;
    color: #128042;
}

.mensaje-error {
    background: #ffe5e5;
    color: #b42318;
}

.mensaje-aviso {
    background: #fff4cf;
    color: #7a5b00;
}

.boton-reiniciar {
    max-width: 280px;
    background: #e9e9e9;
    color: #444;
}

@media (max-width: 600px) {

    .pregunta-arrastrar {
        padding: 25px 15px;
    }

    .pregunta-arrastrar h2 {
        font-size: 30px;
    }

    .casilla-respuesta {
        width: 70px;
        height: 80px;
    }

    .ficha-numero {
        width: 65px;
        height: 65px;
        font-size: 30px;
    }
}