:root {
  --bg: #05080a;
  --ink: #33ff66;
  --dim: #1f8f42;
  --warn: #ffcf6b;
  --err: #ff6b6b;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 40%, #0a1a12 0%, var(--bg) 70%);
  color: var(--ink);
  font: 14px/1.55 ui-monospace, "Lucida Console", Consolas, monospace;
  text-shadow: 0 0 6px rgba(51, 255, 102, 0.35);
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.25) 3px,
    rgba(0, 0, 0, 0.25) 4px
  );
}

.term {
  flex: 1;
  overflow-y: auto;
  padding: clamp(0.75rem, 3vw, 2rem);
  cursor: text;
}

.term-output { white-space: pre-wrap; word-break: break-word; }
.term-output .line { min-height: 1.55em; }
.term-output .echo { color: #d6ffd6; }
.term-output .dim { color: var(--dim); }
.term-output .warn { color: var(--warn); }
.term-output .err { color: var(--err); }
.term-output a { color: var(--warn); }

.term-input {
  display: flex;
  gap: 0.6ch;
  align-items: baseline;
  margin-top: 0.2em;
}

.ps1 { color: var(--warn); white-space: nowrap; }

#cmd {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: inherit;
  font: inherit;
  text-shadow: inherit;
  caret-color: var(--ink);
  padding: 0;
}

.term-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  padding: 0.6rem clamp(0.75rem, 3vw, 2rem);
  border-top: 1px solid #12301d;
  color: var(--dim);
  font-size: 11px;
  text-shadow: none;
}

.term-foot a { color: var(--dim); }
.term-foot .presence-badge.is-online { color: var(--ink); }

/* `matrix` command */
.matrix {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000;
}

.matrix canvas { display: block; width: 100%; height: 100%; }

.matrix-hint {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 51;
  color: var(--dim);
  font-size: 12px;
}
