/* public/css/public-styles.css */

.ass-lesson-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ass-lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e5e9;
}

.ass-lesson-header h2 {
    margin: 0;
    color: #1a202c;
    font-size: 2em;
}

.ass-lesson-progress .status-locked {
    background: #fed7d7;
    color: #c53030;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.ass-lesson-progress .status-available {
    background: #bee3f8;
    color: #2b6cb0;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.ass-lesson-progress .status-completed {
    background: #c6f6d5;
    color: #276749;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.ass-lesson-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.ass-pdf-viewer {
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
}

.ass-pdf-viewer iframe {
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ass-lesson-text {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
}

.ass-lesson-locked {
    text-align: center;
    padding: 60px 20px;
    background: #f7fafc;
    border-radius: 8px;
    border: 2px dashed #cbd5e0;
}

.ass-lock-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.ass-lesson-locked h3 {
    color: #4a5568;
    margin-bottom: 15px;
}

.ass-lesson-locked ul {
    text-align: left;
    max-width: 300px;
    margin: 20px auto;
}

.ass-lesson-actions {
    text-align: center;
    padding: 30px;
    background: #f7fafc;
    border-radius: 8px;
    grid-column: 1 / -1;
}

.ass-lesson-completed {
    background: #c6f6d5;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    grid-column: 1 / -1;
}

/* Botones */
.ass-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.ass-btn-primary {
    background: #3182ce;
    color: white;
}

.ass-btn-primary:hover {
    background: #2c5aa0;
    transform: translateY(-1px);
}

.ass-btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.ass-btn-secondary:hover {
    background: #cbd5e0;
}

/* Modal */
.ass-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.ass-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.ass-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
    background: #f7fafc;
    border-radius: 8px 8px 0 0;
}

.ass-modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #a0aec0;
}

.ass-modal-close:hover {
    color: #4a5568;
}

/* Test Interface */
.ass-test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #edf2f7;
    margin: -20px -30px 30px -30px;
}

.ass-test-timer {
    font-size: 1.2em;
    font-weight: bold;
    color: #e53e3e;
}

.ass-test-questions {
    padding: 0 30px;
}

.ass-question {
    margin-bottom: 30px;
    padding: 25px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #3182ce;
}

.ass-question h4 {
    margin: 0 0 15px 0;
    color: #2d3748;
}

.ass-options {
    margin-top: 15px;
}

