/**
 * Quiz Manager Pro - Public Styles
 */

/* ========== Variables ========== */
:root {
    --qmp-primary: #2563eb;
    --qmp-primary-dark: #1e40af;
    --qmp-success: #10b981;
    --qmp-danger: #ef4444;
    --qmp-warning: #f59e0b;
    --qmp-gray-50: #f9fafb;
    --qmp-gray-100: #f3f4f6;
    --qmp-gray-200: #e5e7eb;
    --qmp-gray-300: #d1d5db;
    --qmp-gray-400: #9ca3af;
    --qmp-gray-500: #6b7280;
    --qmp-gray-600: #4b5563;
    --qmp-gray-700: #374151;
    --qmp-gray-800: #1f2937;
    --qmp-gray-900: #111827;
    --qmp-border-radius: 8px;
    --qmp-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --qmp-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --qmp-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* ========== Container ========== */
.qmp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ========== Quiz Header ========== */
.qmp-quiz-header {
    background: white;
    border-radius: var(--qmp-border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--qmp-shadow);
}

.qmp-quiz-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--qmp-gray-900);
    margin: 0 0 15px 0;
}

.qmp-quiz-description {
    color: var(--qmp-gray-600);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.qmp-quiz-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.qmp-info-item {
    background: var(--qmp-gray-50);
    padding: 15px;
    border-radius: var(--qmp-border-radius);
    text-align: center;
}

.qmp-info-label {
    display: block;
    font-size: 13px;
    color: var(--qmp-gray-500);
    margin-bottom: 5px;
    font-weight: 500;
}

.qmp-info-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--qmp-primary);
}

/* ========== Screens ========== */
.qmp-screen {
    background: white;
    border-radius: var(--qmp-border-radius);
    padding: 40px;
    box-shadow: var(--qmp-shadow);
}

.qmp-start-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.qmp-start-content h3 {
    font-size: 24px;
    color: var(--qmp-gray-900);
    margin-bottom: 25px;
}

.qmp-instructions-list {
    text-align: left;
    margin: 30px 0;
    list-style: none;
    padding: 0;
}

.qmp-instructions-list li {
    padding: 12px 0 12px 35px;
    position: relative;
    color: var(--qmp-gray-700);
    font-size: 15px;
    line-height: 1.6;
}

.qmp-instructions-list li:before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--qmp-success);
    font-weight: bold;
    font-size: 18px;
}

.qmp-attempts-info {
    background: var(--qmp-gray-50);
    border-radius: var(--qmp-border-radius);
    padding: 20px;
    margin: 25px 0;
}

.qmp-attempts-remaining {
    color: var(--qmp-primary);
    font-weight: 600;
}

/* ========== Timer ========== */
.qmp-timer-container {
    background: white;
    border-radius: var(--qmp-border-radius);
    padding: 20px;
    box-shadow: var(--qmp-shadow);
    margin-bottom: 20px;
}

.qmp-timer-mobile {
    display: none;
}

.qmp-timer {
    width: 120px;
    height: 120px;
    position: relative;
    margin: 0 auto;
}

.qmp-timer-svg {
    transform: rotate(-90deg);
}

.qmp-timer-circle-bg {
    fill: none;
    stroke: var(--qmp-gray-200);
    stroke-width: 8;
}

.qmp-timer-circle {
    fill: none;
    stroke: var(--qmp-primary);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke 0.3s ease;
}

.qmp-timer-circle.qmp-timer-warning {
    stroke: var(--qmp-danger);
}

.qmp-timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    font-weight: 700;
    color: var(--qmp-gray-900);
}

.qmp-timer-label {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    color: var(--qmp-gray-600);
    font-weight: 500;
}

/* ========== Exam Layout ========== */
.qmp-exam-layout {
    display: grid !important;
    grid-template-columns: 1fr 320px !important;
    grid-template-areas: "questions sidebar" !important;
    gap: 30px !important;
    align-items: start !important;
}

.qmp-questions-area {
    grid-area: questions !important;
    min-width: 0 !important;
}

.qmp-sidebar {
    grid-area: sidebar !important;
    position: sticky !important;
    top: 20px !important;
    align-self: start !important;
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
}

/* Ocultar timer móvil en desktop */
.qmp-timer-mobile {
    display: none !important;
}

/* ========== Questions ========== */
.qmp-question {
    background: white;
    border: 2px solid var(--qmp-gray-200);
    border-radius: var(--qmp-border-radius);
    padding: 30px;
    margin-bottom: 25px;
    transition: border-color 0.3s ease;
}

.qmp-question:hover {
    border-color: var(--qmp-primary);
}

.qmp-question-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.qmp-question-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--qmp-primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
}

