:root {
  color-scheme: dark;
  font-family: "Courier New", Courier, monospace;
  background: #090d0b;
  color: #d8f5c2;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(49, 92, 58, 0.2), transparent 55%),
    #090d0b;
}

.game-shell {
  width: min(100%, 900px);
  border: 1px solid #38543b;
  background: #0d120f;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.title-bar {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid #293b2c;
  color: #a8d987;
}

.title-bar h1 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.status-light {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #9ce56b;
  box-shadow: 0 0 10px rgba(156, 229, 107, 0.7);
}

.edition {
  margin-left: auto;
  color: #718674;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.terminal {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(255, 255, 255, 0.012) 50%, transparent 50%),
    #080b09;
  background-size: 100% 4px;
}

.terminal-output {
  height: min(62vh, 560px);
  min-height: 340px;
  overflow-y: auto;
  padding: 24px;
  color: #d8f5c2;
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.output-line {
  min-height: 1.75em;
}

.command-form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid #293b2c;
  background: #0d120f;
}

.prompt-label {
  color: #9ce56b;
  font-size: 18px;
  font-weight: 700;
}

.command-form input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #efffe7;
  font: inherit;
  font-size: 16px;
  caret-color: #9ce56b;
}

.command-form input:focus-visible {
  outline: 1px solid #567d4f;
  outline-offset: 5px;
}

button {
  border: 1px solid #557348;
  padding: 9px 13px;
  background: #17251a;
  color: #c5efa9;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

button:hover {
  border-color: #9ce56b;
  background: #203624;
}

button:focus-visible {
  outline: 2px solid #9ce56b;
  outline-offset: 3px;
}

.footer {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 18px;
  border-top: 1px solid #293b2c;
  color: #718674;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.footer form {
  margin: 0;
}

.restart-button {
  padding: 7px 10px;
  color: #9cad92;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .title-bar {
    padding: 0 12px;
  }

  .title-bar h1 {
    font-size: 11px;
  }

  .edition {
    font-size: 8px;
  }

  .terminal-output {
    height: 64vh;
    min-height: 300px;
    padding: 18px 14px;
    font-size: 14px;
  }

  .command-form {
    padding: 12px;
  }

  .footer {
    padding: 8px 12px;
    font-size: 8px;
  }
}
