/*==========================================================
            ENSIMAT GAMES
            VERSION 2.0 (Optimizado Responsive Pro)
==========================================================*/

/*==========================
        COLORES
===========================*/
:root{
    --azul-oscuro:#061E5C;
    --azul:#0B3C91;
    --azul-claro:#1565C0;
    --verde:#7ED321;
    --blanco:#FFFFFF;
    --gris:#F5F7FA;
    --primary: #0A2E6D;
    --success: #34A853;
    --danger: #E74C3C;
}

/*==========================
        RESET
===========================*/
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Segoe UI",sans-serif;
    
    /* NUEVO: Elimina el destello gris al tocar botones en móviles */
    -webkit-tap-highlight-color: transparent; 
}
/*========================== 
         BODY 
===========================*/ 
body{ 
    min-height:100vh;
    min-height:100dvh;

    display:flex; 
    justify-content:center; 
    align-items:center; 

    padding:20px;

    overflow-x:hidden;
    overflow-y:auto;

    background-image:url("../assets/images/fondo-campus.png");
    background-size:cover;
    background-position:center center;
    background-repeat:no-repeat;
    background-attachment:fixed;
}

/*==========================
      RESPONSIVE TABLET
===========================*/
@media (max-width:768px){

    body{
        padding:15px;

        background-size:cover;
        background-position:center center;
        background-attachment:scroll;
    }

}

/*==========================
      RESPONSIVE CELULAR
===========================*/
@media (max-width:480px){

    body{
        padding:10px;

        background-size:cover;
        background-position:center center;
    }

}

/*========================== 
      CONTENEDOR 
===========================*/ 
.container{ 
    width:100%; 
    display:flex; 
    justify-content:center; 
    align-items:center; 
    position:relative; 
    z-index:10; 
}
/*==========================
      TARJETA
===========================*/
.card{
    width:100%;
    max-width:340px;
    max-height:85vh;      
    overflow-y:auto;      
    background:rgba(255,255,255,.97);
    backdrop-filter:blur(12px);
    border-radius:26px;
    padding:25px;
    border:1px solid rgba(255,255,255,.35);
    box-shadow:0 25px 60px rgba(0,0,0,.22);
    text-align:center;
    animation:entrada .8s ease;
}

/* NUEVO: Estilización del scrollbar para pantallas pequeñas */
.card::-webkit-scrollbar {
    width: 6px;
}
.card::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.02);
    border-radius: 10px;
}
.card::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

/*==========================
            LOGO
===========================*/
.logo{
    width:155px;
    display:block;
    margin:0 auto 10px auto;
    transition:.3s;
}

.logo:hover{
    transform:scale(1.03);
}

/*==========================
            TITULO
===========================*/
.titulo{
    color:var(--azul-oscuro);
    font-size:1.75rem;
    font-weight:800;
    letter-spacing:.5px;
    margin-bottom:6px;
}

/*==========================
          SUBTITULO
===========================*/
.subtitulo{
    color:#555;
    font-size:1rem;
    margin-bottom:6px;
}

.bienvenida{
    color:#777;
    font-size:14px;
    margin-bottom:18px;
}

/*==========================
            INPUT
===========================*/
.grupo{
    text-align:left;
    margin-top:15px;
}

.grupo label{
    display:block;
    color:var(--azul-oscuro);
    font-size:16px;
    font-weight:700;
    margin-bottom:8px;
}

.grupo input{
    width:100%;
    padding:16px;
    border-radius:16px;
    border:2px solid #D6E8FF;
    outline:none;
    font-size:18px;
    transition:.30s;
}

.grupo input:focus{
    border-color:var(--verde);
    box-shadow:0 0 15px rgba(126,211,33,.35);
}

/*==========================
            BOTON
===========================*/
button{
    width:100%;
    display:flex;
    align-items:center;
    gap:15px;
    padding:16px 20px;
    margin:12px 0;
    border:none;
    border-radius:15px;
    cursor:pointer;
    font-size:18px;
    font-weight:bold;
    transition:0.3s;
}

button:hover{
    transform:translateY(-3px);
    background:#92E93A;
}

button:active{
    transform:scale(.98);
}

