/* =============================================
   THE GRAY GAMBINO — Styles
   ============================================= */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100vw; height: 100vh;
  min-height: -webkit-fill-available;
  background: #000;
  overflow: hidden;
  font-family: 'Courier New', Courier, monospace;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#gameCanvas {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  display: block;
}

/* =============================================
   UI LAYER
   ============================================= */
#ui {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.hidden { display: none !important; }

/* =============================================
   INTRO SCREEN
   ============================================= */
#intro {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 200;
  pointer-events: all;
}

.intro-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(180,20,20,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 40%, rgba(100,0,0,0.1) 0%, transparent 50%);
}

.intro-content {
  position: relative;
  text-align: center;
  padding: 20px;
  max-width: 540px;
}

.intro-eyebrow {
  color: #666;
  font-size: 11px;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.game-title {
  font-size: clamp(42px, 10vw, 80px);
  font-weight: 900;
  color: #e8e8e8;
  line-height: 0.9;
  letter-spacing: -1px;
  text-transform: uppercase;
  text-shadow:
    0 0 40px rgba(220, 40, 40, 0.6),
    0 0 80px rgba(220, 40, 40, 0.2);
}

.game-title span { color: #dc2828; }

.title-line {
  width: 60px;
  height: 3px;
  background: #dc2828;
  margin: 20px auto;
}

.intro-story {
  color: #888;
  font-size: clamp(12px, 2.5vw, 14px);
  line-height: 1.9;
  margin-bottom: 32px;
}

.intro-story strong { color: #ccc; }

#startBtn {
  background: #dc2828;
  color: #fff;
  border: none;
  padding: 14px 48px;
  font-family: 'Courier New', monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s, transform 0.1s;
  pointer-events: all;
}

#startBtn:hover  { background: #b81e1e; }
#startBtn:active { transform: scale(0.97); }

.controls-hint {
  margin-top: 18px;
  color: #444;
  font-size: 11px;
  letter-spacing: 1px;
}

@keyframes comboFloat {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  20%  { transform: translateY(-10px) scale(1.15); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.8); }
}

/* =============================================
   TOP HUD  (bigger + bolder)
   ============================================= */
#hudTop {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: max(12px, env(safe-area-inset-top)) 16px 0;
  gap: 10px;
}

.hud-block {
  background: rgba(0,0,0,0.82);
  border: 1px solid #333;
  border-radius: 4px;
  padding: 10px 18px;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hud-block.center { align-items: center; min-width: 150px; }
.hud-block.right  { align-items: flex-end; }

.hud-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: #666;
  text-transform: uppercase;
}

.hud-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.hud-value.green { color: #27ae60; }
.hud-value.red   { color: #dc2828; }

#wantedStars { display: flex; gap: 4px; margin-top: 3px; }
.star        { font-size: 22px; color: #222; line-height: 1; }
.star.lit    { color: #f39c12; text-shadow: 0 0 10px rgba(243,156,18,1), 0 0 20px rgba(243,156,18,0.5); }

/* =============================================
   RANK BAR  (bigger)
   ============================================= */
#rankBar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 8px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  display: flex;
  align-items: center;
  gap: 12px;
}

#rankName {
  color: #dc2828;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  min-width: 130px;
}

.rank-bar-bg {
  flex: 1;
  height: 6px;
  background: #1a1a1a;
  border-radius: 3px;
  overflow: hidden;
}

.rank-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #dc2828, #e74c3c);
  border-radius: 3px;
  width: 0%;
  transition: width 0.4s ease;
}

/* =============================================
   MISSION PANEL  (bigger + more visible)
   ============================================= */
#missionPanel {
  position: absolute;
  top: 80px;
  right: 16px;
  background: rgba(0,0,0,0.82);
  border: 1px solid #dc2828;
  border-radius: 4px;
  padding: 8px 10px;
  max-width: 180px;
  color: #bbb;
  font-size: 10px;
  line-height: 1.5;
  box-shadow: 0 0 12px rgba(220,40,40,0.2);
}