.qmp-question-type {
    font-size: 13px;
    color: var(--qmp-gray-500);
    font-weight: 500;
    background: var(--qmp-gray-100);
    padding: 5px 12px;
    border-radius: 20px;
}

.qmp-question-text {
    font-size: 17px;
    line-height: 1.7;
    color: var(--qmp-gray-900);
    margin-bottom: 25px;
    font-weight: 500;
}

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

.qmp-option {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border: 2px solid var(--qmp-gray-200);
    border-radius: var(--qmp-border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.qmp-option:hover {
    border-color: var(--qmp-primary);
    background: var(--qmp-gray-50);
}

.qmp-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.qmp-option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--qmp-gray-100);
    color: var(--qmp-gray-600);
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
    margin-right: 15px;
    flex-shrink: 0;
}

.qmp-option-text {
    flex: 1;
    color: var(--qmp-gray-700);
    font-size: 15px;
    line-height: 1.6;
}

.qmp-option-check {
    display: none;
    color: white;
    font-size: 20px;
    margin-left: 10px;
}

.qmp-option.checked {
    background: var(--qmp-primary);
    border-color: var(--qmp-primary);
}

.qmp-option.checked .qmp-option-letter {
    background: white;
    color: var(--qmp-primary);
}

.qmp-option.checked .qmp-option-text {
    color: white;
    font-weight: 500;
}

.qmp-option.checked .qmp-option-check {
    display: block;
}

/* ========== Pagination ========== */
.qmp-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    background: var(--qmp-gray-50);
    border-radius: var(--qmp-border-radius);
}

.qmp-page-info {
    font-weight: 600;
    color: var(--qmp-gray-700);
}

/* ========== Navigator ========== */
.qmp-questions-navigator {
    background: white;
    border: 2px solid var(--qmp-gray-200);
    border-radius: var(--qmp-border-radius);
    padding: 20px;
    box-shadow: var(--qmp-shadow);
}

.qmp-navigator-header h4 {
    margin: 0 0 15px 0;
    color: var(--qmp-gray-900);
    font-size: 16px;
}

.qmp-navigator-legend {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--qmp-gray-200);
}

.qmp-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--qmp-gray-600);
}

.qmp-navigator-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.qmp-question-number {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--qmp-gray-300);
    background: white;
    color: var(--qmp-gray-700);
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qmp-question-number:hover {
    border-color: var(--qmp-primary);
    background: var(--qmp-gray-50);
}

.qmp-question-number.qmp-answered {
    background: var(--qmp-success);
    border-color: var(--qmp-success);
    color: white;
}

.qmp-question-number.qmp-current {
    border-color: var(--qmp-primary);
    border-width: 3px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ========== Buttons ========== */
.qmp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--qmp-border-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

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

.qmp-btn-primary:hover:not(:disabled) {
    background: var(--qmp-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--qmp-shadow);
}

.qmp-btn-secondary {
    background: var(--qmp-gray-200);
    color: var(--qmp-gray-700);
}

.qmp-btn-secondary:hover:not(:disabled) {
    background: var(--qmp-gray-300);
}

.qmp-btn-success {
    background: #10b981;
    color: white;
}

.qmp-btn-success:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: var(--qmp-shadow);
}

.qmp-btn-large {
    padding: 16px 32px;
    font-size: 17px;
}

.qmp-btn-icon {
    font-size: 18px;
}

.qmp-submit-container {
    margin-top: 30px;
    text-align: center;
}

/* ========== Results ========== */
.qmp-results-header {
    text-align: center;
    padding: 50px 30px;
    border-radius: var(--qmp-border-radius);
    margin-bottom: 30px;
}

.qmp-results-header.qmp-passed {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.qmp-results-header.qmp-failed {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.qmp-result-icon {
    margin-bottom: 20px;
}

.qmp-result-icon svg {
    stroke-width: 2.5;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.qmp-result-title {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 20px 0;
}

.qmp-result-score {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.qmp-score-max {
    font-size: 32px;
    opacity: 0.8;
}

.qmp-result-percentage {
    font-size: 28px;
    font-weight: 600;
    opacity: 0.9;
}

/* ========== Summary Grid ========== */
.qmp-results-summary {
    background: white;
    border-radius: var(--qmp-border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--qmp-shadow);
}

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

.qmp-summary-item {
    text-align: center;
    padding: 25px;
    background: var(--qmp-gray-50);
    border-radius: var(--qmp-border-radius);
}

.qmp-summary-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
}

.qmp-icon-correct {
    background: var(--qmp-success);
    color: white;
}

.qmp-icon-incorrect {
    background: var(--qmp-danger);
    color: white;
}

.qmp-icon-time,
.qmp-icon-accuracy {
    background: var(--qmp-primary);
    color: white;
}

.qmp-summary-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--qmp-gray-900);
    margin-bottom: 5px;
}

.qmp-summary-label {
    font-size: 14px;
    color: var(--qmp-gray-600);
    font-weight: 500;
}

/* ========== Topic Stats ========== */
.qmp-topic-stats {
    background: white;
    border-radius: var(--qmp-border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--qmp-shadow);
}

.qmp-topic-stats h3 {
    margin: 0 0 25px 0;
    color: var(--qmp-gray-900);
}

/* Layout 2 columnas: temas | sidebar (adaptativo + reforzar) */
.qmp-topic-stats-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 25px;
    align-items: start;
}