/*==========================================================
      MODIFICADORES DE BOTONES (ARQUITECTURA FIJA)
==========================================================*/
#btnComenzar, .btn-centrado {
    justify-content: center;
}

/*==========================
      ICONOS BOTONES
===========================*/
.icono{
    width:22px;
    height:22px;
    border-radius:4px;
    flex-shrink:0;
}

/*==========================
            MENSAJE
===========================*/
.mensaje{
    margin-top:18px;
    color:#555;
    font-size:14px;
    line-height:1.5;
}

/*==========================
          FOOTER
===========================*/
footer{
    margin-top:22px;
    color:#9E9E9E;
    font-size:12px;
}

/*==========================
        ANIMACIONES
===========================*/
@keyframes entrada{
    from{ opacity:0; transform:translateY(25px) scale(.96); }
    to{ opacity:1; transform:translateY(0) scale(1); }
}

/*==========================
      EFECTO TARJETA
===========================*/
.card:hover{
    transform:translateY(-4px);
    transition:.35s;
}

/*====================================
      BOTONES DE TEMAS
====================================*/
.tema-btn{
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 12px 18px;  
    min-height: 70px;    
    margin-bottom:12px;
}

.tema-nombre{
    font-size: 1rem;      
    font-weight: 700;
    line-height: 1.2;
}

.tema-ejercicios{
    min-width: 65px;
    text-align: center;
    font-size: 1rem;      
    font-weight: bold;
}

.tema-ejercicios small{
    font-size: 0.75rem;
    color: #666;
}

.volver-btn{
    margin-top:25px;
    background:#6c757d;
}

.volver-btn:hover{
    background:#555;
}

/*====================================
      RESPUESTAS DEL JUEGO
====================================*/
.correcta{
    background:#4CAF50 !important;
    color:white !important;
}

.incorrecta{
    background:#F44336 !important;
    color:white !important;
}

/*====================================
        BARRA SUPERIOR
====================================*/
.barra-superior{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap: wrap; 
    gap: 8px;
    margin-bottom:15px;
    font-size:18px;
    font-weight:bold;
}

#tiempo, #puntaje, #vidas{
    min-width:70px;
    text-align:center;
    color:var(--azul-oscuro);
}

/*====================================
        SEPARADOR
====================================*/
.separador{
    height:2px;
    background:#E5E5E5;
    margin:15px 0 20px;
    border-radius:10px;
}

/*====================================
        TÍTULO Y CONTADOR
====================================*/
#tituloTema{
    color:var(--azul-oscuro);
    margin-bottom:10px;
}

#contador{
    color:#666;
    font-size:15px;
    margin-bottom:20px;
}

/*====================================
        PREGUNTA
====================================*/
#pregunta {
    font-size: 1.35rem; 
    color: #222;
    line-height: 1.5;
    margin-bottom: 20px;
    word-break: break-word; 
    width: 100%; 
    padding: 15px 5px; 
    background: #F1F5F9; 
    border-radius: 12px;
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    text-align: center;
}

/*====================================
        OPCIONES DEL JUEGO
====================================*/
.opcion-btn{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:15px;
    width:100%;
    padding:14px 18px;
    min-height: 56px; 
    margin:10px 0;
    border:none;
    border-radius:14px;
    background:#F5F7FA;
    cursor:pointer;
    font-size:18px;
    font-weight:600;
    transition:.25s;
}

.opcion-btn:hover{
    background:#DDEEFF;
    transform:translateY(-2px);
}

.opcion-btn:active:not(:disabled){
    transform:scale(.97);
}

.letra{
    width:35px;
    font-weight:bold;
    color:var(--azul-oscuro);
    flex-shrink: 0;
}

.texto-opcion{
    flex:1;
    text-align:left;
    word-break: break-word; 
}
/*========================== 
        RESPONSIVE MÓVIL 
===========================*/