.mission-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.mission-icon { color: #dc2828; font-size: 11px; }

#missionTimer { margin-top: 5px; }
.timer-label { font-size: 9px; color: #aaa; margin-bottom: 2px; }
.timer-bar-bg { width: 100%; height: 4px; background: #222; border-radius: 2px; }
.timer-bar-fill { height: 4px; border-radius: 2px; transition: width 0.9s linear, background 0.3s; }

#missionTitle {
  color: #dc2828;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

#missionObjective {
  color: #f39c12;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
}

/* =============================================
   MINIMAP
   ============================================= */
#minimap {
  position: fixed;
  bottom: calc(196px + env(safe-area-inset-bottom));
  right: 14px;
  width: 110px;
  height: 110px;
  border: 2px solid #555;
  border-radius: 4px;
  background: #000;
  display: block !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.7);
}

#minimap.hidden { display: none !important; }

/* =============================================
   DISTRICT NAME POPUP
   ============================================= */
#districtName {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.9);
  font-size: clamp(22px, 5vw, 40px);
  font-weight: 900;
  letter-spacing: 6px;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(0,0,0,0.9);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* =============================================
   NOTIFICATION TOAST  (bigger + bolder)
   ============================================= */
#notification {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.92);
  border-radius: 5px;
  padding: 18px 36px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  line-height: 1.8;
  pointer-events: none;
  display: none;
  border-left: 4px solid #dc2828;
  box-shadow: 0 4px 30px rgba(0,0,0,0.8);
  min-width: 280px;
}

/* =============================================
   FLOATING CASH POPUP
   ============================================= */
.cashPop {
  position: absolute;
  color: #27ae60;
  font-size: 16px;
  font-weight: 700;
  pointer-events: none;
  z-index: 50;
  animation: floatUp 1.4s ease-out forwards;
  text-shadow: 0 0 8px rgba(39,174,96,0.8);
}

@keyframes floatUp {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-55px); }
}

/* =============================================
   BUST SCREEN
   ============================================= */
#bustScreen {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  z-index: 90;
  pointer-events: none;
  animation: bustIn 0.25s ease-out;
}
@keyframes bustIn {
  from { opacity: 0; transform: scale(1.06); }
  to   { opacity: 1; transform: scale(1); }
}
.bust-inner {
  text-align: center;
  width: 300px;
}
.bust-title {
  font-size: 52px;
  font-weight: 900;
  color: #dc2828;
  letter-spacing: 6px;
  text-shadow: 0 0 30px rgba(220,40,40,0.6);
  margin-bottom: 4px;
}
.bust-fine {
  font-size: 14px;
  color: #888;
  margin-bottom: 20px;
  letter-spacing: 1px;
}
.bust-stats {
  background: rgba(255,255,255,0.04);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px 18px;
  margin-bottom: 14px;
}
.bust-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.bust-row:last-child { border-bottom: none; }
.bust-label { color: #666; letter-spacing: 1px; font-size: 11px; }
.bust-val   { color: #eee; font-weight: 700; }
.pb-tag {
  background: #f39c12;
  color: #000;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}
.bust-pb-banner {
  color: #f39c12;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-shadow: 0 0 12px rgba(243,156,18,0.5);
}
.bust-hint {
  font-size: 11px;
  color: #555;
  font-style: italic;
}

/* =============================================
   POLICE RADIO CHATTER
   ============================================= */
#radioChatter {
  position: absolute;
  top: 110px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(100,200,100,0.9);
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(0,180,0,0.3);
  border-radius: 4px;
  padding: 5px 12px;
  pointer-events: none;
  z-index: 55;
  white-space: nowrap;
  opacity: 0;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}
#radioChatter.radio-fade {
  animation: radioShow 4s ease-out forwards;
}
@keyframes radioShow {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  10%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

/* =============================================
   SMS POPUP
   ============================================= */
#smsPopup {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  width: 370px;
  background: rgba(12, 12, 12, 0.96);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 14px 16px 16px;
  pointer-events: none;
  z-index: 70;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 32px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.04);
}
#smsPopup.sms-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.sms-header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}
.sms-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #000;
  flex-shrink: 0;
}
.sms-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.sms-name {
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sms-relation {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sms-icon {
  margin-left: auto;
  font-size: 20px;
  opacity: 0.6;
}
.sms-body {
  font-size: 14px;
  color: #ddd;
  line-height: 1.6;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  border-left: 3px solid #333;
  font-style: italic;
}

/* =============================================
   MOBILE CONTROLS
   ============================================= */
#mobileControls {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: block !important;
}

#mobileControls.hidden { display: none !important; }

#joystickZone {
  position: absolute;
  left: 0; bottom: 0;
  width: 50%;
  height: 300px;
  pointer-events: all;
}

