@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;1,300&display=swap");

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg:       #0d0d0d;
  --surface:  #111;
  --border:   #1e1e1e;
  --accent:   #b8956a;
  --accent2:  #7a5e3a;
  --green:    #6a9e7a;
  --text:     #7a7a7a;
  --text-hi:  #bcbcbc;
  --dim:      #3a3a3a;
  --muted:    #454545;
}

html,
body {
  background: var(--bg);
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .025;
  pointer-events: none;
}

/* ── Terminal window ── */

.terminal {
  max-width: 700px;
  margin: 40px auto 80px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}

/* ── Top bar ── */

.topbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: #161616;
  border-bottom: 1px solid var(--border);
}

.topbar.hidden {
  opacity: 0;
}

.topbar.visible {
  opacity: 1;
  animation: fadeIn .25s ease forwards;
}

.tb-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.tb-dot.r {
  background: #3a1a1a;
  border: 1px solid #5a2a2a;
}

.tb-dot.y {
  background: #3a3018;
  border: 1px solid #5a4a28;
}

.tb-dot.g {
  background: #1a3a22;
  border: 1px solid #2a5a38;
}

.tb-title {
  flex: 1;
  text-align: center;
  font-size: 11.5px;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: .04em;
}

/* ── Inner content ── */

.terminal > .term-block,
.terminal > .spacer {
  padding: 0 22px;
}

/* ── Reveal ── */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.term-block.hidden {
  opacity: 0;
  pointer-events: none;
}

.term-block.visible {
  animation: fadeIn .18s ease forwards;
}

.spacer.hidden {
  opacity: 0;
}

.spacer {
  height: 20px;
}

/* First block padding */

.term-block:first-of-type {
  padding-top: 20px;
}

.term-block:last-of-type {
  padding-bottom: 24px;
}

/* ── Prompt ── */

.term-block {
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 2px;
}

.prompt {
  display: flex;
  align-items: baseline;
  gap: 0;
}

.ps1 {
  white-space: nowrap;
}

.host {
  color: var(--accent);
  font-weight: 500;
}

.sep {
  color: var(--dim);
}

.path {
  color: var(--accent2);
}

.dol {
  color: var(--muted);
  margin-right: 2px;
}

.cmd {
  color: var(--text-hi);
}

.muted {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 300;
}
/* ── Config file output ── */

.conf-file {
  margin: 6px 0 4px;
  padding: 14px 18px;
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1;
}

.conf-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 3.5px 0;
}

.spacer-sm {
  height: 8px;
}

.conf-comment {
  color: #3a3a3a;
  font-style: italic;
  font-weight: 300;
  font-size: 12px;
}

.conf-key {
  color: var(--text);
  min-width: 60px;
  font-weight: 400;
}

.conf-eq {
  color: var(--dim);
  padding: 0 6px;
}

.conf-val {
  color: #888;
  font-weight: 300;
}

.conf-val-hi {
  color: var(--accent);
  font-weight: 400;
}

/* ── Find / tree output ── */

.find-output {
  margin: 6px 0 4px;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px 10px;
  font-size: 13px;
}

.find-summary {
  grid-column: 1 / -1;
  color: var(--dim);
  font-size: 12px;
  font-weight: 300;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.find-dir {
  color: var(--accent);
  font-weight: 400;
  font-size: 12px;
  margin-bottom: 5px;
  letter-spacing: .01em;
}

.find-file {
  font-size: 13px;
  font-weight: 300;
  color: var(--text);
  line-height: 1.75;
  padding-left: 2px;
}

.tree-arm {
  color: var(--dim);
  margin-right: 6px;
  font-size: 11px;
}

/* ── Ping output ── */

.ping-output {
  margin: 6px 0 4px;
  padding: 10px 16px;
  font-size: 13px;
}

.ping-line {
  line-height: 1.85;
  font-weight: 300;
  color: #666;
}

.ping-label {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: .06em;
}

.ping-user {
  color: var(--text-hi);
  font-weight: 400;
}

.ping-time {
  color: var(--green);
}

.ping-stats {
  color: var(--dim);
  font-size: 12px;
}

.ping-seq,
.hidden-ping {
  opacity: 0;
}

.ping-seq.pong {
  animation: fadeIn .15s ease forwards;
}

.hidden-ping.show {
  animation: fadeIn .15s ease forwards;
}

/* Copy row */

.ping-copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.ping-copy-row.show {
  animation: fadeIn .15s ease forwards;
}
/* ── Copy button ── */

#copy-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent2);
  border-radius: 4px;
  padding: 3px 12px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

#copy-btn:hover {
  background: #1e160e;
}

#copy-btn.copied {
  color: var(--green);
  border-color: #2a4a38;
}

/* ── Cursor ── */

.cursor-blink {
  color: var(--accent);
  animation: blink 1.1s step-start infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ── Mobile ── */

@media (max-width: 640px) {
  .terminal {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    min-height: 100vh;
  }

  .find-output {
    grid-template-columns: 1fr 1fr;
  }

  .conf-file {
    padding: 12px;
  }
}

@media (max-width: 420px) {
  .find-output {
    grid-template-columns: 1fr;
  }
}