/* ==============================================
   EXAM PUBLIC STYLES - Estilos centralizados para exámenes públicos
   ============================================== */

/* Variables CSS globales */
:root {
    --primary-color: #6C5CE7;
    --secondary-color: #A8E6CF;
    --accent-color: #FF6B6B;
    --dark-color: #2D3436;
    --light-color: #DDD6FE;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-danger: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Tamaño base */
html {
    font-size: 16px; /* 1rem = 16px */
}

/* Para resoluciones más pequeñas */
@media (max-width: 1366px) {
    html {
        font-size: 14px; /* 1rem = 14px - todo se hace más pequeño */
    }
}

@media (max-width: 1024px) {
    html {
        font-size: 13px; /* 1rem = 13px - aún más pequeño */
    }
}

/* Mantener tamaño normal en móviles */
@media (max-width: 768px) {
    html {
        font-size: 16px; /* Volver al tamaño base en móvil */
    }
}

/* ==============================================
   INTERFAZ GENERAL DEL EXAMEN
   ============================================== */
.exam-interface {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 1rem 0;
    margin-top: 100px;
}

/* ==============================================
   SIDEBAR DEL EXAMEN
   ============================================== */
.exam-sidebar {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    overflow: hidden;
}

.exam-sidebar-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
    text-align: center;
}

.exam-sidebar-body {
    padding: 1.5rem;
}

/* ==============================================
   INFORMACIÓN DEL PARTICIPANTE
   ============================================== */


