/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Paleta de Colores Principal */
    --primary-color: #3da3a5;        /* Verde azulado - Color predominante */
    --secondary-color: #8487e1;      /* Amarillo mostaza - Complementario dividido 2 */
    --accent-color: #da865b;         /* Coral/rojo suave - Complementario dividido 1 */
    --danger-color: #da865b;         /* Coral para errores */
    --warning-color: #8487e1;        /* Amarillo mostaza para advertencias */
    --success-color: #3da3a5;        /* Verde azulado para éxitos */
    
    /* Colores Neutros */
    --text-color: #232628;           /* Gris oscuro - Para texto principal */
    --text-light: #22577A;           /* Gris claro - Para texto secundario */
    --bg-color: #f5f7fa;             /* Fondo claro general */
    --white: #ffffff;
    --border-color: #e0e0e0;
    
    /* Sombras */
    --shadow: 0 2px 8px rgba(61, 163, 165, 0.15);
    --shadow-hover: 0 4px 12px rgba(61, 163, 165, 0.25);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #3da3a5 0%, #22577A 100%);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Pantallas */
.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

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

/* Header */
.header {
    text-align: center;
    color: var(--white);
    padding: 40px 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 48px;
}

.header h1 {
    font-size: 42px;
    font-weight: 700;
    margin: 0;
}

.subtitle {
    font-size: 18px;
    opacity: 0.95;
    margin-top: 10px;
}

/* Cards */
.welcome-card {
    background: var(--white);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.welcome-card h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 28px;
}

.welcome-card > p {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 30px;
}

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

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.feature i {
    font-size: 24px;
    color: var(--primary-color);
}

/* Grid de Simulacros */
.simulacros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.simulacro-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.simulacro-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.simulacro-header {
    padding: 25px;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 15px;
}

.simulacro-header i {
    font-size: 32px;
}

.simulacro-header h3 {
    font-size: 24px;
    margin: 0;
}

