/* In-game HUD: top bar, location banner, car prompts, maps, touch controls. */

#topbar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: 0 4px 18px rgba(0,0,0,.15); font: 700 14px var(--ui); color: var(--ink); white-space: nowrap; pointer-events: none; }
#topbar .tb-mood { color: var(--brand); }
#topbar .tb-money { background: var(--soft); border-radius: 999px; padding: 7px 14px; font-weight: 800; }
#tbBuy { pointer-events: auto; width: 30px; height: 30px; margin-left: -10px; border: 0; border-radius: 50%; background: #22b573; color: #fff; font: 800 20px/1 var(--ui); cursor: pointer; box-shadow: 0 2px 8px rgba(34,181,115,.45); }
.touch #topbar { font-size: 11px; gap: 8px; padding-left: 12px; top: 8px; }
.touch #topbar .tb-name { display: none; }

#place { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); color: #fff; background: rgba(10,30,70,.78); padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; transition: opacity .3s; pointer-events: none; white-space: nowrap; }
#prompt { position: fixed; bottom: 130px; left: 50%; transform: translateX(-50%); color: #fff; background: rgba(0,0,0,.6); padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; display: none; pointer-events: none; white-space: nowrap; }
.touch #prompt { bottom: auto; top: 60px; }
#speedo { position: fixed; right: 16px; top: 200px; color: #fff; background: rgba(0,0,0,.5); padding: 8px 14px; border-radius: 10px; font: 700 22px system-ui, sans-serif; display: none; pointer-events: none; }
#speedo small { font-size: 12px; font-weight: 600; opacity: .8; }
.touch #speedo { top: 136px; font-size: 18px; }

/* maps */
#minimap { position: fixed; right: 16px; top: 14px; width: 170px; height: 170px; border-radius: 50%; border: 3px solid rgba(255,255,255,.85); box-shadow: 0 2px 10px rgba(0,0,0,.35); cursor: pointer; }
.touch #minimap { width: 112px; height: 112px; }
#bigmap { position: fixed; inset: 0; z-index: 8; display: none; background: #13284d; touch-action: none; }
#bigmap.open { display: block; }
#bigmap.mode3d { background: transparent; cursor: grab; } #bigmap.mode3d #bigmapCanvas { display: none; }
#bigmap.mode3d .title { text-shadow: 0 1px 6px #000; }
body.map-open #topbar, body.map-open #place, body.map-open #minimap, body.map-open #lifeNav, body.map-open #needsW, body.map-open #locCard, body.map-open #homeBar, body.map-open #touchUI, body.map-open #micBtn { display: none !important; }
#bigmapCanvas { width: 100%; height: 100%; display: block; cursor: grab; }
#bigmap .bar { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }
#bigmap button, #aerialBtn { font: 600 14px system-ui, sans-serif; color: #fff; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.5); border-radius: 10px; padding: 9px 14px; cursor: pointer; }
#bigmap .title { position: absolute; top: 14px; left: 16px; color: #fff; font: 700 20px system-ui, sans-serif; text-shadow: 0 1px 4px #000; pointer-events: none; }
#bigmap .hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); color: #fff; background: rgba(0,0,0,.55); padding: 7px 14px; border-radius: 999px; font: 13px system-ui, sans-serif; pointer-events: none; white-space: nowrap; }
#aerialBtn { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: none; z-index: 4; }
#aerialBtn.show { display: block; }

/* phone / tablet controls */
#joy { position: fixed; left: 110px; top: calc(100% - 120px); width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.45); display: none; pointer-events: none; opacity: .6; transition: opacity .2s; }
#joy.active { opacity: 1; }
.touch #joy { display: block; }
#knob { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; background: rgba(255,255,255,.8); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
#touchUI { display: none; }
.touch #touchUI { display: block; }
.tbtn { position: fixed; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%;
  background: rgba(20,20,20,.35); border: 2px solid rgba(255,255,255,.65); color: #fff; font: 700 12px system-ui, sans-serif; letter-spacing: .5px; text-align: center;
  touch-action: none; -webkit-tap-highlight-color: transparent; backdrop-filter: blur(3px); }
.tbtn b { font-size: 22px; line-height: 1; margin-bottom: 2px; }
.tbtn.active, .tbtn.on { background: rgba(245,197,24,.75); border-color: #fff; }
#jumpBtn { right: 22px; bottom: 26px; width: 84px; height: 84px; }
#runBtn { right: 120px; bottom: 34px; }
#carBtn { right: 34px; bottom: 128px; background: rgba(245,197,24,.55); display: none; }
#gasBtn { right: 18px; bottom: 22px; width: 82px; height: 128px; border-radius: 20px; background: rgba(40,160,70,.5); }
#brakeBtn { right: 112px; bottom: 22px; width: 82px; height: 96px; border-radius: 20px; background: rgba(200,50,50,.45); }
#hornBtn { right: 120px; bottom: 132px; width: 56px; height: 56px; }
#fsBtn { right: 136px; top: 14px; width: 44px; height: 44px; font-size: 20px; }
#mapBtn { right: 188px; top: 14px; width: 44px; height: 44px; font-size: 20px; }
body:not(.driving) .tbtn.drive { display: none; }
body.driving .tbtn.foot { display: none; }
body.driving #carBtn { right: 30px; bottom: 166px; }

/* proximity voice: always visible while playing (desktop + phone) */
#micBtn { display: none; left: 26px; bottom: 96px; width: 52px; height: 52px; font-size: 22px; background: rgba(15,29,51,.55); z-index: 3; }
body.mode-play #micBtn { display: flex; }
.touch #micBtn { left: auto; right: 240px; top: 14px; bottom: auto; width: 44px; height: 44px; font-size: 20px; }
#micBtn.on { background: var(--brand, #1f6fe5); border-color: #fff; box-shadow: 0 0 0 4px rgba(31,111,229,.35); }

/* fast travel from the big map */
#travel { display: none; position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%); width: min(520px, calc(100vw - 24px)); background: #fff; color: #0f1d33; border-radius: 20px; padding: 12px; box-shadow: 0 10px 34px rgba(0,0,0,.35); font-family: var(--ui, system-ui); }
#travel.open { display: block; }
#travel .tv-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
#travel .tv-hd strong { font: 800 16px var(--ui, system-ui); } #travel .tv-hd span { flex: 1; font: 600 13px var(--ui, system-ui); color: #6b7a90; }
#bigmap #travel button { color: #0f1d33; background: #eef3fb; border: 0; border-radius: 14px; padding: 10px 12px; font: 800 14px var(--ui, system-ui); }
#travel .tv-hd button { padding: 6px 10px !important; }
#travel .tv-opts { display: flex; gap: 8px; } #bigmap #travel .tv-opts button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
#travel .tv-opts b { color: #1554b8; font-size: 13px; } #travel .tv-opts small { font-weight: 600; font-size: 11px; color: #6b7a90; }
#bigmap #travel button[data-go="taxi"] { background: #fff5d6; } #bigmap #travel button:disabled { opacity: .45; }
#bigmap #travel .tv-home { width: 100%; margin-top: 8px; background: #1f6fe5; color: #fff; }
