@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  --bg-0: #141418;
  --bg-1: #1a1a1e;
  --panel: #0d0d10;
  --panel-line: rgba(255, 255, 255, 0.04);
  --titlebar-top: #3a3a42;
  --titlebar-bottom: #2a2a30;
  --text: #d4d4d4;
  --muted: #8a8a94;
  --dim: #55555e;
  --ok: #5eff9c;
  --down: #ff5e7a;
  --warn: #ffc857;
  --info: #7afcff;
  --tick-idle: #24242a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "IBM Plex Mono", "JetBrains Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: var(--text);
  background:
    radial-gradient(ellipse at top, #26262d 0%, var(--bg-1) 60%, var(--bg-0) 100%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  font-size: 13px;
  line-height: 1.55;
}

.screen-wrap {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 40px 20px 60px;
}

.terminal {
  width: min(860px, calc(100vw - 40px));
  min-width: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  background: var(--panel);
  box-shadow:
    0 30px 60px -15px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.terminal-titlebar {
  height: 30px;
  background: linear-gradient(180deg, var(--titlebar-top) 0%, var(--titlebar-bottom) 100%);
  border-bottom: 1px solid rgba(122, 136, 173, 0.34);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 12px;
}

.traffic-lights {
  display: flex;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0.5px solid rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.red { background: #ff6057; }
.yellow { background: #fdbf2f; }
.green { background: #28ca42; }

.title {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: var(--muted);
}

.terminal-body {
  min-height: 480px;
  padding: 16px 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px dashed rgba(120, 133, 168, 0.2);
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.012) 0px,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 3px
    );
}

.muted {
  margin: 0 0 4px;
  font-size: 13px;
  color: #5f6268;
  font-style: italic;
  font-weight: 400;
}

.prompt-line {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
}

.prompt {
  color: var(--ok);
}

.summary {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
  color: #ccd5e8;
}

.ok-line {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
  color: var(--ok);
}

.service {
  margin-top: 8px;
}

.service-title {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
}

.service-title .arrow {
  color: var(--dim);
}

.service-title .state.online {
  color: var(--ok);
  font-weight: 600;
}

.service-title .state.offline {
  color: var(--down);
  font-weight: 600;
}

.service-meta {
  margin: 0 0 6px 18px;
  display: flex;
  gap: 14px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  font-weight: 400;
}

.service-meta .uptime {
  color: var(--ok);
  font-weight: 500;
}

.spark {
  display: flex;
  gap: 2px;
  width: calc(100% - 18px);
  height: 22px;
  align-items: stretch;
  margin-left: 18px;
}

.tick {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: auto;
  border-radius: 1px;
  background: var(--tick-idle);
  cursor: default;
  display: block;
}

.tick.up {
  background: var(--ok);
}

.tick.down {
  background: var(--down);
}

.tick:hover {
  filter: brightness(1.25);
  transform: scaleY(1.12);
}

.time-axis {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  width: calc(100% - 18px);
  max-width: 100%;
  margin-left: 18px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 400;
}

.terminal-footer {
  margin-top: 24px;
  padding: 12px 0 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  color: var(--dim);
  font-size: 11px;
  font-weight: 400;
  display: flex;
  justify-content: space-between;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--ok);
  vertical-align: -0.12em;
  animation: blink 1s steps(1, end) infinite;
}

.tip {
  position: fixed;
  pointer-events: none;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-size: 11px;
  line-height: 1.55;
  max-width: 90vw;
  opacity: 0;
  padding: 8px 11px;
  transform: translate(-50%, -100%);
  transition: opacity 0.1s ease;
  white-space: nowrap;
  z-index: 200;
}

.tip.show {
  opacity: 1;
}

.tip .t-k {
  color: var(--muted);
}

.tip .t-status.ok {
  color: var(--ok);
}

.tip .t-status.down {
  color: var(--down);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .screen-wrap {
    padding: 12px 8px 32px;
  }

  .terminal {
    width: 100%;
    border-radius: 8px;
  }

  .terminal-titlebar {
    height: 26px;
  }

  .dot {
    width: 10px;
    height: 10px;
  }

  .title {
    font-size: 10px;
  }

  .terminal-body {
    min-height: 360px;
    padding: 14px 12px 16px;
  }

  .muted {
    font-size: 12px;
  }

  .prompt-line,
  .summary,
  .ok-line,
  .service-title {
    font-size: 12px;
  }

  .service-meta {
    font-size: 11px;
    gap: 10px;
    margin-left: 18px;
  }

  .tick {
    border-radius: 1px;
  }

  .spark {
    gap: 1px;
    height: 18px;
  }

  .time-axis {
    font-size: 10px;
  }

  .time-axis span:nth-child(2),
  .time-axis span:nth-child(3),
  .time-axis span:nth-child(4) {
    display: none;
  }

  .terminal-footer {
    font-size: 10px;
  }
}