/* Columna izquierda: lista de stat-cards */
.qmp-topic-stats-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0; /* Evita overflow en grid */
}

/* Columna derecha: adaptive + weak topics */
.qmp-topic-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* Stat card individual */
.qmp-stat-card {
    background: var(--qmp-gray-50);
    padding: 16px 20px;
    border-radius: var(--qmp-border-radius);
    border-left: 4px solid var(--qmp-gray-300);
}

.qmp-stat-card.qmp-perf-excellent { border-left-color: #27ae60; }
.qmp-stat-card.qmp-perf-good      { border-left-color: #3498db; }
.qmp-stat-card.qmp-perf-average   { border-left-color: #f39c12; }
.qmp-stat-card.qmp-perf-weak      { border-left-color: #e74c3c; }

.qmp-stat-card h4 {
    margin: 0 0 10px 0;
    color: var(--qmp-gray-800);
    font-size: 15px;
}

.qmp-stat-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.qmp-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--qmp-gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.qmp-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    background: var(--qmp-gray-400);
}

/* Colores de barra según nivel */
.qmp-progress-fill.qmp-perf-excellent { background: #27ae60; }
.qmp-progress-fill.qmp-perf-good      { background: #3498db; }
.qmp-progress-fill.qmp-perf-average   { background: #f39c12; }
.qmp-progress-fill.qmp-perf-weak      { background: #e74c3c; }

.qmp-stat-percentage {
    font-weight: 700;
    font-size: 14px;
    min-width: 42px;
    text-align: right;
    color: var(--qmp-gray-900);
}

.qmp-stat-details {
    font-size: 12px;
    color: var(--qmp-gray-600);
    margin-bottom: 4px;
}

/* Performance label */
.qmp-performance-label {
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
    color: var(--qmp-gray-600);
}

.qmp-performance-label.qmp-perf-excellent { color: #27ae60; }
.qmp-performance-label.qmp-perf-good      { color: #3498db; }
.qmp-performance-label.qmp-perf-average   { color: #f39c12; }
.qmp-performance-label.qmp-perf-weak      { color: #e74c3c; }

/* Sistema Adaptativo */
.qmp-adaptive-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--qmp-border-radius);
    padding: 20px;
    color: white;
}

.qmp-adaptive-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.qmp-adaptive-icon {
    font-size: 20px;
}

.qmp-adaptive-config {
    background: rgba(255,255,255,0.12);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.qmp-adaptive-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.qmp-adaptive-config-label {
    opacity: 0.85;
    font-size: 11px;
    margin-bottom: 2px;
}

.qmp-adaptive-config-value {
    font-weight: 600;
    font-size: 15px;
}

.qmp-adaptive-distribution {
    background: rgba(255,255,255,0.15);
    padding: 14px;
    border-radius: 6px;
}

.qmp-adaptive-distribution-title {
    margin: 0 0 12px 0;
    font-size: 13px;
    opacity: 0.95;
    color: white;
}

.qmp-adaptive-distribution-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qmp-adaptive-dist-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.1);
    padding: 8px 10px;
    border-radius: 4px;
}

.qmp-adaptive-dist-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.qmp-adaptive-dist-name {
    font-weight: 600;
    font-size: 13px;
}

.qmp-adaptive-dist-detail {
    opacity: 0.8;
    font-size: 11px;
}

.qmp-adaptive-dist-count {
    text-align: right;
}

.qmp-adaptive-dist-total {
    font-weight: 700;
    font-size: 18px;
}

.qmp-adaptive-dist-pct {
    opacity: 0.8;
    font-size: 11px;
}

.qmp-adaptive-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.5;
}

/* Temas a reforzar */
.qmp-improvement-suggestions {
    background: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: var(--qmp-border-radius);
    padding: 18px;
}

.qmp-improvement-suggestions h4 {
    margin: 0 0 12px 0;
    color: #856404;
    font-size: 15px;
}

.qmp-improvement-suggestions ul {
    margin: 0;
    padding: 0 0 0 18px;
}

.qmp-improvement-suggestions li {
    color: #5a4000;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 6px;
}

.qmp-improvement-suggestions li strong {
    color: #3d2c00;
}

/* results-container (wraper general) */
.qmp-results-container {
    margin: 0 auto;
    padding: 20px;
}

/* review-body */
.qmp-review-body {
    margin-top: 15px;
}

/* ---- Responsive ---- */
@media (max-width: 780px) {
    .qmp-topic-stats-layout {
        grid-template-columns: 1fr;
    }
}

/* ========== Detailed Review ========== */
.qmp-detailed-review {
    background: white;
    border-radius: var(--qmp-border-radius);
    padding: 30px;
    box-shadow: var(--qmp-shadow);
}

.qmp-detailed-review h3 {
    margin: 0 0 25px 0;
    color: var(--qmp-gray-900);
}

.qmp-review-question {
    background: white;
    border: 2px solid var(--qmp-gray-200);
    border-radius: var(--qmp-border-radius);
    padding: 25px;
    margin-bottom: 20px;
}

.qmp-review-question.qmp-correct {
    border-color: var(--qmp-success);
    background: rgba(16, 185, 129, 0.02);
}

.qmp-review-question.qmp-partial {
    border-color: #d97706;
    background: rgba(217, 119, 6, 0.03);
}

.qmp-review-question.qmp-incorrect {
    border-color: var(--qmp-danger);
    background: rgba(239, 68, 68, 0.02);
}

.qmp-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.qmp-question-number-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qmp-badge-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: var(--qmp-gray-100);
    color: var(--qmp-gray-700);
    border-radius: 50%;
    font-weight: 700;
}

.qmp-review-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.qmp-status-correct {
    color: var(--qmp-success);
    font-weight: 600;
}

.qmp-status-incorrect {
    color: var(--qmp-danger);
    font-weight: 600;
}

.qmp-points-earned {
    background: var(--qmp-gray-100);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.qmp-review-option {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 2px solid var(--qmp-gray-200);
    border-radius: var(--qmp-border-radius);
    margin-bottom: 10px;
}

.qmp-option-letter-review {
    font-weight: 700;
    color: #374151;
    min-width: 26px;
    flex-shrink: 0;
    font-size: 14px;
    padding-top: 1px;
}

.qmp-review-option.qmp-option-correct {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--qmp-success);
}

.qmp-review-option.qmp-option-selected-wrong {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--qmp-danger);
}

.qmp-review-option.qmp-option-selected-correct {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--qmp-success);
    font-weight: 600;
}

.qmp-option-indicator {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
}

.qmp-indicator-correct {
    color: var(--qmp-success);
}

.qmp-indicator-wrong {
    color: var(--qmp-danger);
}

.qmp-indicator-neutral {
    color: var(--qmp-gray-400);
}

.qmp-additional-info {
    background: var(--qmp-gray-50);
    padding: 20px;
    border-radius: var(--qmp-border-radius);
    margin-top: 15px;
    border-left: 4px solid var(--qmp-primary);
}

.qmp-additional-info h5 {
    margin: 0 0 10px 0;
    color: var(--qmp-gray-900);
    font-size: 15px;
}

/* ========== Actions ========== */
.qmp-results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.qmp-results-actions .qmp-btn {
    min-width: 180px;
    text-align: center;
    text-decoration: none;
}

.qmp-new-quiz-hint {
    text-align: center;
    color: #64748b;
    margin-top: 12px;
    font-size: 14px;
}

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

.qmp-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: qmp-spin 0.8s linear infinite;
}

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

.qmp-loading-overlay p {
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
}

/* ========== Notices ========== */
.qmp-notice {
    padding: 15px 20px;
    border-radius: var(--qmp-border-radius);
    margin-bottom: 20px;
}

.qmp-notice-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .qmp-exam-layout {
        grid-template-columns: 1fr !important;
        grid-template-areas: 
            "questions"
            "sidebar" !important;
    }
    
    .qmp-sidebar {
        position: static !important;
        max-height: none !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
    }
    
    .qmp-timer-container {
        margin-bottom: 0 !important;
    }
    
    .qmp-questions-navigator {
        margin-bottom: 0 !important;
    }
}

@media (max-width: 768px) {
    .qmp-container {
        padding: 15px;
    }
    
    .qmp-quiz-info {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .qmp-screen {
        padding: 25px;
    }
    
    .qmp-sidebar {
        grid-template-columns: 1fr !important;
    }
    
    .qmp-navigator-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .qmp-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .qmp-pagination {
        flex-direction: column;
        gap: 15px;
    }
    
    .qmp-timer-mobile {
        display: block !important;
        background: white;
        border-radius: var(--qmp-border-radius);
        padding: 20px;
        margin-bottom: 20px;
        box-shadow: var(--qmp-shadow);
    }
    
    .qmp-timer-container {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .qmp-quiz-info {
        grid-template-columns: 1fr;
    }
    
    .qmp-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .qmp-result-title {
        font-size: 28px;
    }
    
    .qmp-result-score {
        font-size: 36px;
    }
    
    .qmp-navigator-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== Quiz Selector ========== */
.qmp-quiz-selector {
    max-width: 800px;
    margin: 40px auto;
}

.qmp-last-quiz-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.qmp-card-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.qmp-last-quiz-card h3 {
    color: white;
    margin: 0 0 20px 0;
    font-size: 24px;
}

.qmp-last-quiz-card .qmp-quiz-title {
    font-size: 18px;
    font-weight: 600;
    margin: 10px 0;
    color: rgba(255,255,255,0.95);
}

.qmp-last-quiz-card .qmp-quiz-description {
    color: rgba(255,255,255,0.85);
    margin: 15px 0;
}

.qmp-quiz-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.qmp-quiz-meta span {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.qmp-card-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.qmp-card-actions .qmp-btn {
    margin: 0 10px;
}

.qmp-btn-large {
    padding: 15px 30px !important;
    font-size: 16px !important;
    min-width: 200px;
}

.qmp-contests-selector {
    margin-top: 40px;
}

.qmp-contests-selector h3 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 10px;
}

.qmp-contests-selector .description {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.qmp-contests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.qmp-contest-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.qmp-contest-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.qmp-contest-card h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 20px;
}

.qmp-contest-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.qmp-quizzes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qmp-quiz-item {
    display: block;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.qmp-quiz-item:hover {
    background: #667eea;
    border-color: #667eea;
    transform: translateX(5px);
}

.qmp-quiz-item:hover .qmp-quiz-item-title {
    color: white;
}

.qmp-quiz-item:hover .qmp-quiz-item-meta span {
    color: rgba(255,255,255,0.9);
}

.qmp-quiz-item-title {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.qmp-quiz-item-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

/* Responsive adjustments for selector */
@media (max-width: 768px) {
    .qmp-last-quiz-card {
        padding: 30px 20px;
    }
    
    .qmp-card-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .qmp-card-actions .qmp-btn {
        margin: 5px 0;
        width: 100%;
    }
    
    .qmp-btn-large {
        width: 100%;
    }
    
    .qmp-contests-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== User Dashboard ========== */
.qmp-user-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.qmp-dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.qmp-dashboard-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    color: white;
}

.qmp-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.qmp-stat-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.qmp-stat-content {
    text-align: center;
}

.qmp-stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.qmp-stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.qmp-stat-primary {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border: 1px solid #c7d7fe;
}

.qmp-stat-primary .qmp-stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.qmp-stat-primary .qmp-stat-value {
    color: #5b21b6;
}

.qmp-stat-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
}

.qmp-stat-success .qmp-stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.qmp-stat-success .qmp-stat-value {
    color: #15803d;
}

.qmp-stat-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
}

.qmp-stat-info .qmp-stat-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.qmp-stat-info .qmp-stat-value {
    color: #1e40af;
}

.qmp-stat-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
}

.qmp-stat-warning .qmp-stat-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.qmp-stat-warning .qmp-stat-value {
    color: #b45309;
}

/* Grid de estadísticas */
.qmp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Mejorar estructura de stat-card */
.qmp-stats-grid .qmp-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.qmp-stats-grid .qmp-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.qmp-stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.qmp-stat-content {
    flex: 1;
}

.qmp-stat-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}

.qmp-stat-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

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

.qmp-dashboard-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qmp-full-width {
    grid-column: 1 / -1;
}

.qmp-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.qmp-section-header h2 {
    margin: 0 0 5px 0;
    font-size: 22px;
    color: #2c3e50;
}

.qmp-section-description {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.qmp-weak-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.qmp-weak-topic-card {
    background: #f8f9fa;
    border: 2px solid #ef4444;
    border-radius: 8px;
    padding: 20px;
}

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

.qmp-topic-header h3 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
}

.qmp-accuracy-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.qmp-badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.qmp-topic-stats-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.qmp-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qmp-stat-item .qmp-stat-icon {
    font-size: 20px;
}

.qmp-stat-number {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

.qmp-stat-text {
    font-size: 11px;
    color: #6b7280;
}

.qmp-recent-attempts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.qmp-attempt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: transform 0.2s;
}

.qmp-attempt-item:hover {
    transform: translateX(5px);
    background: #e5e7eb;
}

.qmp-attempt-info h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
    color: #2c3e50;
}

.qmp-attempt-meta {
    font-size: 13px;
    color: #6b7280;
}

.qmp-attempt-score {
    text-align: right;
}

.qmp-score-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.qmp-score-label {
    font-size: 12px;
    color: #6b7280;
}

.qmp-quick-actions {
    display: grid;
    gap: 15px;
}

.qmp-quick-actions h2 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #2c3e50;
}

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

.qmp-action-card {
    display: block;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e5e7eb 100%);
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.qmp-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.qmp-action-icon {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
}

.qmp-action-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.qmp-action-description {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.qmp-action-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .qmp-dashboard-header {
        padding: 30px 20px;
    }
    
    .qmp-dashboard-header h1 {
        font-size: 24px;
    }
    
    .qmp-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .qmp-weak-topics-grid {
        grid-template-columns: 1fr;
    }
    
    .qmp-topic-stats-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .qmp-stat-item {
        width: 100%;
    }
}

/* ========== User Statistics ========== */
.qmp-user-statistics {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.qmp-stats-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.qmp-stats-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    color: white;
}

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

.qmp-summary-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.qmp-card-primary {
    border-left: 4px solid #667eea;
}

.qmp-card-success {
    border-left: 4px solid #10b981;
}

.qmp-card-warning {
    border-left: 4px solid #f59e0b;
}

.qmp-card-info {
    border-left: 4px solid #3b82f6;
}

.qmp-summary-icon {
    font-size: 48px;
}

.qmp-summary-content {
    flex: 1;
}

.qmp-summary-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 5px;
}

