@font-face {
  font-family: "VT323";
  src: url("vendor/fonts/vt323-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  --glow: 200, 200, 200;
  --bar: #0d0e0f;
  --ink: #c8c8c8;
  --muted: #8a8d90;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 40%, #1d2023 0%, #111214 70%);
  color: var(--ink);
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow: hidden;
}

.bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 14px;
  background: var(--bar);
  border-bottom: 1px solid #25282b;
}

.brand {
  font-family: "VT323", monospace;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: #e6e6e6;
}

.status {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.status[data-kind="warn"] {
  color: #e0b050;
}

.status[data-kind="error"] {
  color: #ff7a6b;
}

.spacer {
  flex: 1;
}

.control,
.bar button {
  color: var(--ink);
  font: inherit;
  white-space: nowrap;
}

.bar a.control {
  text-decoration: none;
}

.bar a.control:hover {
  text-decoration: underline;
}

.bar button,
.bar select {
  background: #1b1d20;
  border: 1px solid #34383c;
  border-radius: 6px;
  padding: 3px 10px;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.bar button:hover,
.bar select:hover {
  border-color: #50565c;
}

.bar button[aria-expanded="true"] {
  background: #2a2e33;
}

.keys {
  flex: none;
  padding: 4px 18px 8px;
  background: var(--bar);
  border-bottom: 1px solid #25282b;
  color: #b9bcbf;
}

.keys p {
  margin: 6px 0;
}

.keys ul {
  margin: 0;
  padding-left: 20px;
}

kbd {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid #44494e;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #1b1d20;
  font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace;
}

.mac-only,
html.mac .not-mac {
  display: none;
}

html.mac .mac-only {
  display: revert;
}

.screen {
  flex: 1;
  min-height: 0;
  display: flex;
  padding: 16px 20px 14px;
}

.tips {
  flex: none;
  padding: 0 20px 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tips kbd {
  font-size: 11px;
}

.key-hover {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  border-radius: 3px;
  box-shadow:
    0 0 0 1px rgba(var(--glow), 0.85),
    0 0 10px rgba(var(--glow), 0.55);
  transition: background-color 0.1s;
}

.key-hover.pressed {
  background-color: rgba(var(--glow), 0.35);
}

.bezel {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 14px 18px;
  border-radius: 18px;
  background: #000;
  box-shadow:
    0 0 0 10px #26282b,
    0 0 0 11px #3a3d41,
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(var(--glow), 0.06),
    inset 0 0 80px rgba(var(--glow), 0.07);
  transition: box-shadow 0.12s;
}

.bezel.bell {
  box-shadow:
    0 0 0 10px #4a4c50,
    0 0 0 11px #6a6d71,
    0 12px 40px rgba(0, 0, 0, 0.6),
    inset 0 0 80px rgba(var(--glow), 0.25);
}

.bezel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
}

.terminal {
  width: 100%;
  height: 100%;
}

.terminal .xterm {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.terminal .xterm-screen canvas {
  filter: drop-shadow(0 0 1.5px rgba(var(--glow), 0.45));
}

.terminal .xterm-viewport {
  background: transparent !important;
  overflow: hidden !important;
}

.focus-hint {
  position: absolute;
  right: 22px;
  bottom: 10px;
  padding: 2px 10px;
  border-radius: 6px;
  background: rgba(30, 32, 35, 0.92);
  color: #d8d8d8;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.bezel.unfocused .focus-hint {
  opacity: 1;
}

.noscript {
  padding: 20px;
}

@media (max-width: 720px) {
  .bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .screen {
    padding: 10px;
  }

  .tips {
    padding: 0 10px 6px;
    white-space: normal;
  }

  .bezel {
    padding: 8px;
    border-radius: 10px;
  }
}
