* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f3f6fb;
  color: #1f2937;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.header {
  background: #0f172a;
  color: white;
  padding: 24px;
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.header h1 {
  margin: 0;
  font-size: 32px;
}

.header p {
  margin: 6px 0 0;
  color: #cbd5e1;
}

.badge {
  background: #14b8a6;
  color: white;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: bold;
}

.card {
  background: white;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 20px;
}

.descripcion {
  color: #4b5563;
  line-height: 1.6;
}

.grid-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.menu-card {
  border: 1px solid #dbe3ef;
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  text-align: left;
  cursor: pointer;
  transition: 0.2s;
}

.menu-card:hover {
  transform: translateY(-3px);
  border-color: #14b8a6;
  box-shadow: 0 8px 20px rgba(20, 184, 166, 0.15);
}

.menu-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 10px;
  color: #0f172a;
}

.menu-card span {
  color: #64748b;
  line-height: 1.5;
}

.lista-examenes {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.examen-card {
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 18px;
  background: #f8fafc;
}

.examen-card h3 {
  margin: 0 0 8px;
}

.examen-card p {
  margin: 4px 0;
  color: #475569;
}

.acciones {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

button {
  font-size: 16px;
}

.btn-principal {
  background: #0f172a;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
}

.btn-principal:hover {
  background: #1e293b;
}

.btn-secundario {
  background: #e2e8f0;
  color: #0f172a;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
}

.btn-secundario:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.barra-superior {
  display: flex;
  justify-content: space-between;
  background: #f1f5f9;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-weight: bold;
}

.tema {
  color: #0f766e;
  font-weight: bold;
  margin-bottom: 10px;
}

.texto-pregunta {
  white-space: pre-line;
  line-height: 1.7;
  font-size: 17px;
}

.alternativas {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.alternativa {
  width: 100%;
  text-align: left;
  border: 1px solid #cbd5e1;
  background: white;
  padding: 16px;
  border-radius: 12px;
  cursor: pointer;
  line-height: 1.5;
}

.alternativa:hover {
  border-color: #0f766e;
  background: #f0fdfa;
}

.alternativa.correcta {
  border-color: #16a34a;
  background: #dcfce7;
}

.alternativa.incorrecta {
  border-color: #dc2626;
  background: #fee2e2;
}

.retroalimentacion {
  margin-top: 22px;
  border-left: 5px solid #14b8a6;
  background: #f0fdfa;
  padding: 18px;
  border-radius: 12px;
  line-height: 1.6;
}

.resultado-box {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  padding: 20px;
  border-radius: 14px;
  font-size: 18px;
  line-height: 1.7;
}

.footer {
  text-align: center;
  color: #64748b;
  font-size: 14px;
  padding: 18px;
}

.oculto {
  display: none;
}

@media (max-width: 768px) {
  .app {
    padding: 14px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .grid-menu {
    grid-template-columns: 1fr;
  }

  .barra-superior {
    flex-direction: column;
    gap: 8px;
  }
}
.alternativa:disabled {
  opacity: 1;
  color: #1f2937;
  cursor: default;
}

.alternativa.correcta:disabled {
  color: #166534;
}

.alternativa.incorrecta:disabled {
  color: #991b1b;
}
.alternativa.seleccionada {
  border-color: #0f172a;
  background: #e0f2fe;
  font-weight: bold;
}

.cronometro {
  color: #b91c1c;
  font-weight: bold;
}

.alternativa:disabled {
  opacity: 1;
  color: #1f2937;
  cursor: default;
}

.alternativa.correcta:disabled {
  color: #166534;
}

.alternativa.incorrecta:disabled {
  color: #991b1b;
}
.revision-lista {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.revision-card {
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 18px;
  background: #f8fafc;
}

.revision-card.correcta {
  border-left: 6px solid #16a34a;
}

.revision-card.incorrecta {
  border-left: 6px solid #dc2626;
}

.revision-card.sin-responder {
  border-left: 6px solid #f59e0b;
}

.revision-card h3 {
  margin-top: 0;
}

.revision-estado {
  font-weight: bold;
  margin-bottom: 10px;
}

.revision-alternativas {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.revision-alternativa {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: white;
}

.revision-alternativa.correcta {
  background: #dcfce7;
  border-color: #16a34a;
}

.revision-alternativa.usuario-error {
  background: #fee2e2;
  border-color: #dc2626;
}

.explicacion {
  background: #eefaf8;
  border-radius: 12px;
  padding: 14px;
  line-height: 1.6;
}
.historial-lista {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.historial-card {
  border: 1px solid #dbe3ef;
  background: #f8fafc;
  border-radius: 14px;
  padding: 18px;
}

.historial-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.historial-meta {
  color: #475569;
  line-height: 1.6;
}

.historial-resumen {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.historial-dato {
  background: white;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.historial-dato strong {
  display: block;
  font-size: 20px;
  color: #0f172a;
}

.historial-dato span {
  color: #64748b;
  font-size: 13px;
}

.historial-falladas {
  margin-top: 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 12px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .historial-resumen {
    grid-template-columns: 1fr 1fr;
  }
}
.form-acceso {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  max-width: 420px;
}

.form-acceso label {
  font-weight: bold;
}

.form-acceso input {
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 16px;
}

.form-acceso input:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.mensaje-acceso {
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  line-height: 1.6;
}

.mensaje-acceso.error {
  background: #fee2e2;
  border: 1px solid #dc2626;
  color: #7f1d1d;
}

.mensaje-acceso.ok {
  background: #dcfce7;
  border: 1px solid #16a34a;
  color: #14532d;
}

.licencia-box {
  background: #f0fdfa;
  border: 1px solid #14b8a6;
  border-radius: 14px;
  padding: 14px;
  margin-top: 18px;
  margin-bottom: 18px;
  line-height: 1.6;
}
.marca-agua {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.06;
  font-size: 28px;
  font-weight: bold;
  color: #0f172a;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  padding: 60px;
  transform: rotate(-18deg);
  line-height: 1.4;
}

.marca-agua.oculto {
  display: none;
}
.imagen-pregunta-box {
  margin: 18px 0;
  text-align: center;
}

.imagen-pregunta {
  max-width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: white;
  padding: 8px;
}
.retroalimentacion hr,
.explicacion hr {
  border: none;
  border-top: 1px solid #99f6e4;
  margin: 16px 0;
}

.retroalimentacion ul,
.explicacion ul {
  padding-left: 22px;
}

.retroalimentacion li,
.explicacion li {
  margin-bottom: 8px;
}
.panel-navegacion {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0 24px;
}

.panel-navegacion-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  color: #0f172a;
}

#resumen-navegacion {
  font-size: 14px;
  color: #475569;
}

.lista-navegacion-preguntas {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
}

.btn-nav-pregunta {
  border: 1px solid #cbd5e1;
  background: white;
  color: #0f172a;
  border-radius: 10px;
  padding: 10px 0;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.btn-nav-pregunta:hover {
  transform: translateY(-1px);
  border-color: #14b8a6;
}

.btn-nav-pregunta.actual {
  background: #0f172a;
  color: white;
  border-color: #0f172a;
}

.btn-nav-pregunta.respondida {
  background: #dcfce7;
  border-color: #16a34a;
  color: #14532d;
}

.btn-nav-pregunta.sin-responder {
  background: #fff7ed;
  border-color: #f59e0b;
  color: #7c2d12;
}

.btn-nav-pregunta.actual.respondida {
  background: #0f172a;
  color: white;
  border-color: #0f172a;
}

.leyenda-navegacion {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  font-size: 13px;
  color: #475569;
}

.leyenda-navegacion span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
}

.nav-dot.actual {
  background: #0f172a;
}

.nav-dot.respondida {
  background: #16a34a;
}

.nav-dot.sin-responder {
  background: #f59e0b;
}

@media (max-width: 768px) {
  .lista-navegacion-preguntas {
    grid-template-columns: repeat(5, 1fr);
  }

  .panel-navegacion-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
.alternativa.seleccionada {
  border-color: #0f172a;
  background: #e0f2fe;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.respuesta-seleccionada {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #60a5fa;
  color: #1e3a8a;
  font-weight: 700;
}
.resumen-temas {
  margin-top: 22px;
}

.resumen-temas h3 {
  margin-bottom: 14px;
  color: #0f172a;
}

.tema-card {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.tema-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.tema-card-header strong {
  color: #0f172a;
}

.tema-porcentaje {
  font-weight: 800;
  color: #0f766e;
}

.tema-detalle {
  font-size: 14px;
  color: #334155;
  line-height: 1.6;
}

.barra-tema {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}

.barra-tema-progreso {
  height: 100%;
  background: #14b8a6;
  border-radius: 999px;
}

.tema-reforzar {
  border-color: #f59e0b;
  background: #fffbeb;
}

.tema-reforzar .tema-porcentaje {
  color: #b45309;
}
.temas-prioritarios {
  margin-top: 22px;
  padding: 18px;
  border-radius: 16px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
}

.temas-prioritarios h3 {
  margin-bottom: 10px;
  color: #92400e;
}

.temas-prioritarios p {
  color: #78350f;
  line-height: 1.6;
}

.temas-prioritarios ol {
  margin-top: 12px;
  padding-left: 22px;
}

.temas-prioritarios li {
  margin-bottom: 8px;
  color: #78350f;
}

.temas-prioritarios strong {
  color: #0f172a;
}
@media print {
  body {
    background: white;
    color: #000;
  }

  .app {
    max-width: 100%;
    padding: 0;
  }

  .header {
    background: white;
    color: #000;
    border: 1px solid #d1d5db;
    box-shadow: none;
  }

  .header p {
    color: #374151;
  }

  .badge {
    background: #e5e7eb;
    color: #111827;
  }

  .card {
    box-shadow: none;
    border: none;
    padding: 18px;
  }

  .acciones,
  .footer,
  .panel-navegacion,
  .barra-superior,
  .marca-agua {
    display: none !important;
  }

  #pantalla-resultados {
    display: block !important;
  }

  .resultado-box,
  .tema-card,
  .temas-prioritarios {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .barra-tema {
    border: 1px solid #d1d5db;
  }

  .barra-tema-progreso {
    background: #111827 !important;
  }

  @page {
    margin: 1.5cm;
  }
}
.ayuda-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.ayuda-card {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 16px;
}

.ayuda-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: #0f172a;
}

.ayuda-card p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .ayuda-grid {
    grid-template-columns: 1fr;
  }
}
.menu-card.bloqueada {
  opacity: 0.75;
  background: #f8fafc;
  border-style: dashed;
}

.menu-card.bloqueada:hover {
  transform: none;
  border-color: #cbd5e1;
  box-shadow: none;
}

.estado-acceso {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-style: normal;
  font-weight: bold;
  padding: 6px 10px;
  border-radius: 999px;
}

.estado-acceso.disponible {
  background: #dcfce7;
  color: #166534;
}

.estado-acceso.bloqueado {
  background: #fee2e2;
  color: #991b1b;
}