/* ===== SIMULADOR DE EXAMEN - ESTILO INGRESO360° ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Clash+Display:wght@400;500;600;700&display=swap');

:root {
    --primary: #0B2B5C;
    --primary-light: #1E3F7A;
    --primary-dark: #081C3F;
    --secondary: #D44A4A;
    --secondary-light: #E06B6B;
    --accent: #F4B740;
    --accent-light: #FFD966;
    --success: #2A9D8F;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1A1F2E;
    --darker: #0F1322;
    --light: #F5F7FA;
    --gray: #6B7280;
    --gray-light: #E5E9F0;
    
    --gradient-primary: linear-gradient(135deg, #0B2B5C 0%, #1E3F7A 100%);
    --gradient-secondary: linear-gradient(135deg, #D44A4A 0%, #E06B6B 100%);
    --gradient-accent: linear-gradient(135deg, #F4B740 0%, #FFD966 100%);
    --gradient-success: linear-gradient(135deg, #2A9D8F 0%, #3FB5A5 100%);
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    margin-bottom: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
    color: var(--dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Clash Display', sans-serif;
    font-weight: 700;
}

/* ===== HEADER MODERNO ===== */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 3px solid var(--secondary);
}

.container__header {
    max-width: 1400px;
    height: 80px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

.menu0 nav ul {
    display: flex;
    gap: 10px;
    list-style: none;
}

.menu0 nav ul li a {
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: var(--dark);
    border-radius: 40px;
    transition: var(--transition);
    display: inline-block;
}

.menu0 nav ul li a[href*="index"] {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 5px 15px rgba(11, 43, 92, 0.3);
}

.menu0 nav ul li a[onclick*="Imprimir"] {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: 0 5px 15px rgba(212, 74, 74, 0.3);
}

.menu0 nav ul li a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.ConterMain {
    max-width: 1400px;
    margin: 100px auto 0;
    padding: 20px;
}

/* ===== ENCABEZADO DEL EXAMEN ===== */
.contenedorA1 {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-light);
    position: relative;
    overflow: hidden;
}

.contenedorA1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--gradient-secondary);
}

.contenedorA1 h1 {
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.contenedorA1 h3 {
    color: var(--secondary);
    font-size: 1.3rem;
    margin: 10px 0;
}

.contenedorA1 p {
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-top: 15px;
    display: block;
}

/* ===== MODALES ===== */
.modalContainer {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: var(--border-radius-xl);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    border: none;
    animation: slideUp 0.4s ease;
    position: relative;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--gradient-secondary);
}

.modal-content h2 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.modal-content h3 {
    color: var(--secondary);
    margin: 20px 0;
    text-align: center;
}

.modal-content p {
    color: var(--gray);
    margin: 15px 0;
    display: block;
    text-align: center;
}

.modal-content table {
    width: 100%;
    margin: 20px 0;
}

.modal-content td {
    padding: 12px 0;
    color: var(--dark);
    font-weight: 500;
    border-bottom: 1px dashed var(--gray-light);
}

.modal-content td:first-child {
    color: var(--gray);
}

.modal-content td:last-child {
    color: var(--primary);
    font-weight: 700;
}

.close {
    display: inline-block;
    padding: 12px 30px;
    margin: 10px 5px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: none;
}

#cerrarExamen, #msgVerRespuestaNo {
    background: var(--gray-light);
    color: var(--dark);
}

#iniciarExamen, #msgVerRespuestaSi1, #msgVerRespuestaSi2 {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: 0 10px 20px rgba(212, 74, 74, 0.3);
}