@media (max-width:480px){

    body{
        padding:10px;
        align-items:flex-start;
        padding-top:15px;
        background-size:cover;
        background-position:center center;
        background-attachment:scroll;
    }

    .container{
        width:100%;
    }

    .card{
        width:100%;
        max-width:360px;
        margin:0 auto;
        padding:24px 16px;
        border-radius:18px;
    }

    /* LOGO */
    .login-logo{
        width:130px;
        max-width:80%;
        height:auto;
    }

    /* TITULOS */
    .login-titulo{
        font-size:1.45rem;
        line-height:1.2;
        margin-top:10px;
    }

    .login-desc{
        font-size:.88rem;
        line-height:1.4;
    }

    .login-bienvenida{
        font-size:.95rem;
        line-height:1.3;
    }

    /* CAMPO DE CÓDIGO */
    .grupo-input{
        width:100%;
    }

    .grupo-input label{
        font-size:.9rem;
    }

    .grupo-input input{
        width:100%;
        box-sizing:border-box;
        font-size:16px;
        padding:14px;
    }

    /* BOTÓN INGRESAR */
    #btn-entrar{
        width:100%;
        font-size:17px;
        padding:14px;
        min-height:50px;
    }

    /* TARJETAS DEL CAMPUS */
    .tarjetas-grid{
        grid-template-columns:1fr 1fr;
        gap:10px;
        margin-top:18px;
    }

    .tarjeta-item{
        min-height:100px;
        padding:12px 8px;
        box-sizing:border-box;
    }

    .tarjeta-icono{
        font-size:1.7rem;
    }

    .tarjeta-nombre{
        font-size:.85rem;
    }

    .tarjeta-texto{
        font-size:.72rem;
        line-height:1.25;
    }

}

/*==========================
       CELULARES PEQUEÑOS
===========================*/

@media (max-width:360px){

    body{
        padding:8px;
        padding-top:10px;
    }

    .card{
        max-width:100%;
        padding:20px 13px;
    }

    .login-logo{
        width:115px;
    }

    .login-titulo{
        font-size:1.3rem;
    }

    .login-desc{
        font-size:.82rem;
    }

    .tarjetas-grid{
        gap:8px;
    }

    .tarjeta-item{
        min-height:95px;
        padding:10px 6px;
    }

    .tarjeta-icono{
        font-size:1.5rem;
    }

    .tarjeta-nombre{
        font-size:.78rem;
    }

    .tarjeta-texto{
        font-size:.68rem;
    }

}

/*==========================
       COMPUTADORA GRANDE
===========================*/

@media (min-width:1200px){

    .card{
        max-width:360px;
    }

}
/*==========================================================
      ESTILOS DE MINIJUEGOS (GUSANITO, MEMORIA, LLUVIA)
==========================================================*/
#mj-area { position: relative; width: 100%; height: 250px; background: #E3F2FD; border: 2px solid #4D8BFF; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.mj-memoria-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px; width: 100%; height: 100%; }
.mj-carta { background-color: var(--azul-medio); border-radius: 8px; display: flex; justify-content: center; align-items: center; font-size: 2rem; cursor: pointer; transition: transform 0.3s; user-select: none; }
.mj-carta.volteada { background-color: white; border: 2px solid var(--azul-claro); transform: rotateY(180deg); }
.mj-carta.emparejada { background-color: var(--verde); border: 2px solid #5B9E14; cursor: default; }
.mj-snake-grid { display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(10, 1fr); width: 200px; height: 200px; background-color: rgba(255,255,255,0.5); border: 1px solid #90CAF9; }
.snake-cell { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; }
.mj-controles-moviles { display: grid; grid-template-columns: 50px 50px 50px; grid-template-rows: 40px 40px; gap: 5px; margin-top: 10px; justify-content: center; }
.mj-btn-dir { background: var(--azul-claro); color: white; border: none; border-radius: 8px; font-size: 1.2rem; cursor: pointer; display: flex; justify-content: center; align-items: center; box-shadow: 0 3px 0 var(--azul-oscuro); }
.mj-btn-dir:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--azul-oscuro); }
.btn-up { grid-column: 2; grid-row: 1; }
.btn-left { grid-column: 1; grid-row: 2; }
.btn-down { grid-column: 2; grid-row: 2; }
.btn-right { grid-column: 3; grid-row: 2; }

/* =========================================================
   MÓDULO: CLASES EN VIVO
   ========================================================= */
