:root {
  --bg: #011641;
  --bg-deep: #020c1f;
  --bg-card: #0a1e4a;
  --primary: #837afa;
  --lila: #cf7bea;
  --pink: #f2055d;
  --text: #ffffff;
  --muted: #5c7099;
  --border: rgba(131, 122, 250, 0.12);
  --pr: 131, 122, 250;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 100%);
  background-attachment: fixed;
}
h1, h2, .marca { font-family: "Orbitron", "Poppins", sans-serif; letter-spacing: 0.02em; }
.marca { font-weight: 900; font-size: 1rem; }
.contenedor { max-width: 560px; margin: 0 auto; padding: 24px 16px 48px; }
a { color: var(--primary); }

/* Pantallas */
[data-pantalla][hidden] { display: none; }
.entra { animation: entra 240ms ease-out; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .entra { animation: none; } }

.cabecera { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.eyebrow { color: var(--primary); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; margin: 0 0 8px; }
h1 { font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1.15; margin: 0 0 12px; font-weight: 900; }
h2 { font-size: clamp(1.15rem, 4.6vw, 1.5rem); line-height: 1.3; margin: 0 0 20px; font-weight: 700; }
p { line-height: 1.55; margin: 0 0 14px; }
.muted { color: var(--muted); }
.tarjeta { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }

.boton {
  display: block; width: 100%; min-height: 56px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--primary); color: #fff; font: 600 1rem "Poppins", sans-serif;
  box-shadow: 0 8px 28px rgba(var(--pr), 0.35); transition: transform 120ms ease, opacity 120ms ease;
}
.boton:active { transform: scale(0.98); }
.boton:disabled { opacity: 0.6; cursor: wait; }
.boton.secundario { background: transparent; color: var(--primary); box-shadow: none; border: 1px solid rgba(var(--pr), 0.35); }
.boton.texto { background: transparent; color: var(--muted); box-shadow: none; min-height: 44px; }

/* Avance */
.avance { height: 4px; background: rgba(var(--pr), 0.15); border-radius: 2px; overflow: hidden; margin: 4px 0 24px; }
.avance > i { display: block; height: 100%; background: var(--primary); transition: width 220ms ease; }

/* Opciones */
.opciones { display: grid; gap: 10px; margin-bottom: 20px; }
.opcion {
  width: 100%; min-height: 56px; text-align: left; padding: 14px 16px; border-radius: 14px; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text); font: 500 1rem "Poppins", sans-serif;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}
.opcion:active { transform: scale(0.99); }
.opcion.elegida, .opcion:hover { border-color: var(--primary); background: rgba(var(--pr), 0.12); }

/* Candado */
.candado { display: grid; gap: 14px; }
.candado label { display: grid; gap: 6px; font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.candado input:not([type="checkbox"]) {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; font: 400 1rem "Poppins", sans-serif;
  background: var(--bg-deep); color: var(--text); border: 1px solid var(--border); outline: none;
}
.candado input:focus { border-color: var(--primary); }
.candado input.mal { border-color: var(--pink); }
.candado .casilla { grid-template-columns: 22px 1fr; align-items: center; color: var(--text); font-weight: 400; }
.candado .casilla input { width: 20px; height: 20px; accent-color: var(--primary); }
.candado .error { color: var(--pink); margin: 0; font-size: 0.9rem; }

/* Resultado */
.puntaje { font-family: "Orbitron", sans-serif; font-weight: 900; font-size: clamp(3.2rem, 18vw, 5rem); line-height: 1; color: var(--primary); margin: 8px 0 0; }
.nivel { font-family: "Orbitron", sans-serif; font-weight: 700; font-size: 1.1rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 6px 0 20px; }
.radar { width: min(100%, 320px); height: auto; display: block; margin: 0 auto 16px; }
.radar-malla { fill: none; stroke: rgba(var(--pr), 0.25); stroke-width: 1; }
.radar-area { fill: rgba(var(--pr), 0.28); stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; }
.radar-texto { fill: #fff; font: 600 12px "Poppins", sans-serif; }
.diagnostico { display: grid; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.diagnostico li { padding-left: 18px; position: relative; line-height: 1.5; }
.diagnostico li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--lila); }

.pie { margin-top: 32px; color: var(--muted); font-size: 0.8rem; text-align: center; }

@media (min-width: 900px) {
  .contenedor { padding-top: 56px; }
  .tarjeta { padding: 28px; }
}