.close:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== ÁREA DE PREGUNTAS ===== */
.contenedorA2 {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.contenedorA2-1 {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.caja {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.caja:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.caja::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
}

.caja2-1 {
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.caja2-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.caja2-2 img {
    max-width: 200px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

/* ===== OPCIONES DE RESPUESTA ===== */
.opcion-radio {
    margin: 12px 0;
}

.opcion-radio input[type=radio] {
    position: absolute;
    opacity: 0;
}

.opcion-radio input[type=radio] + label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--dark);
    transition: var(--transition);
}

.opcion-radio input[type=radio] + label:before {
    content: '';
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-light);
    border-radius: 50%;
    margin-right: 12px;
    transition: var(--transition);
    background: white;
}

.opcion-radio input[type=radio]:checked + label:before {
    border-color: var(--secondary);
    background: var(--secondary);
    box-shadow: inset 0 0 0 5px white;
}

.opcion-radio input[type=radio]:checked + label {
    color: var(--secondary);
    font-weight: 600;
}

/* ===== PANEL LATERAL ===== */
.contenedorA2-2 {
    width: 320px;
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-light);
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* Cajas desplegables */
.cajaDesplegable {
    margin-bottom: 15px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.cajaDesplegable input {
    display: none;
}

.cajaDesplegable label {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--light);
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    margin: 0;
    text-transform: none;
}

.cajaDesplegable label:hover {
    background: var(--gray-light);
}

.cajaDesplegable label:before {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    margin-right: 12px;
    font-weight: bold;
}

.cajaDesplegable input:checked ~ label:before {
    content: '-';
    background: var(--gradient-secondary);
}

.cajaDesplegable div {
    display: none;
    padding: 20px;
    background: white;
    border-top: 1px solid var(--gray-light);
}

.cajaDesplegable input:checked ~ div {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Temporizador */
#temporizador {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #fee, #ffe4e4);
    border-radius: var(--border-radius-md);
    margin: 15px 0;
}

/* Botón verificar */
input[type="button"][value="verificar"] {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 10px;
}

input[type="button"][value="verificar"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Botón terminar examen */
.btnTerminar {
    width: 100%;
    background: var(--gradient-secondary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btnTerminar:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 74, 74, 0.4);
}

/* Tablas de resultados */
.tablaCotejo {
    width: 100%;
    border-collapse: collapse;
}

.tablaCotejo td {
    padding: 8px;
    text-align: center;
}

.celda {
    background: var(--gradient-accent);
    color: var(--primary);
    font-weight: 700;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.celda:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-sm);
}

#prtotal, #prcontestada, #prcorrecta, #princorrecta, #prblanco {
    font-weight: 700;
    color: var(--secondary);
}

/* Tablas de ponderación */
#tablaPoderacionB, #tablaPoderacionI, #tablaPoderacionS, #tablaDetalle {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#tablaPoderacionB th, #tablaPoderacionI th, #tablaPoderacionS th, #tablaDetalle th {
    background: var(--gradient-primary);
    color: white;
    padding: 10px;
    font-weight: 600;
}

#tablaPoderacionB td, #tablaPoderacionI td, #tablaPoderacionS td, #tablaDetalle td {
    padding: 8px;
    border: 1px solid var(--gray-light);
    text-align: center;
}

/* Marcadores de respuestas */
.MarcadoBien {
    color: var(--success);
    font-weight: 700;
}

.MarcadorMal {
    color: var(--danger);
    font-weight: 700;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .contenedorA2 {
        flex-direction: column;
    }
    
    .contenedorA2-2 {
        width: 100%;
        position: static;
    }
    
    .contenedorA2-1 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container__header {
        height: 70px;
        padding: 0 20px;
    }
    
    .logo img {
        height: 40px;
    }
    
    .menu0 nav ul {
        gap: 5px;
    }
    
    .menu0 nav ul li a {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .ConterMain {
        margin-top: 80px;
        padding: 15px;
    }
    
    .contenedorA1 h1 {
        font-size: 1.8rem;
    }
    
    .contenedorA1 h3 {
        font-size: 1.1rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 25px;
        margin: 10% auto;
    }
    
    .caja2-2 {
        flex-direction: column;
    }
    
    .caja2-2 img {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .container__header {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    
    .menu0 nav ul {
        justify-content: center;
    }
    
    .ConterMain {
        margin-top: 120px;
    }
    
    .contenedorA1 {
        padding: 20px;
    }
    
    .contenedorA1 h1 {
        font-size: 1.5rem;
    }
    
    .modal-content h2 {
        font-size: 1.3rem;
    }
    
    .close {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    #temporizador {
        font-size: 1.5rem;
    }
}

/* ===== UTILIDADES ===== */
.text-accent {
    color: var(--accent);
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.bg-gradient {
    background: var(--gradient-primary);
    color: white;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-primary);
}

/* Animaciones adicionales */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-light);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}