.qmp-summary-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.qmp-summary-detail {
    font-size: 13px;
    color: #9ca3af;
}

.qmp-topics-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.qmp-topics-section h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #2c3e50;
}

.qmp-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.qmp-topic-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #e5e7eb;
}

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

.qmp-topic-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.qmp-topic-accuracy {
    font-size: 24px;
    font-weight: 700;
}

.qmp-accuracy-excellent {
    color: #10b981;
}

.qmp-accuracy-good {
    color: #3b82f6;
}

.qmp-accuracy-needs-work {
    color: #f59e0b;
}

.qmp-accuracy-critical {
    color: #ef4444;
}

/* Estadísticas internas de topic-card (user-statistics) */
.qmp-topic-card-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.qmp-topic-stat {
    text-align: center;
}

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

.qmp-topic-stat-label {
    font-size: 12px;
    color: #6b7280;
}

.qmp-topic-progress-bar {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.qmp-topic-progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.qmp-progress-excellent {
    background: #10b981;
}

.qmp-progress-good {
    background: #3b82f6;
}

.qmp-progress-needs-work {
    background: #f59e0b;
}

.qmp-progress-critical {
    background: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .qmp-stats-header {
        padding: 30px 20px;
    }
    
    .qmp-stats-header h1 {
        font-size: 24px;
    }
    
    .qmp-stats-summary {
        grid-template-columns: 1fr;
    }
    
    .qmp-topics-grid {
        grid-template-columns: 1fr;
    }
    
    .qmp-summary-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ========== Statistics - Estilos Adicionales ========== */

/* Topics Stats Grid */
.qmp-topics-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.qmp-topic-stat-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
}

.qmp-topic-excellent {
    border-left-color: #27ae60;
}

.qmp-topic-good {
    border-left-color: #3498db;
}

.qmp-topic-average {
    border-left-color: #f39c12;
}

.qmp-topic-weak {
    border-left-color: #e74c3c;
}

.qmp-topic-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.qmp-topic-stat-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.qmp-performance-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.qmp-performance-badge-excellent {
    background: #27ae60 !important;
}

.qmp-performance-badge-good {
    background: #3498db !important;
}

.qmp-performance-badge-average {
    background: #f39c12 !important;
}

.qmp-performance-badge-weak {
    background: #e74c3c !important;
}

.qmp-topic-stat-body {
    display: flex;
    gap: 25px;
    align-items: center;
    margin-bottom: 20px;
}

/* Circular Progress */
.qmp-circular-progress {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

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

.qmp-circular-percent {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.qmp-topic-stat-details {
    flex: 1;
}

.qmp-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
}

.qmp-stat-row:last-child {
    border-bottom: none;
}

.qmp-stat-label {
    font-size: 14px;
    color: #6b7280;
}

.qmp-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.qmp-topic-recommendation {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.qmp-topic-recommendation strong {
    color: #856404;
    display: block;
    margin-bottom: 5px;
}

.qmp-topic-recommendation p {
    margin: 0;
    color: #856404;
    font-size: 13px;
}

/* Attempts Table */
.qmp-attempts-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qmp-attempts-table table {
    width: 100%;
    border-collapse: collapse;
}

.qmp-attempts-table thead {
    background: #f8f9fa;
}

.qmp-attempts-table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    border-bottom: 2px solid #dee2e6;
}

.qmp-attempts-table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s;
}

.qmp-attempts-table tbody tr:hover {
    background-color: #f8f9fa;
}

.qmp-attempts-table tbody td {
    padding: 15px;
    font-size: 14px;
    color: #495057;
}

.qmp-attempts-table tbody td small {
    color: #6c757d;
    font-size: 12px;
}

.qmp-score-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
}