.ass-option {
    display: block;
    margin: 10px 0;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.ass-option:hover {
    border-color: #3182ce;
    background: #ebf8ff;
}

.ass-option input[type="radio"] {
    margin-right: 10px;
}

.ass-test-actions {
    padding: 30px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    background: #f7fafc;
}

.ass-test-actions .ass-btn {
    margin: 0 10px;
}

/* Resultados del Test */
.ass-test-results {
    padding: 30px;
}

.score-summary {
    text-align: center;
    margin-bottom: 30px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
        display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2em;
    font-weight: bold;
    color: white;
}

.score-circle.passed {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.score-circle.failed {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.score-message {
    font-size: 1.1em;
    margin: 15px 0;
}

.recommendations {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.recommendations h4 {
    color: #c53030;
    margin-top: 0;
}

.detailed-results {
    margin: 30px 0;
}

.question-result {
    margin: 15px 0;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid;
}

.question-result.correct {
    background: #f0fff4;
    border-left-color: #48bb78;
}

.question-result.incorrect {
    background: #fff5f5;
    border-left-color: #f56565;
}

.test-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}
/* Estilos para resultados detallados */
.detailed-results {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.results-toggle {
    margin-bottom: 15px;
}

.question-result {
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #ddd;
}

.question-result.correct {
    background-color: #f0f8f0;
    border-left-color: #28a745;
}

.question-result.incorrect {
    background-color: #fdf2f2;
    border-left-color: #dc3545;
}

.question-text {
    font-weight: bold;
    margin-bottom: 10px;
}

.answer-comparison {
    margin-top: 10px;
}

.user-answer span.correct {
    color: #28a745;
    font-weight: bold;
}

.user-answer span.incorrect {
    color: #dc3545;
    font-weight: bold;
}

.correct-answer span.correct {
    color: #28a745;
    font-weight: bold;
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    font-weight: bold;
}

.score-circle.passed {
    background-color: #28a745;
    color: white;
}

.score-circle.failed {
    background-color: #dc3545;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .ass-lesson-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ass-modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .ass-lesson-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* ========================================
   TESTS DE EVALUACIÓN
   ======================================== */

.ass-test-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.ass-test-header {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.ass-test-header h2 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.test-info {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.attempt-badge {
    background: #3498db;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.questions-count {
    background: #95a5a6;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.test-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-top: 15px;
    border-radius: 5px;
    font-weight: 600;
    color: #856404;
}

/* Preguntas */
.test-question {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.question-title {
    color: #2c3e50;
    font-size: 18px;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-label:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.option-label input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option-label input[type="radio"]:checked + .option-text {
    font-weight: 600;
    color: #3498db;
}

.option-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
}

/* Acciones del test */
.test-actions {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.test-actions button {
    font-size: 18px;
    padding: 15px 40px;
}

/* Loading overlay */
.test-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.test-loading-overlay p {
    color: white;
    font-size: 18px;
    margin-top: 20px;
}

/* Resultados */
.test-result {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.test-result h2 {
    margin: 0 0 30px 0;
    color: #2c3e50;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
}

.test-result.success .stat-value {
    color: #27ae60;
}

.test-result.failed .stat-value {
    color: #e74c3c;
}

.attempts-left {
    color: #f39c12 !important;
}

.result-message {
    font-size: 18px;
    color: #7f8c8d;
    margin: 20px 0;
}

.expulsion-notice {
    background: #fee;
    border-left: 4px solid #e74c3c;
    padding: 15px;
    margin: 20px 0;
    color: #c0392b;
    font-weight: 600;
}

.result-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .test-info {
        flex-direction: column;
    }
    
    .result-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions .button {
        width: 100%;
    }
}
/* ====================================
   🎨 ESTILOS DEL EXAMEN - ASS v5.1
   ==================================== */

/* Contenedor principal del examen */
.ass-exam-container,
#ass-test-container {
    max-width: 900px;
    margin: 30px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Indicador de progreso */
.progress-indicator {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Contenedor de cada pregunta */
.question-container {
    padding: 30px;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s;
}

.question-container:hover {
    background: #f8f9fa;
}

.question-container:last-child {
    border-bottom: none;
}

/* Encabezado de pregunta */
.question-header {
    margin-bottom: 15px;
}

.question-number {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Texto de la pregunta */
.question-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

/* Contenedor de opciones */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

/* Cada opción */
.option-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateX(4px);
}

/* Radio button oculto */
.option-radio {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Estilo del radio button personalizado */
.option-text {
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    font-size: 1rem;
    color: #495057;
    line-height: 1.5;
    margin: 0;
    width: 100%;
}

.option-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 2px solid #ced4da;
    border-radius: 50%;
    background: white;
    transition: all 0.2s;
}

.option-text::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #007bff;
    transition: transform 0.2s;
}

/* Opción seleccionada */
.option-radio:checked ~ .option-text::before {
    border-color: #007bff;
    background: white;
}

.option-radio:checked ~ .option-text::after {
    transform: translateY(-50%) scale(1);
}

.option-item:has(.option-radio:checked) {
    background: #e7f3ff;
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.15);
}

/* Controles del examen */
.exam-controls {
    padding: 30px;
    background: #f8f9fa;
    text-align: center;
    border-top: 2px solid #dee2e6;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 14px 32px;
    margin: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108,117,125,0.3);
}

/* Resultados del examen */
.ass-exam-results {
    max-width: 700px;
    margin: 30px auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .ass-exam-container,
    #ass-test-container {
        margin: 15px;
        border-radius: 8px;
    }
    
    .question-container {
        padding: 20px 15px;
    }
    
    .question-text {
        font-size: 1rem;
        padding: 12px;
    }
    
    .option-item {
        padding: 12px 15px;
    }
    
    .btn {
        display: block;
        width: 100%;
        margin: 8px 0;
    }
    
    .exam-controls {
        padding: 20px 15px;
    }
}
