/* =========================================
   IA EXPERIENCE - QUIZ COMPONENT STYLES
   ========================================= */

/* Contenedor principal que centra el contenido */
.quiz-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at center, #c5bbee 0%, #f7f8fa 100%);
}


/* La tarjeta con efecto cristal (Glassmorphism) */
.quiz-card {
   background: rgba(255, 255, 255, 0.55); 
    
    /* El desenfoque es lo que crea la densidad del cristal */
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    
    /* Borde brillante: simula la luz pegando en el canto del cristal */
    border: 1px solid rgba(255, 255, 255, 0.5);
    
    /* Sombra exterior para profundidad + Sombra interior para brillo */
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.7); 

    border-radius: 40px;
    padding: 60px;
    max-width: 680px;
    width: 100%;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 40px 0 rgba(39, 23, 220, 0.2),
        0 50px 120px -20px rgba(39, 23, 220, 0.3);
}


/* Header: Logo y Progreso */
.quiz-logo {
    height: 22px;
    width: auto;
    margin-bottom: 30px;
    display: block;
}

.progress-bar {
    height: 6px;
    background: rgba(39, 23, 220, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%; /* Se controla por JS */
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-info {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 40px;
}

/* Tipografía de la Pregunta (Interphases) */
.gradient-title {
    font-family: var(--font-title);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    line-height: 1.15;
    margin-bottom: 35px;
    min-height: 3.5em; /* Evita saltos de layout al cambiar texto */
}

/* Botones de Respuesta (Modelica) */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
   width: 100%;
    padding: 18px 25px;
    /* Fondo casi igual a la tarjeta para reducir el contraste */
    background: rgba(255, 255, 255, 0.5); 
    border: 1px solid rgba(39, 23, 220, 0.08); /* Borde muy suave */
    border-radius: 20px;
    cursor: pointer;
    text-align: left;
    
    font-family: var(--font-body);
    font-weight: 700; 
    font-size: 1.05rem;
    color: var(--text-main);
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.option-btn i {
    color: var(--primary);
    font-size: 1.2rem;
    opacity: 0.3;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.option-btn:hover {
    background: #ffffff; 
    border-color: var(--primary);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(39, 23, 220, 0.05);
}

.option-btn:hover i {
    opacity: 1;
    transform: translateX(5px);
}

/* Pantalla Final */
#final-screen {
    text-align: center; /* Centrar todo el contenido */
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(39, 23, 220, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.success-icon i {
    font-size: 3rem;
    color: var(--primary);
}

#final-screen .gradient-title {
    text-align: center;
    margin-bottom: 25px;
}

.final-message {
    font-family: var(--font-body);
    font-weight: 400; /* Modelica Regular */
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

/* Utilidades */
.hidden { display: none !important; }

/* =========================================
   ESTILOS PANTALLA DE REGISTRO (EMAIL)
   ========================================= */

/* Contenedor del input y el botón */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 480px;
    margin: 0 auto;
}

/* Estilo para el campo de entrada de Email */
input#studentEmailInput.option-btn {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(39, 23, 220, 0.1);
    color: var(--text-main);
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estado cuando el alumno hace clic para escribir */
input#studentEmailInput.option-btn:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(39, 23, 220, 0.05);
    transform: translateY(-2px);
    outline: none;
}

/* Color del texto de ayuda (placeholder) */
input#studentEmailInput.option-btn::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Estilo para el botón de "Comenzar" (Botón Primario) */
#startQuizBtn {
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    justify-content: center; /* Centra el texto y el icono */
    border: none;
    box-shadow: 0 10px 20px rgba(39, 23, 220, 0.2);
}

#startQuizBtn i {
    color: #ffffff; /* Icono en blanco */
    opacity: 1;
    margin-left: 10px;
}

#startQuizBtn:hover {
    background: #1e11b5; /* Un tono más oscuro del primario */
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(39, 23, 220, 0.3);
}

/* Ajuste para que el texto de bienvenida no baile */
#email-screen .final-message {
    text-align: left;
    margin-bottom: 30px;
    font-size: 1rem;
}

/* =========================================
   RESPONSIVE DESIGN (MÓVILES Y TABLETS)
   ========================================= */

/* Tablets y pantallas medianas */
@media (max-width: 768px) {
    .quiz-card {
        padding: 40px; /* Reducimos espacio interno */
        border-radius: 30px;
    }

    .gradient-title {
        font-size: 1.6rem; /* Título un poco más contenido */
    }
}

/* Smartphones pequeños (iPhone SE, etc.) */
@media (max-width: 480px) {
    .quiz-wrapper {
        padding: 10px; /* Menos margen exterior */
    }

    .quiz-card {
        padding: 25px 20px; /* Padding mínimo para aprovechar el ancho */
        border-radius: 20px;
    }

    .quiz-logo {
        height: 18px; /* Logo más discreto */
        margin-bottom: 20px;
    }

    .step-info {
        margin-bottom: 25px;
    }

    .gradient-title {
        font-size: 1.35rem; /* Título legible pero compacto */
        line-height: 1.2;
        margin-bottom: 25px;
        min-height: auto; /* Quitamos el min-height para que no sobre espacio */
    }

    .option-btn {
        padding: 14px 18px; /* Botones más finos */
        font-size: 0.95rem;
    }

    .input-group {
        width: 100%;
    }

    #final-screen {
        padding: 20px 10px;
    }

    .success-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }

    .success-icon i {
        font-size: 2.2rem;
    }
}

/* =========================================
   RESPONSIVE DESIGN (ALTURA LIMITADA / LAPTOPS)
   ========================================= */

/* Aplica solo en pantallas de escritorio que no sean muy altas */
@media (min-width: 769px) and (max-height: 850px) {
    .quiz-wrapper {
        /* Reduce el padding exterior para dar más espacio a la tarjeta */
        padding: 10px; 
        align-items: center; /* Asegura centrado vertical */
    }

    .quiz-card {
        /* Reducimos drásticamente el padding vertical (de 60px a 30px) */
        padding: 30px 50px; 
        /* Un poco menos redondeada para ganar espacio en las esquinas */
        border-radius: 30px; 
    }

    .quiz-logo {
        margin-bottom: 15px; /* Menos aire bajo el logo */
        height: 20px;
    }

    .step-info {
        /* Acercamos el indicador "Pregunta X de Y" */
        margin-bottom: 20px; 
    }

    .gradient-title {
        /* Título un poco más pequeño y pegado a los botones */
        font-size: 1.7rem; 
        margin-bottom: 25px;
        min-height: auto; /* Quitamos la altura mínima reservada */
    }

    .option-btn {
        /* Botones más finos verticalmente */
        padding: 12px 20px; 
    }
    
    /* Ajuste específico para la pantalla de bienvenida */
    #email-screen .final-message {
        margin-bottom: 20px !important;
    }
}