.qmp-score-high {
    background: #d4edda;
    color: #155724;
}

.qmp-score-low {
    background: #f8d7da;
    color: #721c24;
}

.qmp-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.qmp-status-passed {
    background: #28a745;
    color: white;
}

.qmp-status-failed {
    background: #dc3545;
    color: white;
}

.qmp-btn-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.qmp-btn-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Summary Value with Dynamic Color */
.qmp-summary-value-positive {
    color: #27ae60;
}

.qmp-summary-value-negative {
    color: #e74c3c;
}

/* Responsive */
@media (max-width: 768px) {
    .qmp-topics-stats {
        grid-template-columns: 1fr;
    }
    
    .qmp-topic-stat-body {
        flex-direction: column;
        gap: 15px;
    }
    
    .qmp-attempts-table {
        overflow-x: auto;
    }
    
    .qmp-attempts-table table {
        min-width: 600px;
    }
}

/* ========== Contests Page - Estilos Completos ========== */

/* Page Header */
.qmp-page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.qmp-page-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    color: white;
}

.qmp-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* Contest Card Icon */
.qmp-contest-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 15px;
}

/* Contest Description */
.qmp-contest-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0 15px 0;
}

/* Contest Meta Info */
.qmp-contest-meta {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 15px 0;
    font-size: 14px;
    color: #6b7280;
}

