:root {
  --bg: #000000;
  --text: #22ff66;
  --text-dim: #0fa644;
  --frame: #0b2a16;
  --accent: #33ff88;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Courier New", "Lucida Console", "Courier", monospace;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: block;
  text-shadow: 0 0 6px rgba(34, 255, 102, 0.35);
  overflow: hidden;
}

.game {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto auto;
  gap: 16px;
  padding: 0;
  background: #020202;
  border: 1px solid var(--frame);
  box-shadow: 0 0 0 2px #000, 0 0 20px rgba(34, 255, 102, 0.12);
  border-radius: 0;
}

.output {
  background: #000000;
  border-bottom: 1px solid var(--frame);
  border-radius: 4px;
  padding: 16px;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  line-height: 1.5;
}

.output p {
  margin: 0 0 10px;
  white-space: pre-line;
}

.output pre {
  margin: 0 0 10px;
  font-family: inherit;
  white-space: pre;
  color: var(--text);
}

.command {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 0 16px 16px;
}

.command__label {
  font-size: 1.1rem;
  color: var(--accent);
}

.command__input {
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid var(--frame);
  font-size: 1rem;
  background: #000;
  color: var(--text);
}

.command__input:focus {
  outline: 1px solid var(--accent);
}

.command__button {
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid var(--frame);
  background: #020202;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
}

.sidebar {
  border-top: 1px dashed var(--frame);
  padding: 12px 16px 16px;
  display: grid;
  gap: 32px;
}

.home-link {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--frame);
  background: #000;
  color: var(--text);
  display: grid;
  place-items: center;
  text-decoration: none;
  box-shadow: 0 0 12px rgba(34, 255, 102, 0.25);
}

.home-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.panel h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--accent);
}

.inventory {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.inventory li {
  padding: 6px 10px;
  border-radius: 4px;
  background: #020202;
  border: 1px solid var(--frame);
}

@media (min-width: 820px) {
  .game {
    grid-template-columns: 2.4fr 1fr;
    grid-template-rows: 1fr auto;
    grid-template-areas:
      "output sidebar"
      "command sidebar";
  }

  .game__header {
    grid-area: header;
  }

  .output {
    grid-area: output;
  }

  .command {
    grid-area: command;
  }

  .sidebar {
    grid-area: sidebar;
    border-top: none;
    border-left: 1px dashed var(--frame);
    padding-left: 16px;
    padding-top: 16px;
  }
}