.participant-avatar {
    width: 25px;
    height: 25px;
    margin-right: 15px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.participant-name {
    font-weight: 600;
    color: var(--dark-color);
}

/* ==============================================
   ESTADÍSTICAS DEL EXAMEN
   ============================================== */
.exam-stats {
    margin-bottom: 1.5rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.stat-item {
    flex: 1;
    text-align: center;
}

/* Badges */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
}

.badge-info {
    background: var(--gradient-info);
    color: white;
}

.badge-secondary {
    background: var(--gradient-primary);
    color: white;
}

.badge-success {
    background: var(--gradient-success);
    color: white;
}

.badge-warning {
    background: var(--gradient-warning);
    color: white;
}

.badge-danger {
    background: var(--gradient-danger);
    color: white;
}

/* ==============================================
   TIMER DEL EXAMEN
   ============================================== */
.exam-timer {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.timer-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.timer-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.timer-progress {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.timer-bar {
    height: 100%;
    background: var(--gradient-secondary);
    border-radius: 3px;
    transition: width 1s ease;
}

/* ==============================================
   NAVEGACIÓN DEL EXAMEN
   ============================================== */
.exam-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.btn-nav-prev, .btn-nav-next {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid #ddd;
    background: white;
    color: var(--dark-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-nav-prev:hover:not(:disabled), .btn-nav-next:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-nav-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Navegación móvil */
.mobile-navigation {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

.btn-mobile-nav-prev, .btn-mobile-nav-next {
    padding: 0.8rem 1rem;
    border: 2px solid #ddd;
    background: white;
    color: var(--dark-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-mobile-nav-prev:hover:not(:disabled), .btn-mobile-nav-next:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-mobile-nav-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-mobile-nav-prev:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ==============================================
   MAPA DE PREGUNTAS
   ============================================== */
.question-map {
    margin-bottom: 1.5rem;
}

.map-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--dark-color);
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
}

.question-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #ddd;
    background: white;
    color: #666;
}

.question-dot.answered {
    background: var(--gradient-info);
    color: white;
    border-color: transparent;
}

.question-dot.current {
    background: var(--gradient-secondary);
    color: white;
    border-color: transparent;
    transform: scale(1.1);
}

/* ==============================================
   BOTÓN FINALIZAR
   ============================================== */
.finish-section {
    text-align: center;
}

.btn-finish {
    background: var(--gradient-secondary);
    border: none;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-finish:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
    color: white;
}

/* ==============================================
   CONTENIDO PRINCIPAL DEL EXAMEN
   ============================================== */
.exam-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.exam-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
}

.exam-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.exam-subtitle {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* ==============================================
   CONTENEDOR DE PREGUNTAS
   ============================================== */
.question-container {
    padding: 2rem;
}

.question-number {
    background: #f8f9fa;
    color: var(--primary-color);
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.question-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    min-height: 100px;
}

.loading-spinner {
    color: var(--primary-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==============================================
   OPCIONES DE RESPUESTA
   ============================================== */
.answers-container {
    /* Se estilizará dinámicamente */
}

.answer-option {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.answer-option:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.answer-option.selected {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}





/* ==============================================
   MODAL DEL EXAMEN
   ============================================== */
.exam-modal .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.finish-stats {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.finish-stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.2rem;
}

/* ==============================================
   SECCIÓN DE RESULTADOS
   ============================================== */
.results-section {
    background: var(--gradient-primary);
    min-height: 100vh;
    padding: 2rem 0;
    color: white;
}

.results-header {
    text-align: center;
    margin-bottom: 3rem;
}

.results-summary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 3rem;
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ==============================================
   CÍRCULO DE PUNTUACIÓN
   ============================================== */
.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}

.score-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.score-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.score-progress {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

/* ==============================================
   INFORMACIÓN DE RESULTADOS
   ============================================== */
.results-info {
    flex: 1;
    text-align: left;
    min-width: 300px;
}

.results-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.performance-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.results-message {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.participant-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    margin-bottom: 30px;
}

/* ==============================================
   TARJETAS DE ESTADÍSTICAS
   ============================================== */
.results-stats {
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 0.75rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.stat-correct .stat-icon {
    background: var(--gradient-success);
}

.stat-incorrect .stat-icon {
    background: var(--gradient-danger);
}

.stat-unanswered .stat-icon {
    background: var(--gradient-warning);
}

.stat-time .stat-icon {
    background: var(--gradient-primary);
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    color: #666;
    font-weight: 500;
}

/* ==============================================
   SECCIONES ADICIONALES
   ============================================== */
.course-analysis, .recommendations, .results-actions, .share-results {
    margin-bottom: 3rem;
}

.topic-analysis, .question-review {
    margin-bottom: 3rem;
}

.course-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    color: var(--dark-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.course-name {
    font-weight: 600;
    margin: 0;
}

.course-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.course-progress {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ==============================================
   RESPONSIVIDAD
   ============================================== */
@media (max-width: 768px) {
    .exam-interface {
        padding: 0.5rem 0;
    }
    
    .exam-sidebar {
        position: relative;
        margin-bottom: 1rem;
    }
    
    .question-container {
        padding: 1.5rem;
    }
    
    .question-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .exam-navigation {
        flex-direction: column;
        display: none; /* Ocultar en móvil */
    }
    
    .results-summary {
        padding: 2rem;
        gap: 2rem;
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
    }
    
    .score-value {
        font-size: 2.5rem;
    }
    
    .results-title {
        font-size: 2rem;
    }
    
    .results-info {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .stat-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-nav-prev, .btn-nav-next {
        padding: 0.8rem;
        font-size: 0.8rem;
    }
    
    .question-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==============================================
   RESPONSIVE NAVIGATION - ESCONDER NAVEGACIÓN ORIGINAL EN MÓVIL
   ============================================== */
@media (max-width: 767.98px) {
    .exam-navigation {
        display: none;
    }
}

/* ==============================================
   UTILIDADES ADICIONALES
   ============================================== */
.text-gradient-primary {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-secondary {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

.bg-gradient-success {
    background: var(--gradient-success);
}

.bg-gradient-danger {
    background: var(--gradient-danger);
}

.bg-gradient-warning {
    background: var(--gradient-warning);
}

.bg-gradient-info {
    background: var(--gradient-info);
}

/* 
.answer-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
    position: relative;
    flex-shrink: 0;
}

.answer-option.selected .answer-radio {
    border-color: white;
    background: white;
} */

/* Estilos específicos para show-public que no están en el archivo centralizado */
.answer-radio {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
    color: #667eea;
    background: white;
    line-height: 1; /* evita que el texto se desplace raro */
}

.answer-option.selected .answer-radio {
    background: #667eea;
    color: white;
}

input[type="radio"] {
    appearance: none;
    -webkit-appearance: none; /* Safari/Chrome */
    -moz-appearance: none;    /* Firefox */
    background: transparent;
    border: none;
    outline: none;
    margin: 0;
    padding: 0;
    width: 0;
    height: 0;
    position: absolute; /* oculta el input */
}