.qmp-contest-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Contest Detail View */
.qmp-contest-detail {
    max-width: 1200px;
    margin: 0 auto;
}

/* Breadcrumb */
.qmp-breadcrumb {
    margin-bottom: 30px;
}

.qmp-breadcrumb a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.qmp-breadcrumb a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Contest Header Detail */
.qmp-contest-header-detail {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    margin-bottom: 40px;
    align-items: start;
}

.qmp-contest-info-detail h2 {
    margin: 0 0 15px 0;
    font-size: 28px;
    color: #2c3e50;
}

.qmp-contest-info-detail p {
    margin: 0;
    color: #6b7280;
    line-height: 1.6;
}

/* Progress Card */
.qmp-progress-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 200px;
}

.qmp-progress-card h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #2c3e50;
}

/* Progress Circle */
.qmp-progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
}

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

.qmp-progress-percent {
    font-size: 24px;
    font-weight: 700;
    color: #3498db;
}

.qmp-progress-stats {
    font-size: 14px;
    color: #6b7280;
}

.qmp-progress-stats p {
    margin: 5px 0;
}

.qmp-progress-stats strong {
    color: #2c3e50;
}

/* Quizzes Section */
.qmp-quizzes-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qmp-quizzes-section h3 {
    margin: 0 0 20px 0;
    font-size: 22px;
    color: #2c3e50;
}

