:root {
  --bg: #0a0a0a;
  --text: #71717a;
  --hi: #fafafa;
  --border: #27272a;
  --accent: #8fe388;
  --accent-dim: #294130;
  --panel: rgba(13, 18, 15, 0.92);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  padding: 4rem 1rem 1rem;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(4px);
  z-index: 20;
}

.brand {
  color: var(--hi);
  font-weight: 700;
  letter-spacing: 0.04em;
  border-bottom: none;
}

.menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hamburger {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--hi);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--hi);
}

.container {
  border: 1px solid var(--border);
  background-color: #0d0d0d;
  padding: 2.5rem 3rem;
  border-radius: 8px;
}

.terminal {
  margin-top: 0.6rem;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}

.terminal-screen {
  height: 300px;
  overflow-y: auto;
  padding: 0.2rem 0 0.35rem;
  color: var(--text);
  line-height: 1.4;
  scrollbar-width: thin;
}

.terminal-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-line + .terminal-line {
  margin-top: 0.28rem;
}

.terminal-line-command {
  color: var(--hi);
}

.terminal-line-error {
  color: #ffb4b4;
}

.terminal-line-meta {
  color: var(--accent-dim);
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.2rem 0 0;
}

.terminal-hint {
  min-height: 1.2em;
  margin-top: 0.15rem;
  color: var(--accent-dim);
  font-size: 0.9em;
}

.terminal-prompt {
  color: var(--hi);
  white-space: nowrap;
}

.terminal-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--hi);
  font: inherit;
  outline: none;
  caret-color: var(--accent);
  caret-shape: block;
  text-shadow: 0 0 0.45rem rgba(143, 227, 136, 0.2);
}

.terminal[aria-busy="true"] .terminal-input {
  opacity: 0.75;
  cursor: wait;
}

.terminal-input:focus-visible {
  outline: 1px solid rgba(143, 227, 136, 0.45);
  outline-offset: 2px;
}

.terminal-input::selection {
  background: rgba(143, 227, 136, 0.28);
  color: #ffffff;
}

.ascii {
  color: var(--hi);
  white-space: pre;
  font-weight: bold;
  margin-bottom: 2rem;
}

.line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.label {
  color: var(--text);
}

.val {
  color: var(--hi);
}

.divider {
  color: var(--border);
  margin: 1.5rem 0;
  user-select: none;
}

a {
  color: var(--hi);
  text-decoration: none;
  border-bottom: 1px dashed var(--text);
  transition: border-color 0.2s;
}

a:hover {
  border-bottom-color: var(--hi);
}

@media (max-width: 760px) {
  .hamburger {
    display: flex;
  }

  .menu {
    position: absolute;
    top: calc(100% + 1px);
    right: 1rem;
    min-width: 180px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: #0d0d0d;
  }

  .menu.open {
    display: flex;
  }
}

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.2em;
  background-color: var(--hi);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
  margin-left: 4px;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@media (max-width: 600px) {
  body {
    overflow-y: auto;
  }

  .container {
    padding: 1.5rem;
    width: 100%;
    overflow-x: auto;
  }

  .terminal {
    min-width: 100%;
  }

  .terminal-screen {
    height: 240px;
  }

  .ascii {
    font-size: 8px;
    margin-bottom: 1.5rem;
  }

  body {
    font-size: 12px;
  }
}

@media (max-width: 400px) {
  .ascii {
    font-size: 6.5px;
  }
}
