/**
 * Estilos para las tarjetas de competencias
 * Sistema de Evaluación de Competencias CGR
 */

.competencias-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.competencia-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 5px solid #2196F3;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.competencia-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(33, 150, 243, 0.2);
}

.competencia-card.seleccionada {
    border-color: #4CAF50;
    background-color: #f0fff0;
}

.competencia-header {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.competencia-nombre {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin: 0 0 5px 0;
}

.competencia-definicion {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

.competencia-niveles {
    background: #f5f8ff;
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
}

.nivel-competencia {
    font-size: 0.85rem;
    margin-bottom: 8px;
    padding-left: 10px;
    border-left: 3px solid transparent;
}

.nivel-basico {
    border-color: #FFEB3B;
}

.nivel-intermedio {
    border-color: #FF9800;
}

.nivel-avanzado {
    border-color: #4CAF50;
}

.nivel-titulo {
    font-weight: bold;
    color: #555;
    margin-bottom: 3px;
}

.nivel-descripcion {
    font-size: 0.8rem;
    color: #777;
}

.seleccionar-btn {
    background: transparent;
    border: 2px solid #2196F3;
    color: #2196F3;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.2s ease;
    align-self: center;
}

.seleccionar-btn:hover {
    background: #2196F3;
    color: white;
}

.competencia-card.seleccionada .seleccionar-btn {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.competencia-icon {
    font-size: 1.5rem;
    color: #2196F3;
    margin-left: 10px;
}

.competencia-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    background: #e0e0e0;
    color: #555;
    margin-right: 5px;
}

.badge-institucional {
    background: #E3F2FD;
    color: #0D47A1;
}

.badge-nivel {
    background: #FFF8E1;
    color: #FF6F00;
}

.progress-indicators {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.progress-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30%;
}

.progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
}

.progress-label {
    font-size: 0.7rem;
    text-align: center;
    color: #888;
}

.progress-high {
    background: #E8F5E9;
    color: #2E7D32;
}

.progress-medium {
    background: #FFF8E1;
    color: #FF8F00;
}

.progress-low {
    background: #FFEBEE;
    color: #C62828;
}

.selection-info {
    background: #E3F2FD;
    color: #0D47A1;
    text-align: center;
    padding: 10px;
    margin: 20px 0;
    border-radius: 8px;
    font-weight: bold;
}

/* Estilos para visualización de tracking y análisis */
.tracking-graficas-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.tracking-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.tracking-table th,
.tracking-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.tracking-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.tracking-table tr:hover {
    background-color: #f9f9f9;
}

.recomendaciones-container {
    background: #f5f9ff;
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
    border-left: 4px solid #2196F3;
}

.recomendaciones-container h4 {
    color: #2196F3;
    margin-bottom: 10px;
}

.recomendaciones-container ul {
    padding-left: 20px;
}

.recomendaciones-container li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.analisis-tendencias {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.analisis-tendencias h4 {
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.analisis-tendencias h5 {
    margin: 15px 0 10px;
    color: #555;
}

.analisis-tendencias ul {
    list-style: none;
    padding: 0;
}

.analisis-tendencias li {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.analisis-tendencias li:last-child {
    border-bottom: none;
}

.cambio-positivo {
    color: #4CAF50;
    font-weight: 600;
}

.cambio-negativo {
    color: #F44336;
    font-weight: 600;
}

.btn-detalle {
    background: #e0e0e0;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.btn-detalle:hover {
    background: #d0d0d0;
}

/* Estilos para los contenedores de tracking */
#competenciaTrackingDetail,
#competenciasTrackingResumen {
    margin-top: 30px;
}

/* Spinner de carga */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #2196F3;
    animation: spin 1s ease infinite;
}

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

/* Spinner de carga para tracking */
.tracking-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    flex-direction: column;
}

.tracking-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #2196F3;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

/* Estilos para cuestionario interactivo */
.question-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 30px;
    border-top: 4px solid #2196F3;
}

.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.question-number {
    color: #2196F3;
    font-weight: bold;
    margin-right: 10px;
}

.question-title {
    color: #333;
    margin: 0;
    font-size: 1.1rem;
}

/* Estilos para opciones */
.option, .option-label {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
    position: relative;
}

.option:hover, .option-label:hover {
    background-color: #f5f5f5;
    border-color: #2196F3;
}

.option.selected, .option-label.selected {
    background-color: #e3f2fd;
    border-color: #2196F3;
    color: #1976D2;
}

.option.correct {
    background-color: #e8f5e9;
    border-color: #4CAF50;
    color: #2e7d32;
}