/* Quiz Card */
.qmp-quiz-card {
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.qmp-quiz-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.qmp-quiz-main {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
    gap: 20px;
}

.qmp-quiz-info {
    flex: 1;
}

.qmp-quiz-info h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #2c3e50;
}

.qmp-quiz-description {
    color: #6b7280;
    font-size: 14px;
    margin: 10px 0;
    line-height: 1.5;
}

.qmp-quiz-meta {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
}

.qmp-quiz-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Quiz Status */
.qmp-quiz-status {
    text-align: right;
}

.qmp-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.qmp-badge-success {
    background: #d4edda;
    color: #155724;
}

.qmp-badge-warning {
    background: #fff3cd;
    color: #856404;
}

.qmp-badge-new {
    background: #e7f3ff;
    color: #0056b3;
}

.qmp-last-score {
    font-size: 13px;
    color: #6b7280;
    margin: 5px 0;
}

.qmp-last-score strong {
    color: #2c3e50;
    font-size: 16px;
}

.qmp-last-date {
    font-size: 12px;
    color: #9ca3af;
    margin: 5px 0;
}

/* Quiz Actions */
.qmp-quiz-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.qmp-btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .qmp-page-header h1 {
        font-size: 24px;
    }
    
    .qmp-contest-header-detail {
        grid-template-columns: 1fr;
    }
    
    .qmp-progress-card {
        margin-top: 20px;
    }
    
    .qmp-quiz-main {
        flex-direction: column;
    }
    
    .qmp-quiz-status {
        text-align: left;
    }
    
    .qmp-quiz-actions {
        flex-direction: column;
    }
    
    .qmp-quiz-actions .qmp-btn {
        width: 100%;
        text-align: center;
    }
    
    .qmp-contest-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* ========== User Dashboard - Estilos Faltantes ========== */

