/* Infinite Zoom Starfield – minimal, crisp styling */
:root{
  --hud-bg: rgba(0,0,0,0.5);
  --hud-blur: 8px;
  --hud-text: #eaeaea;
  --hud-accent: #9ee7ff;
  --hud-border: rgba(255,255,255,0.15);
  --radius: 14px;
  --pad: 10px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body{
  height: 100%;
  margin: 0;
  background: #000;
  overflow: hidden;
  color: var(--hud-text);
  font-family: var(--font);
}

/* Prevent text selection / long-press callouts on iOS */
body, canvas, .hud{
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#starfield{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: radial-gradient(ellipse at center, #000 0%, #000 60%, #020615 100%);
  cursor: grab;
}
#starfield:active{ cursor: grabbing; }

.hud{
  position: fixed;
  top: 14px;
  left: 14px;
  display: grid;
  gap: 8px;
  padding: var(--pad);
  background: var(--hud-bg);
  -webkit-backdrop-filter: blur(var(--hud-blur));
  backdrop-filter: blur(var(--hud-blur));
  border: 1px solid var(--hud-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 10;
}

.hud .row{
  display: flex;
  align-items: center;
  gap: 10px;
}

label{ font-size: 13px; opacity: 0.9; }
label.chk{ display: inline-flex; align-items: center; gap: 8px; }

#speed{ width: 160px; }

#speedVal{
  font-variant-numeric: tabular-nums;
  color: var(--hud-accent);
  min-width: 48px;
  text-align: right;
}

button{
  background: #0b0b12;
  color: var(--hud-text);
  border: 1px solid var(--hud-border);
  border-radius: 10px;
  padding: 6px 10px;
  font: inherit;
  line-height: 1;
}
button:hover{ border-color: rgba(255,255,255,0.35); }
button[aria-pressed="true"]{
  background: #1b1b2a;
  color: #fff;
  border-color: #6ea9ff;
  box-shadow: 0 0 0 3px rgba(110,169,255,0.15) inset;
}

.hint{
  font-size: 12px;
  opacity: 0.6;
  text-align: center;
  padding-top: 2px;
}

/* Responsive niceties */
@media (max-width: 520px){
  .hud{ left: 10px; right: 10px; top: 10px; }
  #speed{ width: 120px; }
}
