:root {
  --bg: #000;
  --green: #33ff66;
  --dim: #1fae4a;
  --bright: #d8ffe2;
  --line: #0f5a26;
  --rain-opacity: 0.35;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--green);
  font: 15px/1.6 'JetBrains Mono', Menlo, Consolas, monospace;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

a { color: #7dffa0; }
a:hover, a:focus-visible { color: #000; background: var(--green); outline: none; }

/* matrix rain */
.rain-layer {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: space-between;
  overflow: hidden;
  pointer-events: none;
  opacity: var(--rain-opacity);
}
.rain-col {
  white-space: pre;
  font-size: 14px;
  line-height: 1.15;
  color: var(--green);
  text-shadow: 0 0 6px var(--green);
  animation: fall linear infinite;
}
@keyframes fall {
  from { transform: translateY(-100%); }
  to { transform: translateY(110vh); }
}

/* chrome */
.bar {
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--dim);
  background: rgba(0, 0, 0, 0.85);
}

.screen {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column-reverse; /* keeps the newest output pinned to the bottom */
  overflow-y: auto;
  padding: 20px;
}
.term {
  max-width: 900px;
  width: 100%;
  background: rgba(0, 0, 0, 0.82);
  box-shadow: 0 0 0 12px rgba(0, 0, 0, 0.82);
}

.entry { margin-bottom: 14px; }
.echo .ps1 { color: var(--dim); }
.echo .typed { color: var(--bright); }
.line { white-space: pre-wrap; min-height: 1.6em; }
.line.dim, .line .label { color: var(--dim); }
.line.head {
  color: var(--bright);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
  margin: 4px 0 8px;
}
.runline {
  display: flex;
  gap: 16px;
  width: 100%;
  min-height: 28px;
  align-items: center;
  margin-left: -4px;
  padding: 2px 4px;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  color: var(--dim);
  cursor: pointer;
}
.runline .name { color: var(--bright); width: 110px; flex-shrink: 0; }
.runline:hover, .runline:focus-visible { background: #0f3d1c; outline: none; }

.prompt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.ps1 { color: var(--dim); }
.field { flex: 1; min-width: 160px; display: flex; align-items: center; }
#cmd {
  width: 1ch;
  max-width: 100%;
  background: transparent;
  border: 0;
  color: var(--bright);
  font: inherit;
  padding: 4px 0;
  caret-color: var(--green);
}
#cmd:focus { outline: none; }
.cursor {
  display: inline-block;
  width: 9px;
  height: 18px;
  background: var(--green);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.chips {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.9);
}
.chip {
  font: inherit;
  font-size: 13px;
  color: var(--green);
  background: #000;
  border: 1px solid var(--dim);
  padding: 8px 14px;
  min-height: 44px;
  cursor: pointer;
}
.chip:hover, .chip:focus-visible { background: var(--green); color: #000; outline: none; }

noscript h1 { color: var(--bright); }

@media (max-width: 600px) {
  body { font-size: 13px; }
  .screen { padding: 14px; }
  .runline .name { width: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  .rain-col, .cursor { animation: none; }
}
