/* Pantalla CRT: solo adorno visual. Nada aquí cambia el texto (sin text-transform ni content). */
:root { --glow: #33ff66; --bezel: #111; }
body[data-phosphor="amber"] { --glow: #ffb000; }
html { background: #000; color: var(--glow); font-family: Menlo, Consolas, monospace; }
body { margin: 0; padding: 1rem; display: flex; justify-content: center; }
main { width: max-content; max-width: 100%; }
.sr-only { position: absolute; left: -10000px; }

.crt {
  position: relative;
  padding: 1rem;
  background: #050a05;
  border: 0.6rem solid var(--bezel);
  border-radius: 1.2rem;
  box-shadow: 0 0 2rem color-mix(in srgb, var(--glow) 35%, transparent), inset 0 0 3rem #000;
  overflow-x: auto;
  animation: flicker 6s infinite steps(1);
}
#screen { width: 80ch; min-height: 24rem; }
#screen .xterm-rows { text-shadow: 0 0 4px var(--glow); }
.xterm .xterm-viewport { background: transparent !important; }

/* Líneas de barrido y viñeta sobre el cristal; no capturan el ratón. */
.glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 0.8rem;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.25) 2px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  47% { opacity: 0.97; }
  50% { opacity: 0.93; }
  53% { opacity: 0.98; }
}
@media (prefers-reduced-motion: reduce) {
  .crt { animation: none; }
}

#fallback, .controls { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.6rem; flex-wrap: wrap; }
#fallback input { flex: 1; min-width: 12rem; }
input, select, button {
  font: inherit;
  color: var(--glow);
  background: #050a05;
  border: 1px solid var(--glow);
  padding: 0.25rem 0.5rem;
}
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
button:hover { background: color-mix(in srgb, var(--glow) 20%, #050a05); }
.hint { color: var(--glow); margin: 0.6rem 0 0; }
[hidden] { display: none !important; }
