:root {
  --green: #33ff66;
  --green-dim: #1f9e44;
  --green-faint: #156030;
  --amber: #ffb000;
  --bg: #020603;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
}

body {
  display: flex;
  justify-content: center;
  padding: 24px 16px;
  font-family: "Roboto Mono", "SF Mono", "Courier New", monospace;
}

#screen {
  width: 100%;
  max-width: 880px;
  min-height: calc(100vh - 48px);
  color: var(--green);
  background:
    repeating-linear-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 1px, rgba(0, 0, 0, 0.25) 2px, rgba(0, 0, 0, 0.25) 3px),
    var(--bg);
  padding: 20px 20px 16px;
  font-size: clamp(14px, 2.1vw, 17px);
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-shadow: 0 0 4px rgba(51, 255, 102, 0.55);
  display: flex;
  flex-direction: column;
}

#output {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

#output .dim { color: var(--green-dim); }
#output .faint { color: var(--green-faint); }
#output .amber { color: var(--amber); font-weight: 700; }
#output .error { color: #ff5a4e; }

#line {
  display: flex;
  align-items: center;
  gap: 8px;
}

#prompt {
  flex: none;
  color: var(--green);
}

#cmd {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--green);
  caret-color: var(--green);
  font: inherit;
  text-shadow: inherit;
}

#cmd:disabled { opacity: 0.4; }

@media (prefers-reduced-motion: no-preference) {
  #screen { animation: flicker 7s infinite; }
}

@keyframes flicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.94; }
  98% { opacity: 1; }
  99% { opacity: 0.97; }
}