.card-clase-vivo { background: #FFFFFF; border-radius: 20px; padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); width: 100%; max-width: 600px; margin: 20px auto; box-sizing: border-box; text-align: center; }
.info-clase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; background: #F8FAFC; padding: 20px; border-radius: 15px; border: 1px solid #E2E8F0; text-align: left; }
.info-item { display: flex; align-items: center; gap: 15px; }
.info-icono { font-size: 1.8rem; background: #FFFFFF; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.info-texto { display: flex; flex-direction: column; }
.info-label { font-size: 0.8rem; color: #64748B; font-weight: 500; text-transform: uppercase; }
.info-texto strong { font-size: 1.05rem; color: #0A2E6D; }
.estado-badge { background: #E2E8F0; padding: 3px 10px; border-radius: 20px; font-size: 0.85rem; color: #1E3A8A; }
.mensaje-estado-clase { margin: 20px 0; padding: 15px; border-radius: 10px; background: #F0F4F8; color: #1E5AA8; font-weight: 600; }
.contador-vivo-container { margin: 30px 0; padding-top: 20px; border-top: 2px dashed #E2E8F0; }
.titulo-contador { color: #64748B; font-weight: 600; margin-bottom: 15px; letter-spacing: 1px; }
.contador-grid { display: flex; justify-content: center; gap: 15px; }
.contador-box { background: #0A2E6D; color: #FFFFFF; width: 70px; height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; box-shadow: 0 8px 15px rgba(10, 46, 109, 0.2); }
.cont-numero { font-size: 1.8rem; font-weight: 700; line-height: 1; margin-bottom: 5px; }
.cont-label { font-size: 0.7rem; text-transform: uppercase; color: #94A3B8; font-weight: 500; }
.acciones-clase { margin-top: 30px; }
.btn-meet { width: 100%; padding: 18px; font-size: 1.1rem; background-color: #34A853; border-color: #34A853; }
.btn-meet:hover { background-color: #2E8B57; transform: translateY(-3px); }
.btn-grabacion { width: 100%; padding: 15px; font-size: 1rem; }
.error-card { text-align: center; padding: 50px 30px; }
.cv-grid-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.cv-tarjeta-mensaje { background: #F1F5F9; border-radius: 12px; padding: 15px; margin-bottom: 20px; text-align: center; border: 1px dashed #CBD5E1; }
.cv-contador-layout { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.cv-caja-tiempo { background: #FFFFFF; border: 2px solid #CBD5E1; border-radius: 12px; padding: 10px 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.cv-caja-tiempo span:first-child { font-size: 1.5rem; font-weight: 700; color: var(--azul-oscuro); line-height: 1; }
.cv-caja-tiempo span:last-child { font-size: 0.7rem; color: #64748B; text-transform: uppercase; margin-top: 5px; font-weight: 600; }
@media (max-width:480px){ .cv-grid-info { grid-template-columns: 1fr; } .cv-caja-tiempo span:first-child { font-size: 1.2rem; } }
.btn-ingresar { justify-content: center !important; text-align: center !important; }
.cv-caja-oscura { background: var(--azul-oscuro, #061E5C); padding: 25px 15px; border-radius: 20px; margin-bottom: 25px; box-shadow: 0 10px 25px rgba(0,0,0,0.15); }
.cv-titulo-contador { color: #FFFFFF !important; font-size: 1.4rem; font-weight: 800; text-align: center; margin-top: 5px; margin-bottom: 20px; letter-spacing: 1px; }
.btn-mega-en-vivo { width: 95% !important; height: 68px !important; margin: 15px auto !important; border-radius: 20px !important; display: flex !important; align-items: center !important; justify-content: center !important; box-shadow: 0 8px 20px rgba(0,0,0,0.12) !important; transition: all 0.3s ease !important; }
.btn-mega-en-vivo .letra { width: 40px !important; height: 40px !important; font-size: 20px !important; margin-right: 15px !important; }
.btn-mega-en-vivo .texto-opcion { font-size: 20px !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; }
.btn-mega-en-vivo.correcta { background-color: #21C021 !important; border-color: #1AA81A !important; box-shadow: 0 10px 25px rgba(33, 192, 33, 0.3) !important; }
.btn-mega-en-vivo.correcta .texto-opcion { color: #FFFFFF !important; }
.btn-mega-en-vivo.correcta .letra { background-color: #FFFFFF !important; color: #21C021 !important; }
.cv-barra-estado { background: #F8FAFC; border: 2px solid #E2E8F0; border-radius: 12px; padding: 12px 15px; margin: 20px auto; width: 95%; text-align: center; }
.cv-barra-estado #pregunta { margin: 0; font-size: 0.9rem !important; font-weight: 500 !important; color: #64748B !important; background: transparent; padding: 0; display: flex; justify-content: center; align-items: center; gap: 8px; }
.cv-barra-estado #iconoEstado { font-size: 1rem; }
@media (max-width: 480px) { .btn-mega-en-vivo { height: 60px !important; width: 100% !important; margin: 10px auto !important; } .btn-mega-en-vivo .texto-opcion { font-size: 16px !important; } .btn-mega-en-vivo .letra { width: 35px !important; height: 35px !important; font-size: 18px !important; margin-right: 10px !important; } .cv-titulo-contador { font-size: 1.15rem; } .cv-caja-oscura { padding: 20px 10px; } .cv-barra-estado { width: 100%; margin: 15px auto; padding: 10px; } .cv-barra-estado #pregunta { font-size: 0.85rem !important; } }

/* ==========================================================
   NUEVO REPORTE VISUAL: PRÁCTICA CALIFICADA
   ========================================================== */
.rc-container { 
    font-family: 'Poppins', sans-serif; 
    text-align: left; 
    padding: 10px;
}
.rc-header { text-align: center; margin-bottom: 15px; }
.rc-title { 
    color: var(--primary); 
    font-size: 1.3rem; 
    font-weight: 800; 
    margin-bottom: 5px; 
}
.rc-subtitle { 
    color: #64748B; 
    font-size: 0.9rem; 
    margin: 3px 0; 
}
.rc-divider { 
    border: 0; 
    height: 1.5px; 
    background: #E2E8F0; 
    margin: 15px 0; 
}

/* Cajas de Niveles */
.rc-nivel { 
    background: #F8FAFC; 
    border: 1px solid #E2E8F0; 
    border-radius: 12px; 
    padding: 12px 15px; 
    margin-bottom: 12px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.rc-nivel-head { 
    font-weight: 700; 
    color: var(--primary); 
    font-size: 1rem; 
    margin-bottom: 8px; 
}
.rc-nivel-stats { 
    display: flex; 
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem; 
    color: #475569; 
    font-weight: 500; 
}

/* Caja de Medalla / Logro */
.rc-medalla-box { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    background: #FFFBEB; 
    border: 2px solid #FDE68A; 
    padding: 15px; 
    border-radius: 12px; 
}
.rc-medalla-icon { 
    font-size: 2.5rem; 
    line-height: 1;
}
.rc-medalla-title { 
    font-weight: 700; 
    color: #B45309; 
    font-size: 1.1rem; 
    margin-bottom: 2px;
}
.rc-medalla-desc { 
    font-size: 0.85rem; 
    color: #D97706; 
    font-weight: 500;
    line-height: 1.3;
}

/* Nota Final */
.rc-nota-box { 
    text-align: center; 
    font-size: 1.1rem; 
    font-weight: 700; 
    color: var(--primary); 
    margin: 20px 0;
}
.rc-nota-box span { 
    font-size: 2.5rem; 
    color: var(--primary); 
    display: block; 
    margin-top: 5px;
    letter-spacing: -1px;
}

/* Botón de Retorno del Reporte */
.rc-btn-volver { 
    background: #E2E8F0; 
    color: var(--primary); 
    padding: 14px; 
    border: 2px solid #CBD5E1; 
    border-radius: 12px; 
    font-size: 1.05rem; 
    font-weight: 700; 
    cursor: pointer; 
    width: 100%; 
    transition: all 0.2s ease; 
    font-family: 'Poppins', sans-serif;
}
.rc-btn-volver:hover { 
    background: #CBD5E1; 
    transform: translateY(-2px);
}