/* Faltaneh: the neon car world. The map fills the screen; brand, goal and search float on top. */
:root {
  color-scheme: dark;
  --night: #07060F;
  --panel: #141228;
  --line: #2A2745;
  --pink: #FF2E88;
  --cyan: #22E1FF;
  --yellow: #FFC21A;
  --text: #F3F0FF;
  --muted: #A49FC8;
  --display: "Rubik", "Cairo", system-ui, sans-serif;
  --body: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--night); color: var(--text); font-family: var(--body); overflow: hidden; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

#stage { position: absolute; inset: 0; overflow: hidden; }
#scene { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#scene:active { cursor: grabbing; }
#labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tag {
  position: absolute; left: 0; top: 0; direction: ltr; white-space: nowrap;
  background: var(--night); color: var(--cyan); font-weight: 700; font-size: 13px; line-height: 1;
  padding: 6px 10px; border-radius: 20px; transform: translate(-50%, -100%);
  box-shadow: 0 0 0 1.5px var(--cyan), 0 0 14px rgba(34, 225, 255, .7);
}

.hud { position: absolute; z-index: 2; }
#brand { top: 16px; right: 16px; display: flex; align-items: center; gap: 12px; }
#brand .name {
  font-family: var(--display); font-weight: 900; font-size: 36px; line-height: 1; margin: 0;
  color: var(--pink); text-shadow: 0 0 8px rgba(255, 46, 136, .9), 0 0 22px rgba(255, 46, 136, .55);
}
#count { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 6px 14px; font-weight: 700; font-size: 14px; }

#goal { top: 16px; left: 16px; width: min(300px, 44vw); background: rgba(20, 18, 40, .88); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
#goal p { margin: 0 0 8px; font-weight: 700; font-size: 14px; }
#goal .bar { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
#goal .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--pink)); box-shadow: 0 0 10px var(--pink); transition: width .6s; }
#goal-num { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }

#search { top: 70px; right: 16px; display: flex; gap: 8px; }
#search input { width: 190px; direction: ltr; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 22px; padding: 8px 14px; font-size: 14px; }
#search input::placeholder { color: var(--muted); }
.btn { background: var(--cyan); color: var(--night); border: 0; border-radius: 22px; padding: 8px 16px; font-weight: 800; font-size: 14px; cursor: pointer; }
.btn:hover { filter: brightness(1.1); }

#card { top: 124px; right: 16px; width: 250px; background: rgba(20, 18, 40, .94); border: 1px solid var(--pink); border-radius: 14px; padding: 14px; box-shadow: 0 0 18px rgba(255, 46, 136, .35); }
#card[hidden] { display: none; }
#card strong { display: block; font-size: 17px; color: var(--cyan); text-align: right; }
#card span { display: inline-block; margin-top: 4px; font-weight: 700; color: var(--yellow); }
#card p { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
#card .close { position: absolute; top: 6px; left: 8px; background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }

#toast { bottom: 64px; left: 50%; transform: translate(-50%, 12px); opacity: 0; transition: .25s; background: var(--panel); border: 1px solid var(--cyan); border-radius: 22px; padding: 8px 16px; font-weight: 700; pointer-events: none; white-space: nowrap; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#site-links { bottom: 38px; right: 16px; left: 16px; display: flex; gap: 14px; justify-content: center; font-size: 13px; }
#site-links a { color: var(--muted); text-decoration: none; }
#site-links a:hover { color: var(--cyan); }
#hint { bottom: 14px; right: 16px; left: 16px; text-align: center; color: var(--muted); font-size: 12px; pointer-events: none; }

@media (max-width: 640px) {
  #brand .name { font-size: 28px; }
  #goal { top: auto; bottom: 48px; left: 16px; right: 16px; width: auto; }
  #site-links { bottom: 14px; }
  #hint { display: none; }
  #toast { bottom: 150px; }
  #search input { width: 140px; }
}
