:root {
  color-scheme: dark;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  background: #07100d;
  color: #d2e2d8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --green: #9df7b7;
  --bright-green: #c0ffd0;
  --muted: #80958a;
  --border: #294238;
  --panel: #0c1712;
  --gold: #f0c674;
  --red: #ff7e7e;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 0, rgb(44 97 65 / 15%), transparent 55%),
    linear-gradient(135deg, #07100d, #090d10 54%, #0a1010);
}

body::before {
  position: fixed;
  z-index: -1;
  background-image: radial-gradient(rgb(157 247 183 / 10%) 0.7px, transparent 0.7px);
  background-size: 24px 24px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
}

button,
input {
  font: inherit;
}

.page {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1rem;
}

.terminal {
  display: flex;
  flex: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #385a48;
  background: rgb(8 16 12 / 96%);
  box-shadow:
    0 28px 90px rgb(0 0 0 / 50%),
    0 0 54px rgb(62 188 104 / 8%),
    inset 0 1px rgb(255 255 255 / 3%);
}

.titlebar {
  display: flex;
  height: 43px;
  align-items: center;
  justify-content: flex-start;
  padding: 0 15px;
  border-bottom: 1px solid #26392f;
  background: linear-gradient(180deg, #17221c, #111a15);
  color: #a3b4a8;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-close {
  background: #f07178;
}

.dot-minimize {
  background: #e5bd64;
}

.dot-maximize {
  background: #71c984;
}

.screen {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 27px clamp(18px, 4vw, 42px) 24px;
  scrollbar-color: #385a48 #0b1510;
  scrollbar-width: thin;
}

.ascii-art {
  margin: 0 0 14px;
  overflow-x: auto;
  color: var(--green);
  font-size: clamp(10px, 1.7vw, 15px);
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 0 20px rgb(111 236 147 / 24%);
}

.ascii-art span {
  display: inline-block;
  min-width: max-content;
}

.welcome {
  margin: 0 0 20px;
  color: #a9bcb0;
  font-size: 13px;
  line-height: 1.7;
}

kbd {
  padding: 2px 5px;
  border: 1px solid #3c5647;
  border-radius: 4px;
  background: #111e16;
  color: #deebe1;
  font-size: 0.88em;
}

.accent {
  color: var(--bright-green);
}

.output {
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.line {
  min-height: 1.65em;
  white-space: pre-wrap;
}

.line.blank {
  min-height: 0.8em;
}

.command-line {
  display: flex;
  gap: 9px;
  margin-top: 12px;
  color: #e4eee7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.command-line:first-child {
  margin-top: 0;
}

.command-prompt,
.prompt {
  flex: 0 0 auto;
  color: var(--green);
}

.prompt {
  padding-top: 1px;
  font-size: 12px;
  white-space: nowrap;
}

.input-row {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 9px;
  margin-top: 3px;
}

.input-row input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f0f7f2;
  caret-color: var(--green);
  font-size: 13px;
  line-height: 1.65;
}

.input-row input::placeholder {
  color: #60776a;
  opacity: 1;
}

.input-row:focus-within .prompt {
  color: var(--bright-green);
  text-shadow: 0 0 11px rgb(157 247 183 / 36%);
}

.terminal-footer {
  display: flex;
  min-height: 37px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 17px;
  border-top: 1px solid #26392f;
  background: #0b1410;
  color: #718378;
  font-size: 10px;
}

.terminal-footer span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.terminal-footer kbd {
  padding: 1px 4px;
  color: #9dad9f;
  font-size: 10px;
}

.heart {
  color: #e88484;
}

.page-note {
  margin: 15px 0 0;
  color: #789083;
  font-size: 11px;
  text-align: center;
}

.directory {
  color: var(--green);
}

.file {
  color: #d0ddd4;
}

.muted {
  color: var(--muted);
}

.gold {
  color: var(--gold);
}

.error {
  color: var(--red);
}

.success {
  color: var(--bright-green);
}

.help-command {
  display: inline-block;
  min-width: 135px;
  color: var(--gold);
}

.help-description {
  color: #b2c3b8;
}

@media (max-width: 560px) {
  .terminal {
    border-radius: 0;
  }

  .screen {
    padding: 22px 15px 20px;
  }

  .terminal-footer {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 7px 14px;
    padding-inline: 12px;
  }

  .output,
  .input-row input {
    font-size: 12px;
  }

  .prompt {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .input-row input {
    animation: caret-glow 2.6s ease-in-out infinite;
  }

  @keyframes caret-glow {
    50% {
      caret-color: #d0ffdc;
    }
  }
}