.option.incorrect {
    background-color: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

/* Estilos para radio buttons personalizados */
input[type="radio"] {
    margin-right: 10px;
    accent-color: #2196F3;
}

label {
    cursor: pointer;
    display: block;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

label:hover {
    background-color: #f5f5f5;
}

/* Estilos para explicaciones */
.explanation, .explanation-box {
    background-color: #fffde7;
    border-left: 4px solid #fbc02d;
    padding: 15px;
    margin-top: 15px;
    border-radius: 0 6px 6px 0;
    display: block;
}

.explanation h4, .explanation-box h5 {
    color: #f57c00;
    margin-bottom: 10px;
    font-size: 1rem;
}

/* Estilos para resultados */
.results-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.score {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.score-details p {
    margin: 5px 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.progress-container {
    margin-top: 20px;
}

.progress-bar {
    background-color: rgba(255,255,255,0.2);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress {
    background-color: #4CAF50;
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Estilos para competencias evaluadas */
.competencias-evaluadas {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.competencias-evaluadas h3 {
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #2196F3;
    padding-bottom: 10px;
}

.competencias-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.competencia-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.competencia-item i {
    color: #4CAF50;
    font-size: 1.5rem;
}

.competencia-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1rem;
}

.competencia-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Estilos para resultados detallados */
.detailed-results {
    margin-top: 30px;
}

.detailed-results h3 {
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #2196F3;
    padding-bottom: 10px;
}

.questions-review {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question-result {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 5px solid #ddd;
}

.question-result.correct {
    border-left-color: #4CAF50;
    background-color: #f1f8e9;
}

.question-result.incorrect {
    border-left-color: #f44336;
    background-color: #ffebee;
}

.question-result .question-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.question-result .question-header h4 {
    margin: 0;
    flex: 1;
    color: #333;
}

.status-icon {
    font-size: 1.2rem;
}

.question-result.correct .status-icon {
    color: #4CAF50;
}

.question-result.incorrect .status-icon {
    color: #f44336;
}

.answer-details {
    margin-bottom: 15px;
}

.answer-details p {
    margin: 5px 0;
    color: #555;
}

/* Estilos para acciones de resultados */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Estilos para notificaciones */
.notification {
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-weight: 500;
    max-width: 300px;
}

/* Estilos para preguntas generadas por IA */
.ai-generated-questions {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.questions-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.questions-header h3 {
    color: #333;
    margin: 0;
    font-size: 1.5rem;
}

.questions-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* =======================================
   ESTILOS PARA FUNCIONALIDAD INTERACTIVA
   ======================================= */

/* Barra de progreso del cuestionario */
.questionnaire-progress {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.questionnaire-progress .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.questionnaire-progress h4 {
    margin: 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

.questionnaire-progress #progress-text {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.progress-bar-container {
    background: #e9ecef;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #48ca48 0%, #4CAF50 100%);
    border-radius: 10px;
    transition: width 0.4s ease, background-color 0.3s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percentage {
    text-align: center;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

/* Efectos para opciones de respuesta */
.option, .answer-option, .choice, .clickable-option {
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 8px 0;
    border: 2px solid #e9ecef;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.option:hover, .answer-option:hover, .choice:hover, .clickable-option:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
    transform: translateX(3px);
}

.option.selected, .answer-option.selected, .choice.selected, .clickable-option.selected {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #007bff;
    transform: translateX(5px);
    box-shadow: 0 6px 16px rgba(0,123,255,0.25);
}

.option.selected::after, .answer-option.selected::after, 
.choice.selected::after, .clickable-option.selected::after {
    content: '✓';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Modal de confirmación de envío */
.submit-confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.submit-confirmation-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    animation: modalAppear 0.3s ease forwards;
}

@keyframes modalAppear {
    to {
        transform: scale(1);
    }
}

.submit-confirmation-content h3 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.submit-stats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border-left: 4px solid #007bff;
}

.submit-stats p {
    margin: 8px 0;
    color: #495057;
}

.submit-stats strong {
    color: #007bff;
}

/* Resultados mejorados */
.results-summary-enhanced {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.results-summary-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
}

.results-summary-enhanced.excellent::before {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.results-summary-enhanced.good::before {
    background: linear-gradient(90deg, #007bff, #17a2b8);
}

.results-summary-enhanced.needs-improvement::before {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.performance-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0;
    animation: iconBounce 0.6s ease 0.3s forwards;
}

@keyframes iconBounce {
    0% { opacity: 0; transform: scale(0.3); }
    50% { transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.results-summary-enhanced.excellent .performance-icon {
    color: #28a745;
}

.results-summary-enhanced.good .performance-icon {
    color: #007bff;
}

.results-summary-enhanced.needs-improvement .performance-icon {
    color: #ffc107;
}

.score-display {
    margin-bottom: 30px;
}

.score-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 10px;
    opacity: 0;
    animation: scoreCount 1.5s ease 0.6s forwards;
}

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

.performance-message {
    font-size: 1.3rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 10px;
}

.score-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.detail-item {
    text-align: center;
    padding: 15px;
    background: rgba(255,255,255,0.8);
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transform: translateY(20px);
    opacity: 0;
    animation: detailFadeIn 0.5s ease forwards;
}

.detail-item:nth-child(1) { animation-delay: 0.8s; }
.detail-item:nth-child(2) { animation-delay: 0.9s; }
.detail-item:nth-child(3) { animation-delay: 1.0s; }
.detail-item:nth-child(4) { animation-delay: 1.1s; }

@keyframes detailFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-label {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.detail-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #495057;
}

/* Análisis de competencias por pregunta */
.competency-analysis {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-left: 4px solid #007bff;
}

.competency-analysis h4 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.question-analysis {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid #e9ecef;
}

.question-text {
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
    line-height: 1.5;
}

.answer-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 15px 0;
}

.user-answer, .correct-answer {
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.user-answer {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
}

.user-answer.correct {
    background: #d4edda;
    border-left: 3px solid #28a745;
}

.user-answer.incorrect {
    background: #f8d7da;
    border-left: 3px solid #dc3545;
}

.correct-answer {
    background: #d4edda;
    border-left: 3px solid #28a745;
}

.explanation-toggle {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    padding: 0;
    margin-top: 10px;
}

.explanation-toggle:hover {
    color: #0056b3;
}

.explanation-content {
    background: #e7f3ff;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    display: none;
    animation: slideDown 0.3s ease;
}

.explanation-content.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
        padding-top: 15px;
        padding-bottom: 15px;
    }
}

/* Recomendaciones personalizadas */
.recommendations-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
}

.recommendations-section h4 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.recommendation-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    border-left: 4px solid #007bff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.recommendation-item.strong {
    border-left-color: #28a745;
}

.recommendation-item.improvement {
    border-left-color: #ffc107;
}

.recommendation-item.critical {
    border-left-color: #dc3545;
}

.recommendation-item i {
    font-size: 1.2rem;
    margin-top: 2px;
    min-width: 20px;
}

.recommendation-item.strong i {
    color: #28a745;
}

.recommendation-item.improvement i {
    color: #ffc107;
}

.recommendation-item.critical i {
    color: #dc3545;
}

.recommendation-item p {
    margin: 0;
    color: #555;
    line-height: 1.5;
    flex: 1;
}

/* Acciones de resultados */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.results-actions .btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-actions .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.results-actions .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.results-actions .btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%);
    color: white;
}

.results-actions .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: white;
}

.results-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Animaciones de entrada de resultados */
.results-animated {
    animation: resultsEntrance 0.8s ease;
}

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

/* Botón de envío deshabilitado */
.btn.disabled {
    background: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .questionnaire-progress .progress-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .score-details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .answer-comparison {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .results-actions .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .score-number {
        font-size: 2.5rem;
    }
    
    .submit-confirmation-content {
        margin: 20px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .detail-item {
        padding: 10px;
    }
    
    .detail-value {
        font-size: 1.1rem;
    }
    
    .performance-icon {
        font-size: 2.5rem;
    }
}

/* ===== ESTILOS DE ESTADÍSTICAS DE RESULTADOS ===== */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
}

.stat-item {
    background: white;
    padding: 25px 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.stat-item i {
    font-size: 2rem;
    color: #6c757d;
    margin-bottom: 10px;
    display: block;
}

.stat-item h4 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 10px 0 5px;
}

.stat-item p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Clases de rendimiento para estadísticas */
.stat-item.excellent i,
.stat-item.excellent h4 {
    color: #28a745;
}

.stat-item.good i,
.stat-item.good h4 {
    color: #17a2b8;
}

.stat-item.average i,
.stat-item.average h4 {
    color: #ffc107;
}

.stat-item.low i,
.stat-item.low h4 {
    color: #dc3545;
}

/* Responsive para estadísticas */
@media (max-width: 768px) {
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    
    .stat-item h4 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .stats-summary {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 15px;
    }
    
    .stat-item {
        padding: 15px 10px;
    }
    
    .stat-item h4 {
        font-size: 1.5rem;
    }
    
    .stat-item i {
        font-size: 1.5rem;
    }
}

/* ===== SECCIÓN DE REVISIÓN DETALLADA DE RESPUESTAS ===== */
.detailed-review {
    background: #ffffff;
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.detailed-review h3 {
    color: #1a237e;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detailed-review h3 i {
    color: #3f51b5;
}

.review-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.review-controls .btn-outline {
    background: transparent;
    border: 2px solid #3f51b5;
    color: #3f51b5;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-controls .btn-outline:hover {
    background: #3f51b5;
    color: white;
}

.answers-review-container {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.answers-review-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.answers-review-summary h4 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.review-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.review-stats .stat-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-stats .stat-item.correct {
    background: rgba(76, 175, 80, 0.3);
}

.review-stats .stat-item.incorrect {
    background: rgba(244, 67, 54, 0.3);
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Scrollbar personalizado para la revisión */
.answers-review-container::-webkit-scrollbar {
    width: 8px;
}

.answers-review-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.answers-review-container::-webkit-scrollbar-thumb {
    background: #c5cae9;
    border-radius: 4px;
}

.answers-review-container::-webkit-scrollbar-thumb:hover {
    background: #7986cb;
}

/* Responsive para revisión detallada */
@media (max-width: 768px) {
    .detailed-review {
        padding: 15px;
    }
    
    .review-controls {
        flex-direction: column;
    }
    
    .review-controls .btn-outline {
        width: 100%;
        justify-content: center;
    }
    
    .review-stats {
        flex-direction: column;
        gap: 10px;
    }
}