#joystickBase {
  position: absolute;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.18);
  left: 20px;
  bottom: calc(28px + env(safe-area-inset-bottom));
  opacity: 0.65;
  pointer-events: none;
}

#joystickKnob {
  position: absolute;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  border: 2px solid rgba(255,255,255,0.65);
  opacity: 0.55;
  pointer-events: none;
  left: 44px;
  bottom: calc(72px + env(safe-area-inset-bottom));
}

/* ── Action button cluster — bottom-right corner ──
   Layout:           [RUN]
                [BRIBE] [CAR]
   CAR = primary (biggest), bottom-right
   RUN = above CAR, right-aligned
   BRIBE = bottom-left, vertically centred on CAR
*/
#actionBtns {
  position: fixed;
  right: 14px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 158px;
  height: 168px;
  pointer-events: none;
}

/* CAR — bottom-right, primary */
#btnEnterCar {
  position: absolute;
  bottom: 0; right: 0;
  pointer-events: all;
}

/* RUN — directly above CAR, right-aligned */
#btnSprint {
  position: absolute;
  bottom: 92px; right: 0;   /* 82px CAR + 10px gap */
  pointer-events: all;
}

/* BRIBE — same row as CAR, tight to the left of it */
#btnBribe {
  position: absolute;
  bottom: 5px;
  right: 90px;              /* butts up right next to CAR (82px + 8px gap) */
  pointer-events: all;
}

.abtn {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.28);
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  line-height: 1.25;
  touch-action: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.abtn-enter {
  width: 82px; height: 82px;
  border-color: rgba(39,174,96,0.9);
  background: rgba(39,174,96,0.22);
  font-size: 13px;
  box-shadow: 0 0 18px rgba(39,174,96,0.35);
}

.abtn-enter.near-car {
  border-color: #27ae60;
  background: rgba(39,174,96,0.45);
  box-shadow: 0 0 28px rgba(39,174,96,0.85);
  animation: pulse-green 0.8s ease-in-out infinite alternate;
}

@keyframes pulse-green {
  from { box-shadow: 0 0 16px rgba(39,174,96,0.5); }
  to   { box-shadow: 0 0 36px rgba(39,174,96,1.0); }
}

.abtn-sprint {
  border-color: rgba(220,40,40,0.75);
  background: rgba(220,40,40,0.18);
}

.abtn-bribe {
  border-color: rgba(243,156,18,0.75);
  background: rgba(243,156,18,0.18);
  font-size: 10px;
}

.abtn:active { opacity: 0.5; transform: scale(0.88); transition: transform 0.05s; }

/* =============================================
   VIGNETTE (heat pulse)
   ============================================= */
#vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(220,40,40,0) 100%);
  z-index: 15;
  transition: opacity 0.3s;
  opacity: 0;
}
#vignette.heat-1 { background: radial-gradient(ellipse at center, transparent 55%, rgba(220,40,40,0.25) 100%); opacity: 1; }
#vignette.heat-2 { background: radial-gradient(ellipse at center, transparent 45%, rgba(220,40,40,0.45) 100%); opacity: 1; animation: vigPulse 1.2s ease-in-out infinite alternate; }
#vignette.heat-3 { background: radial-gradient(ellipse at center, transparent 35%, rgba(220,10,10,0.65) 100%); opacity: 1; animation: vigPulse 0.7s ease-in-out infinite alternate; }
@keyframes vigPulse {
  from { opacity: 0.7; }
  to   { opacity: 1.0; }
}

