:root {
  --bg-app: #17181B;
  --surface-1: #212326;
  --surface-2: #2B2E33;
  --text-primary: #F2F3F5;
  --text-secondary: #B7BBC2;
  --text-muted: #7A7F88;
  --accent: #5EE7DF;
  --accent-dim: #2F8C88;
  --accent-strong: #7FF0E9;
  --border: #2E3136;
  --success: #8AE38C;
  --danger: #FF6E6E;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 600px; height: 600px;
  background: var(--bg-app);
  overflow: hidden;
  -webkit-user-select: none; user-select: none;
}
body {
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
  color: var(--text-primary);
}

.stage { width: 600px; height: 600px; position: relative; }

.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 28px 36px 24px;
  gap: 14px;
}
.screen.hidden { display: none; }

/* ---- HUD bar / tags ---- */
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.tag.accent { color: var(--accent); border-color: #2F5E5B; }

/* ---- Typography ---- */
.title {
  font-family: var(--ui);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 4px;
}
.sub {
  font-family: var(--ui);
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.45;
}
.sub strong {
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 600;
}

/* ---- Buttons ---- */
.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn {
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 13px 18px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-primary);
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: background 100ms cubic-bezier(0.2,0,0,1), border-color 100ms cubic-bezier(0.2,0,0,1);
}
.btn:focus {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: inset 3px 0 0 0 var(--accent);
}
.btn.primary {
  background: var(--accent-dim);
  border-color: #3FA8A3;
  color: #06201F;
  font-weight: 600;
}
.btn.primary:focus {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  box-shadow: none;
}
.btn.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}
.btn.small {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
}

/* ---- Hints ---- */
.hints {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 20px;
}
.hint {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- Banner ---- */
.banner {
  margin-top: 10px;
  font-family: var(--ui);
  font-size: 13px;
  color: var(--danger);
  background: #241717;
  border: 1px solid #5A2929;
  border-radius: 2px;
  padding: 8px 12px;
  line-height: 1.4;
  box-shadow: inset 3px 0 0 0 var(--danger);
}
.banner.info {
  color: var(--accent);
  background: #0F2423;
  border-color: #2F5E5B;
  box-shadow: inset 3px 0 0 0 var(--accent);
}

/* ---- Nav screen ---- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.compass-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.compass-ring {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.compass-ring::before,
.compass-ring::after {
  content: '';
  position: absolute;
  background: var(--border);
}
.compass-ring::before { top: -5px; left: 50%; width: 2px; height: 10px; transform: translateX(-50%); background: var(--accent); }
.compass-ring::after { bottom: -5px; left: 50%; width: 2px; height: 10px; transform: translateX(-50%); }

.arrow {
  transition: transform 160ms cubic-bezier(0.2,0,0,1);
  transform-origin: 50% 50%;
}
.arrow.pointing-at-target svg polygon { fill: var(--success); }

/* ---- Stats ---- */
.stats {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  font-variant-numeric: tabular-nums;
}
.stats > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stats .stat-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}
.stats span:not(.stat-label) {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

@media (prefers-reduced-motion: reduce) {
  .btn, .arrow { transition: none; }
}
