:root {
  --bg: #0b0d10;
  --panel: #151a20;
  --text: #e8edf2;
  --muted: #8a96a3;
  --accent: #3ea6ff;
  --error: #ff6b6b;
  --ok: #4cd18a;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

#screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  background: #000;
}

.panel {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  text-align: center;
  background: var(--bg);
}

.panel h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: 0.02em; }
.hint { margin: 0; color: var(--muted); }

.code {
  font: 700 clamp(56px, 12vw, 120px)/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.15em;
  padding: 24px 32px;
  border-radius: 16px;
  background: var(--panel);
  user-select: all;
}

.status { margin: 0; color: var(--muted); min-height: 1.4em; }
.status.ok { color: var(--ok); }
.error { color: var(--error); max-width: 36em; }
.row { display: flex; gap: 12px; }

button {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid #2a323b;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
}
button:active { background: #1f262e; }

.hud {
  position: fixed;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 12px;
  border-radius: 12px;
  background: rgba(11, 13, 16, 0.75);
  font: 14px/1 ui-monospace, Consolas, monospace;
  color: var(--muted);
}
.hud button { padding: 8px 12px; font-size: 14px; }

[hidden] { display: none !important; }