.simulacro-1 {
    background: linear-gradient(135deg, #3da3a5 0%, #22577A 100%);
}

.simulacro-2 {
    background: linear-gradient(135deg, #da865b 0%, #8487e1 100%);
}

.simulacro-3 {
    background: linear-gradient(135deg, #8487e1 0%, #3da3a5 100%);
}

.simulacro-body {
    padding: 25px;
}

.simulacro-body > p {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.areas-list {
    list-style: none;
    margin-bottom: 25px;
}

.areas-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.areas-list li:last-child {
    border-bottom: none;
}

.areas-list i {
    color: var(--primary-color);
}

.simulacro-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Botones */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex: 1;
    justify-content: center;
    min-width: 140px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #1565c0;
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #2e7d32;
}

.btn-back {
    background: var(--text-light);
    color: var(--white);
}

.btn-back:hover {
    background: #555;
}

.btn-start {
    background: var(--accent-color);
    color: var(--white);
    font-size: 18px;
    padding: 15px 40px;
}

.btn-start:hover {
    background: #ef6c00;
}

/* Instrucciones */
.instructions-card {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.instructions-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.instruction {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.instruction i {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.instruction p {
    color: var(--text-light);
}

/* Pantalla de Configuración */
.config-card {
    background: var(--white);
    border-radius: 15px;
    padding: 40px;
    max-width: 800px;
    margin: 50px auto;
    box-shadow: var(--shadow);
}

.config-card h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.config-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.config-info p {
    margin: 10px 0;
    font-size: 16px;
}

.config-info strong {
    color: var(--primary-color);
}

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

.student-info h3 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 18px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.config-warning {
    background: #fff3e0;
    border-left: 4px solid var(--warning-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    gap: 12px;
}

.config-warning i {
    color: var(--warning-color);
    font-size: 24px;
}

.config-warning p {
    color: var(--text-color);
    line-height: 1.6;
}

.config-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Pantalla de Examen */
.exam-header {
    background: var(--white);
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.exam-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 18px;
}

.exam-title i {
    font-size: 24px;
}

.exam-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--danger-color);
}

.exam-timer.warning {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.btn-finish {
    background: var(--danger-color);
    color: var(--white);
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-finish:hover {
    background: #c62828;
    transform: translateY(-2px);
}

/* Contenedor del Examen */
.exam-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.sidebar-header h3 {
    color: var(--primary-color);
    font-size: 18px;
}

#answered-count {
    font-weight: 700;
    color: var(--secondary-color);
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.question-nav-btn {
    aspect-ratio: 1;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.question-nav-btn:hover {
    transform: scale(1.1);
}

.question-nav-btn.current {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.question-nav-btn.answered {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.sidebar-legend {
    border-top: 2px solid var(--border-color);
    padding-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.legend-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--border-color);
}

.legend-box.answered {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.legend-box.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.legend-box.unanswered {
    background: var(--white);
}

/* Contenido Principal */
.main-content {
    flex: 1;
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.question-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.question-header h3 {
    color: var(--primary-color);
    font-size: 20px;
}

.question-area {
    background: linear-gradient(135deg, #3da3a5 0%, #22577A 100%);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.question-container {
    margin-bottom: 30px;
}

.question-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

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

.option {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--white);
}

.option:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
    transform: translateX(5px);
}

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

.option-label {
    flex: 1;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.6;
}

.option.selected {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

/* Retroalimentación */
.feedback-container {
    margin-top: 25px;
    padding: 25px;
    border-radius: 12px;
    animation: slideDown 0.5s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-container.correct {
    background: linear-gradient(135deg, #e0f4f5 0%, #b8e5e6 100%);
    border-left: 5px solid var(--success-color);
}

.feedback-container.incorrect {
    background: linear-gradient(135deg, #fef0eb 0%, #f8dccf 100%);
    border-left: 5px solid var(--danger-color);
}

.feedback-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

.feedback-container.correct .feedback-header {
    color: var(--success-color);
}

.feedback-container.incorrect .feedback-header {
    color: var(--danger-color);
}

.feedback-header i {
    font-size: 28px;
}

.correct-answer-box {
    background: rgba(255,255,255,0.7);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--success-color);
}

.correct-answer-box strong {
    color: var(--success-color);
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.correct-answer-text {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    display: block;
    padding: 10px;
    background: white;
    border-radius: 6px;
    margin-top: 8px;
}

.explanation-section {
    background: rgba(255,255,255,0.9);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.explanation-title {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.explanation-title i {
    font-size: 20px;
    color: var(--warning-color);
}

.explanation-content {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 15px;
}

.explanation-content p {
    margin-bottom: 12px;
}

.explanation-content strong {
    color: var(--primary-color);
}

.step-number {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 700;
    margin-right: 8px;
    font-size: 16px;
}

.checkmark {
    color: var(--success-color);
    font-weight: 700;
    font-size: 18px;
}

.crossmark {
    color: var(--danger-color);
    font-weight: 700;
    font-size: 18px;
}

.warning {
    color: var(--warning-color);
    font-weight: 700;
    font-size: 18px;
}

.arrow {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 18px;
    margin: 0 5px;
}

.important-note {
    display: inline-block;
    color: var(--danger-color);
    background: rgba(255,193,7,0.2);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
    margin: 8px 0;
}

.feedback-text {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
}

.correct-answer-info {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
    border-left: 3px solid var(--success-color);
    font-weight: 600;
}

.feedback-motivation {
    background: rgba(255,255,255,0.8);
    padding: 12px 15px;
    border-radius: 8px;
    text-align: center;
    font-style: italic;
    color: var(--text-light);
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.feedback-motivation i {
    font-size: 18px;
    color: var(--warning-color);
}

/* Estilos especiales para fórmulas y cálculos */
.explanation-content code,
.explanation-content .formula {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    font-weight: 600;
}

/* Tablas en explicaciones */
.explanation-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.explanation-content th,
.explanation-content td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.explanation-content th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.explanation-content tr:last-child td {
    border-bottom: none;
}

/* Lista de pasos */
.explanation-content ul,
.explanation-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.explanation-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Destacar información clave */
.explanation-content .highlight {
    background: rgba(255,193,7,0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Secciones de ejemplo */
.explanation-content .example-box {
    background: #f8f9fa;
    border-left: 4px solid var(--secondary-color);
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
}

.explanation-content .example-box strong {
    color: var(--secondary-color);
}

/* Animación de aparición para elementos de la explicación */
.explanation-content > * {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

.explanation-content > *:nth-child(1) { animation-delay: 0.1s; }
.explanation-content > *:nth-child(2) { animation-delay: 0.2s; }
.explanation-content > *:nth-child(3) { animation-delay: 0.3s; }
.explanation-content > *:nth-child(4) { animation-delay: 0.4s; }

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

/* Botones de Navegación */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.btn-nav {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    background: var(--primary-color);
    color: var(--white);
}

.btn-nav:hover:not(:disabled) {
    background: #1565c0;
    transform: translateY(-2px);
}

.btn-nav:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Pantalla de Resultados */
.results-card {
    background: var(--white);
    border-radius: 15px;
    padding: 40px;
    max-width: 1200px;
    margin: 30px auto;
    box-shadow: var(--shadow);
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-header i {
    font-size: 64px;
    color: var(--warning-color);
    margin-bottom: 15px;
}

.results-header h2 {
    color: var(--primary-color);
    font-size: 32px;
}

.student-data {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.student-data-item {
    display: flex;
    flex-direction: column;
}

.student-data-item strong {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.score-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.score-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
}

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

.score-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
}

.score-label {
    font-size: 24px;
    color: var(--text-light);
}

.score-percentage {
    text-align: center;
}

.score-percentage span {
    font-size: 36px;
    font-weight: 700;
    color: var(--secondary-color);
}

.score-percentage p {
    color: var(--text-light);
    margin-top: 5px;
}

.score-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    background: #f8f9fa;
}

.detail-item i {
    font-size: 32px;
}

.detail-item.correct i {
    color: var(--success-color);
}

.detail-item.incorrect i {
    color: var(--danger-color);
}

.detail-item.unanswered i {
    color: var(--warning-color);
}

.detail-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
}

.detail-label {
    display: block;
    font-size: 14px;
    color: var(--text-light);
}

.area-results {
    margin-bottom: 30px;
}

.area-results h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.area-result-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.area-name {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 16px;
}

.area-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.area-score {
    font-size: 20px;
    font-weight: 700;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
    margin: 0 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color) 0%, var(--secondary-color) 100%);
    transition: width 1s ease;
}

.time-stats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.time-stats h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.time-item {
    display: flex;
    justify-content: space-between;
}

.time-label {
    color: var(--text-light);
}

.time-value {
    font-weight: 700;
    color: var(--primary-color);
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Pantalla de Revisión */
.review-header {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.review-header h2 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-filters {
    background: var(--white);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

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

.review-question {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.review-question.correct {
    border-left: 4px solid var(--success-color);
}

.review-question.incorrect {
    border-left: 4px solid var(--danger-color);
}

.review-question.unanswered {
    border-left: 4px solid var(--warning-color);
}

.review-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.review-question-number {
    font-weight: 700;
    color: var(--primary-color);
}

.review-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    padding: 5px 15px;
    border-radius: 20px;
}

.review-status.correct {
    background: #e8f5e9;
    color: var(--success-color);
}

.review-status.incorrect {
    background: #ffebee;
    color: var(--danger-color);
}

.review-status.unanswered {
    background: #fff3e0;
    color: var(--warning-color);
}

.review-question-text {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-color);
}

.review-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.review-option {
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: var(--white);
}

.review-option.user-answer {
    background: #e3f2fd;
    border-color: var(--primary-color);
}

.review-option.correct-answer {
    background: #e8f5e9;
    border-color: var(--success-color);
    font-weight: 600;
}

.review-option.incorrect-answer {
    background: #ffebee;
    border-color: var(--danger-color);
}

.review-explanation {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.review-explanation strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 8px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--white);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 25px;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h3 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-cancel {
    background: var(--text-light);
    color: var(--white);
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #555;
}

.btn-confirm {
    background: var(--danger-color);
    color: var(--white);
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-confirm:hover {
    background: #c62828;
}

/* Responsive */
@media (max-width: 1024px) {
    .exam-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .score-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 32px;
    }
    
    .simulacros-grid {
        grid-template-columns: 1fr;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .instructions-grid {
        grid-template-columns: 1fr;
    }
    
    .exam-header {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .exam-timer {
        font-size: 20px;
    }
    
    .navigation-buttons {
        flex-direction: column;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Loading Spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Utilidades */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none !important;
}

/* Estilos para explicaciones mejoradas */
.answer-comparison {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.your-answer {
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--danger-color);
}

.your-answer strong {
    color: var(--danger-color);
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.correct-answer-box.solo {
    margin-bottom: 20px;
}

.category-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 15px;
}

.restatement {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid var(--primary-color);
}

.restatement strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 8px;
}

.base-explanation,
.detailed-analysis,
.step-by-step-visual {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.detailed-analysis strong,
.step-by-step-visual strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 10px;
}

.math-analysis,
.verbal-analysis,
.pedagogy-analysis,
.reading-analysis {
    padding: 10px 0;
}

.math-analysis ul,
.verbal-analysis ul,
.pedagogy-analysis ul,
.reading-analysis ul {
    list-style: none;
    padding-left: 0;
    margin: 10px 0;
}

.math-analysis li,
.verbal-analysis li,
.pedagogy-analysis li,
.reading-analysis li {
    padding: 5px 0;
    padding-left: 20px;
}

.method-steps {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
}

.method-steps li {
    counter-increment: step-counter;
    padding: 12px;
    padding-left: 40px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 6px;
    position: relative;
}

.method-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.method-steps strong {
    color: var(--primary-color);
}

.distractor-section {
    background: rgba(255, 240, 240, 0.5);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px solid var(--danger-color);
}

.distractor-title {
    color: var(--danger-color);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.distractor-content {
    color: var(--text-color);
}

.distractor-content ul {
    margin: 10px 0;
    padding-left: 25px;
}

.distractor-content li {
    margin: 5px 0;
}

.key-concepts {
    background: linear-gradient(135deg, #e0f4f5 0%, #c4ebec 100%);
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.key-concepts strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 12px;
}

.concepts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.concept-badge {
    background: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-color);
    border: 2px solid var(--primary-color);
    font-weight: 600;
}

.practical-application {
    background: linear-gradient(135deg, #eeeaf5 0%, #d8d2e6 100%);
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.practical-application strong {
    color: var(--secondary-color);
    display: block;
    margin-bottom: 10px;
}

.explanation-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    font-style: italic;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.idea {
    color: var(--warning-color);
    font-size: 20px;
}

.search {
    color: var(--primary-color);
    font-size: 18px;
}

/* Notificaciones del sistema */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 400px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-error {
    border-left: 4px solid var(--danger-color);
}

.notification-error i {
    color: var(--danger-color);
    font-size: 20px;
}

.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-success i {
    color: var(--success-color);
    font-size: 20px;
}

.notification-info {
    border-left: 4px solid var(--primary-color);
}

.notification-info i {
    color: var(--primary-color);
    font-size: 20px;
}

.notification span {
    flex: 1;
    color: var(--text-color);
    line-height: 1.4;
}

/* Responsive para explicaciones */
@media (max-width: 768px) {
    .answer-comparison {
        flex-direction: column;
    }
    
    .concepts-grid {
        flex-direction: column;
    }
    
    .concept-badge {
        width: 100%;
        text-align: center;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
}
