* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: #020402;
}

body {
  color: #7cff7c;
  font-family: "Consolas", monospace;
  overflow: hidden;
}

.screen {
  position: relative;
  min-height: 100vh;
  padding: clamp(20px, 5vw, 56px);
  background:
    radial-gradient(circle at center, rgba(124, 255, 124, 0.055), transparent 55%),
    #020402;
}

.terminal {
  position: relative;
  max-width: 900px;
  margin: 6vh auto 0;
  padding: 28px;
  color: #7cff7c;
  text-shadow: 0 0 6px rgba(124, 255, 124, 0.42);
  font-size: clamp(16px, 2.2vw, 22px);
  line-height: 1.35;
}

#output {
  margin: 0;
  white-space: pre-wrap;
  min-height: 18em;
}

.input-line {
  display: flex;
  align-items: center;
  gap: 0.45em;
}

.prompt {
  color: #7cff7c;
}

#commandInput {
  flex: 0 0 auto;
  width: 1ch;
  min-width: 1ch;
  border: 0;
  padding-left: 0.15em;
  outline: 0;
  background: transparent;
  color: #7cff7c;
  font: inherit;
  text-shadow: 0 0 6px rgba(124, 255, 124, 0.42);
  caret-color: transparent;
}

.cursor {
  width: 0.65em;
  height: 1.15em;
  background: #7cff7c;
  box-shadow: 0 0 8px rgba(124, 255, 124, 0.75);
  animation: blink 1s steps(1) infinite;
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.14;
  background: repeating-linear-gradient(
    to bottom,
    rgba(124, 255, 124, 0.12),
    rgba(124, 255, 124, 0.12) 1px,
    transparent 1px,
    transparent 4px
  );
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (max-width: 640px) {
  .terminal {
    padding: 12px;
    margin-top: 3vh;
  }
}
