:root {
  --fix: #2f80ff; --new: #ffb020; --mob: #ff3b5c; --ok: #22d38a;
  --glass: rgba(14, 18, 26, .72); --line: rgba(255, 255, 255, .09); --fg: #f4f6fa; --mut: #9aa4b2;
  --r: 22px; --safe-b: env(safe-area-inset-bottom); --safe-t: env(safe-area-inset-top);
}
* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; background: #07090d; color: var(--fg);
  font-family: Inter, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif; user-select: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
#map { position: fixed; inset: 0; }
.glass { background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.35); }

/* Săgeata ta */
.me { width: 48px; height: 48px; filter: drop-shadow(0 0 10px rgba(47,128,255,.9)); }
.me svg { width: 100%; height: 100%; fill: #fff; stroke: var(--fix); stroke-width: 3.5; stroke-linejoin: round; }

/* Banner alertă */
.banner { position: fixed; left: 12px; right: 12px; top: calc(12px + var(--safe-t)); z-index: 5;
  border-radius: var(--r); padding: 16px 18px 14px; color: #fff; transform: translateY(-140%);
  transition: transform .45s cubic-bezier(.2,.9,.3,1.2); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.banner.show { transform: none; }
.banner.fixed_camera { background: linear-gradient(135deg, #1f6bff, #4b9bff); }
.banner.new_camera_candidate { background: linear-gradient(135deg, #f08a00, #ffbf3c); color: #1a1100; }
.banner.mobile_radar { background: linear-gradient(135deg, #e11d48, #ff5b7a); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255,59,92,.25), 0 16px 40px rgba(0,0,0,.45); } }
.b-row { display: flex; align-items: center; gap: 12px; }
.b-icon { font-size: 30px; }
.b-label { flex: 1; font-size: 19px; font-weight: 700; line-height: 1.15; }
.b-dist { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.b-track { height: 5px; background: rgba(255,255,255,.3); border-radius: 9px; margin-top: 12px; overflow: hidden; }
.b-bar { height: 100%; background: currentColor; transform-origin: left; transform: scaleX(0); transition: transform .8s linear; }

/* HUD jos */
.hud { position: fixed; left: 12px; right: 12px; bottom: calc(16px + var(--safe-b)); z-index: 3;
  display: flex; align-items: center; gap: 10px; }
.speed { width: 78px; height: 78px; border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; flex: none; }
#speed-val { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.speed small { font-size: 11px; color: var(--mut); margin-top: 2px; }
.next { flex: 1; min-width: 0; height: 52px; font-size: 14px !important; border-radius: 26px; padding: 0 16px; display: flex; align-items: center;
  gap: 9px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next b { font-variant-numeric: tabular-nums; }
.dotc { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ok); }
.dotc.fixed_camera { background: var(--fix); } .dotc.new_camera_candidate { background: var(--new); }
.dotc.mobile_radar { background: var(--mob); }

/* Sheet */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: .25s; z-index: 6; }
.scrim.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; padding: 10px 18px calc(18px + var(--safe-b));
  background: #11161f; border-radius: 28px 28px 0 0; transform: translateY(105%);
  transition: transform .35s cubic-bezier(.2,.9,.3,1); text-align: center; }
.sheet.open { transform: none; }
.grab { width: 42px; height: 5px; border-radius: 5px; background: #2b3340; margin: 0 auto 14px; }
.sheet h3 { font-size: 18px; margin-bottom: 16px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { height: 170px; border-radius: var(--r); font-size: 18px; font-weight: 700; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; transition: transform .1s; }
.tile span { font-size: 44px; }
.tile.mob { background: linear-gradient(150deg, #e11d48, #ff5b7a); }
.tile.cam { background: linear-gradient(150deg, #f08a00, #ffbf3c); color: #1a1100; }
.link { display: block; width: 100%; padding: 14px; color: var(--mut); font-size: 15px; }

/* Splash */
.splash { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 32px; text-align: center; transition: opacity .4s;
  background: radial-gradient(120% 80% at 50% 20%, #13233f 0%, #07090d 60%); }
.splash.hide { opacity: 0; pointer-events: none; }
.splash h1 { font-size: 44px; letter-spacing: -1px; margin-top: 26px; }
.splash p { color: var(--mut); margin: 10px 0 36px; max-width: 300px; line-height: 1.45; }
.logo { position: relative; width: 120px; height: 120px; }
.logo i { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--ok); opacity: 0;
  animation: ring 2.4s infinite; }
.logo i:nth-child(2) { animation-delay: .8s; } .logo i:nth-child(3) { animation-delay: 1.6s; }
@keyframes ring { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
.cta { width: 100%; max-width: 320px; height: 64px; border-radius: 32px; font-size: 20px; font-weight: 800; color: #04170f;
  background: linear-gradient(135deg, #22d38a, #7cf5c4); box-shadow: 0 14px 34px rgba(34,211,138,.35); transition: transform .1s; }
.splash .link { max-width: 320px; margin-top: 8px; }

.toast { position: fixed; left: 50%; bottom: calc(110px + var(--safe-b)); z-index: 9; transform: translate(-50%, 20px);
  background: #fff; color: #0b0d10; padding: 12px 20px; border-radius: 14px; font-weight: 700; opacity: 0;
  transition: .3s; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right { bottom: 96px; }

/* Sus: GPS + sunet */
.top { position: fixed; top: calc(12px + var(--safe-t)); right: 12px; z-index: 4; display: flex; gap: 8px; }
.pill { height: 40px; padding: 0 14px; border-radius: 20px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; }
#gps .dotc { background: var(--mut); }
#gps.ok .dotc { background: var(--ok); } #gps.weak .dotc { background: var(--new); } #gps.err .dotc { background: var(--mob); }
#btn-sound.off { color: var(--mut); }
.banner.show ~ .top { opacity: 0; }

/* Raportează + Centrează */
.report { flex: none; height: 64px; padding: 0 18px; border-radius: 32px; display: flex; align-items: center; gap: 6px;
  font-size: 16px; font-weight: 800; color: #fff; background: linear-gradient(140deg, #ff7a18, #ff3b5c);
  box-shadow: 0 12px 30px rgba(255,80,60,.45); }
.report b { font-size: 26px; line-height: 1; }
.center { position: fixed; left: 50%; bottom: calc(104px + var(--safe-b)); z-index: 3; transform: translateX(-50%);
  color: var(--fix); opacity: 0; pointer-events: none; transition: .25s; }
.center.show { opacity: 1; pointer-events: auto; }
.report:active, .tile:active, .cta:active, .pill:active { transform: scale(.95); }
.center:active { transform: translateX(-50%) scale(.95); }
.tile small { font-size: 12px; font-weight: 500; opacity: .85; padding: 0 10px; line-height: 1.3; }
.hint { color: var(--mut); font-size: 14px; margin: -8px 0 16px; }
