:root {
  color-scheme: dark;
  --green: #70ff80;
  --dim-green: #43b65a;
  --background: #031007;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 40px);
  background: #080b09;
  color: var(--green);
  font-family: "Courier New", monospace;
}

.terminal {
  width: min(100%, 1000px);
  overflow: hidden;
  border: 2px solid #24482c;
  border-radius: 20px;
  background: var(--background);
  box-shadow:
    0 0 35px #36ff6020,
    0 20px 60px #0009;
  text-shadow: 0 0 6px #70ff8070;
}

header,
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

header {
  border-bottom: 1px solid #235330;
}

footer {
  border-top: 1px solid #235330;
  color: var(--dim-green);
}

.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: clamp(280px, 65dvh, 720px);
  padding: clamp(18px, 4vw, 40px);
  background: radial-gradient(
    ellipse at center,
    #0d2913 0%,
    var(--background) 80%
  );
}

/* Decorative scan lines; typing and selection pass through. */
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    #0003 2px,
    #0003 4px
  );
  box-shadow: inset 0 0 65px #0008;
}

label {
  margin-bottom: 20px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

textarea {
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 3px;
  resize: none;
  background: transparent;
  color: var(--green);
  caret-color: var(--green);
  font: inherit;
  font-size: clamp(16px, 2.2vw, 21px);
  line-height: 1.6;
  text-shadow: 0 0 5px #70ff8080;
  scrollbar-color: #327941 var(--background);
}

textarea::placeholder {
  color: var(--dim-green);
  opacity: 1;
}

textarea::selection {
  background: var(--green);
  color: var(--background);
  text-shadow: none;
}

button {
  padding: 8px 12px;
  border: 1px solid var(--dim-green);
  border-radius: 3px;
  background: transparent;
  color: var(--green);
  font: inherit;
  cursor: pointer;
}

button:hover {
  background: #70ff8018;
}

textarea:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

textarea {
  caret-color: var(--green);
  caret-shape: block;
}

