:root { color-scheme: dark; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #0d111d 0%, #070911 55%, #030409 100%);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #fff;
}

canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.hud {
  position: fixed;
  left: max(20px, env(safe-area-inset-left));
  top: max(20px, env(safe-area-inset-top));
  pointer-events: none;
}

.hud h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 3px;
  opacity: 0.85;
}

.hud p {
  margin: 6px 0 0;
  font-size: 11px;
  color: #94a3b8;
}

.hud-bottom {
  top: auto;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 10px;
  color: #64748b;
}

.hud-bottom a {
  color: #64748b;
  text-decoration: none;
  pointer-events: auto;
}

.hud-bottom a:hover { color: #a78bfa; }

.tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 8px;
  background: rgba(8, 11, 20, 0.82);
  backdrop-filter: blur(6px);
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -100%);
}

.tooltip[hidden] { display: none; }
.tooltip strong { font-weight: 600; color: #fff; }
.tooltip span { color: #a78bfa; }

.tooltip .repos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(139, 156, 255, 0.2);
}

.tooltip .repos:empty { display: none; }
.tooltip .repo { color: #94a3b8; font-size: 10px; }