/* Secciones del dashboard */
.qmp-section-content {
    padding: 20px 0;
}

/* Topic emoji y detalles */
.qmp-topic-emoji {
    font-size: 32px;
    margin-right: 12px;
}

.qmp-topic-details {
    font-size: 13px;
    color: var(--qmp-gray-600);
    margin-top: 8px;
}

/* Cards de intentos recientes */
.qmp-attempt-card {
    background: white;
    border-radius: var(--qmp-border-radius);
    padding: 20px;
    box-shadow: var(--qmp-shadow-sm);
    margin-bottom: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.qmp-attempt-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--qmp-shadow-md);
}

.qmp-attempt-card.qmp-passed {
    border-left: 4px solid var(--qmp-success);
}

.qmp-attempt-card.qmp-failed {
    border-left: 4px solid var(--qmp-danger);
}

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

.qmp-attempt-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--qmp-gray-900);
}

.qmp-attempt-date {
    font-size: 13px;
    color: var(--qmp-gray-500);
}

.qmp-attempt-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.qmp-attempt-score {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.qmp-attempt-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.qmp-attempt-status.qmp-passed {
    background: var(--qmp-success-light);
    color: var(--qmp-success);
}

.qmp-attempt-status.qmp-failed {
    background: var(--qmp-danger-light);
    color: var(--qmp-danger);
}

.qmp-attempt-actions {
    text-align: right;
}

.qmp-view-results-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--qmp-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--qmp-border-radius);
    font-weight: 600;
    transition: background 0.2s;
}

.qmp-view-results-btn:hover {
    background: var(--qmp-primary-dark);
    color: white;
}

/* Acciones del dashboard */
.qmp-dashboard-actions {
    margin-top: 40px;
}

.qmp-dashboard-actions h2 {
    margin-bottom: 20px;
    color: var(--qmp-gray-900);
}

/* ========== Estadísticas por Concurso ========== */

.qmp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--qmp-primary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 15px;
    transition: gap 0.2s;
}

.qmp-back-link:hover {
    gap: 10px;
    color: var(--qmp-primary-dark);
}

.qmp-contests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.qmp-contest-stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px solid transparent;
    transition: all 0.3s;
}

.qmp-contest-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.qmp-contest-stat-card.qmp-excellent {
    border-color: var(--qmp-success);
}

.qmp-contest-stat-card.qmp-good {
    border-color: var(--qmp-primary);
}

.qmp-contest-stat-card.qmp-needs-work {
    border-color: var(--qmp-warning);
}

.qmp-contest-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--qmp-gray-100);
}

.qmp-contest-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--qmp-gray-900);
    flex: 1;
}

.qmp-contest-attempts-badge {
    background: var(--qmp-gray-100);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--qmp-gray-700);
}

.qmp-contest-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.qmp-mini-stat {
    background: var(--qmp-gray-50);
    padding: 12px;
    border-radius: 8px;
}

.qmp-mini-stat-label {
    font-size: 12px;
    color: var(--qmp-gray-600);
    margin-bottom: 4px;
}

.qmp-mini-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--qmp-gray-900);
}

.qmp-mini-stat-percent {
    font-size: 14px;
    font-weight: 600;
    color: var(--qmp-primary);
    margin-top: 2px;
}

.qmp-contest-actions {
    margin-top: 20px;
}

.qmp-btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .qmp-contests-grid {
        grid-template-columns: 1fr;
    }
    
    .qmp-contest-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   v3.11.0: Estilos para preguntas sin responder
   ============================================ */

/* Icono de sin responder en summary */
.qmp-icon-unanswered {
    color: #94a3b8;
    font-size: 32px;
}

/* Card de revisión sin responder */
.qmp-review-question.qmp-unanswered {
    border-left-color: #cbd5e1;
    background: #f8fafc;
}

/* Status de sin responder */
.qmp-status-unanswered {
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
}

/* Texto gris para preguntas no respondidas */
.qmp-review-question.qmp-unanswered .qmp-question-text {
    color: #64748b;
}

.qmp-review-question.qmp-unanswered .qmp-question-number-badge {
    background: #e2e8f0;
    color: #64748b;
}

.qmp-option-partial-selected {
    border-color: #d97706 !important;
    background: rgba(217, 119, 6, 0.08) !important;
}

.qmp-option-partial-selected .qmp-option-indicator span,
.qmp-option-partial-selected .qmp-indicator-correct {
    color: #d97706 !important;
}