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

:root {
  --bg:        #0d1117;
  --bg-term:   #161b22;
  --border:    #30363d;
  --green:     #39d353;
  --green-dim: #238636;
  --yellow:    #e3b341;
  --blue:      #58a6ff;
  --red:       #f85149;
  --gray:      #8b949e;
  --white:     #e6edf3;
  --font:      'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Courier New', monospace;
}

html, body {
  height: 100%;
  background: var(--bg);
  font-family: var(--font);
}

#terminal {
  width: 100%;
  height: 100%;
  background: var(--bg-term);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Output area ──────────────────────────────────── */
#output {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 8px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--white);
  scroll-behavior: smooth;
}

#output::-webkit-scrollbar { width: 6px; }
#output::-webkit-scrollbar-track { background: transparent; }
#output::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.line { white-space: pre-wrap; word-break: break-word; }
.line + .line { margin-top: 1px; }
.blank { height: 0.8em; }

/* colours */
.c-green  { color: var(--green); }
.c-yellow { color: var(--yellow); }
.c-blue   { color: var(--blue); }
.c-red    { color: var(--red); }
.c-gray   { color: var(--gray); }
.c-white  { color: var(--white); }
.bold     { font-weight: 700; }
.dim      { opacity: 0.55; }

/* echoed command */
.cmd-echo .prompt-text { color: var(--green-dim); }
.cmd-echo .cmd-text    { color: var(--white); }

/* section headers */
.section-header {
  color: var(--yellow);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  margin-bottom: 4px;
}

/* key-value rows */
.kv-key   { color: var(--blue);  display: inline-block; min-width: 120px; }
.kv-value { color: var(--white); }

/* tag/badge */
.tag {
  display: inline-block;
  background: #1f3040;
  color: var(--blue);
  border: 1px solid #2d4a6a;
  border-radius: 4px;
  padding: 0 5px;
  font-size: 12px;
  margin: 1px 2px;
}

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

/* ── Input line ───────────────────────────────────── */
#input-line {
  flex-shrink: 0;
  padding: 6px 20px 14px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
}

#prompt { color: var(--green); font-weight: 700; }
#input-display { color: var(--white); white-space: pre; }

#cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--green);
  vertical-align: middle;
  animation: blink 1.1s step-start infinite;
}

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

#hidden-input,
#hidden-input1 {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

/* ── ASCII banner ─────────────────────────────────── */
.banner { color: var(--green); line-height: 1.25; font-size: 12px; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 540px) {
  #output, #input-line { font-size: 12px; padding-left: 12px; padding-right: 12px; }
  .banner { font-size: 9px; }
}