/* =============================================
   RESPONSIVE TWEAKS
   ============================================= */
@media (max-width: 768px) {
  /* HUD — tighter so all 3 blocks fit; leave room for settings button */
  #hudTop       { padding: 8px 8px 0; gap: 5px; right: 80px; }
  .hud-block    { padding: 6px 8px; min-width: 0; flex: 1; }
  .hud-label    { font-size: 9px; }
  .hud-value    { font-size: 18px; }
  .star         { font-size: 15px; }
  #wantedStars  { gap: 1px; }

  /* Top-right utility buttons — safe-area aware */
  #settingsBtn  { width: 34px; height: 34px; font-size: 15px; top: max(10px, env(safe-area-inset-top)); right: 10px; }
  #muteAllBtn   { width: 34px; height: 34px; font-size: 14px; top: max(10px, env(safe-area-inset-top)); right: 52px; }
  #freeViewBtn  { width: 34px; height: 34px; font-size: 14px; top: max(10px, env(safe-area-inset-top)); right: 94px; }
  /* Push HUD down + right to clear 3 buttons */
  #hudTop       { padding-top: max(10px, env(safe-area-inset-top)); right: 136px; }

  /* Minimap — right above button cluster */
  #minimap { width: 90px; height: 90px; bottom: calc(158px + env(safe-area-inset-bottom)); right: 10px; }

  /* Action buttons — compact mobile cluster */
  .abtn       { width: 60px; height: 60px; font-size: 11px; }
  .abtn-enter { width: 70px; height: 70px; font-size: 12px; }
  #actionBtns { width: 140px; height: 140px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); }
  #btnSprint  { bottom: 78px; right: 0; }
  #btnBribe   { bottom: 5px; right: 78px; }

  /* Rank bar — clear joystick by constraining to right half */
  #rankBar { left: 50%; padding-bottom: calc(8px + env(safe-area-inset-bottom)); font-size: 11px; }
  #rankName { min-width: 90px; font-size: 11px; }

  /* Mission panel — narrower */
  #missionPanel { max-width: 54vw; font-size: 12px; }

  /* Notification — full width friendly */
  #notification { font-size: 13px; padding: 12px 20px; max-width: 88vw; }

  /* Rank bar */
  #rankBar { font-size: 11px; padding: 3px 10px; }

  /* Bust screen inner — fit phone */
  .bust-inner { width: 88vw; }
  .bust-title { font-size: 42px; }

  /* SMS popup — narrower, higher above joystick */
  #smsPopup { width: 92vw; bottom: 300px; }
  .sms-body { font-size: 13px; }
}

/* =============================================
   MUTE ALL + SETTINGS BUTTONS
   ============================================= */
#muteAllBtn {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: 56px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.75);
  border: 1px solid #444;
  color: #aaa;
  font-size: 16px;
  cursor: pointer;
  pointer-events: all;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: border-color 0.15s, color 0.15s;
}
#muteAllBtn:hover { border-color: #f39c12; }
#muteAllBtn.muted { border-color: #dc2828; background: rgba(80,0,0,0.4); }

#freeViewBtn {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: 100px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.75);
  border: 1px solid #444;
  color: #aaa;
  font-size: 16px;
  cursor: pointer;
  pointer-events: all;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: border-color 0.15s, background 0.15s;
}
#freeViewBtn.active { border-color: #f39c12; background: rgba(243,156,18,0.25); color: #f39c12; }
#freeViewBtn:hover  { border-color: #f39c12; }

#settingsBtn {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.75);
  border: 1px solid #444;
  color: #aaa;
  font-size: 18px;
  cursor: pointer;
  pointer-events: all;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: border-color 0.15s, color 0.15s;
}
#settingsBtn:hover { border-color: #dc2828; color: #fff; }

/* =============================================
   SETTINGS OVERLAY
   ============================================= */
#settingsOverlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  pointer-events: all;
  padding: 16px;
}

#settingsOverlay.hidden { display: none !important; }

.settings-box {
  background: #0e0e0e;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 20px 22px 24px;
  color: #ccc;
  font-size: 12px;
  line-height: 1.65;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
}

.settings-section {
  border-top: 1px solid #1e1e1e;
  padding: 12px 0 4px;
}

.settings-title {
  color: #dc2828;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  color: #999;
}

.toggle-btn {
  background: rgba(39,174,96,0.2);
  border: 1px solid rgba(39,174,96,0.6);
  color: #27ae60;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 4px 14px;
  border-radius: 3px;
  cursor: pointer;
  pointer-events: all;
  transition: background 0.15s, border-color 0.15s;
}
.toggle-btn.muted {
  background: rgba(220,40,40,0.15);
  border-color: rgba(220,40,40,0.5);
  color: #dc2828;
}

.key.small { padding: 1px 5px; font-size: 10px; min-width: auto; }

.help-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
}

.help-close {
  background: none;
  border: 1px solid #333;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  border-radius: 3px;
  padding: 2px 8px;
  font-family: 'Courier New', monospace;
}
.help-close:hover { color: #fff; border-color: #dc2828; }

.help-section {
  border-top: 1px solid #1e1e1e;
  padding: 12px 0 4px;
}

.help-title {
  color: #dc2828;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.help-grid { display: flex; flex-direction: column; gap: 4px; }

.help-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.key {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 3px;
  padding: 2px 8px;
  font-size: 11px;
  color: #fff;
  font-weight: 700;
  min-width: 58px;
  text-align: center;
  white-space: nowrap;
}

.help-body { color: #999; }
.help-note {
  margin-top: 8px;
  color: #666;
  font-size: 11px;
  border-top: 1px solid #1a1a1a;
  padding-top: 8px;
}

.hl        { font-weight: 700; }
.hl.yellow { color: #f39c12; }
.hl.blue   { color: #3498db; }
.hl.green  { color: #27ae60; }

.help-play-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  background: #dc2828;
  color: #fff;
  border: none;
  padding: 12px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 3px;
  cursor: pointer;
  border-radius: 3px;
}
.help-play-btn:hover { background: #b81e1e; }

/* =============================================
   LANDSCAPE PHONE LAYOUT
   ============================================= */
@media (max-height: 500px) and (orientation: landscape) {
  /* Minimap — compact, right-aligned above buttons */
  #minimap { width: 80px; height: 80px; bottom: 148px; right: 8px; }

  /* HUD — tighten vertically */
  #hudTop   { top: 4px; padding: 4px 6px 0; right: 134px; }
  .hud-block { padding: 4px 6px; }
  .hud-value { font-size: 14px; }
  .hud-label { font-size: 8px; }
  #rankBar  { top: 44px; font-size: 10px; }

  /* Action cluster — tighter for landscape */
  .abtn       { width: 50px; height: 50px; font-size: 10px; }
  .abtn-enter { width: 60px; height: 60px; font-size: 11px; }
  #actionBtns { width: 125px; height: 130px; right: 8px; bottom: 8px; }
  #btnSprint  { bottom: 68px; }
  #btnBribe   { bottom: 5px; }

  /* Mission panel — narrower, lower top so it doesn't swamp the view */
  #missionPanel { max-width: 40vw; font-size: 11px; top: 44px; }

  /* Joystick zone height — keep it reachable */
  #joystickZone { height: 100%; }

  /* Notification — smaller */
  #notification { font-size: 12px; padding: 10px 16px; top: 50%; transform: translate(-50%, -50%); }

  /* Utility buttons — pull down slightly so they don't clip */
  #settingsBtn  { top: 6px; }
  #muteAllBtn   { top: 6px; }
  #freeViewBtn  { top: 6px; }

  /* Bust screen — landscape scroll */
  .bust-inner { width: 72vw; max-height: 90vh; overflow-y: auto; }
  .bust-title { font-size: 36px; }
}
