:root {
  --stone: #caa472;
  --stone-dark: #9c7c4f;
  --ink: #2a2118;
  --panel: rgba(28, 22, 15, 0.82);
  --accent: #e9c46a;
  --danger: #e25b45;
}

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

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #1a1410; color: #f3e9d8;
  font-family: -apple-system, "Segoe UI", "Heebo", Arial, sans-serif;
  touch-action: none; user-select: none; -webkit-user-select: none;
}

#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.hidden { display: none !important; }

/* ---------- Loading ---------- */
#loading {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, #3a2c1c, #140f0a);
}
.loading-inner { text-align: center; }
.loading-inner h1 { font-size: 14vmin; letter-spacing: 0.4vmin; color: var(--accent); text-shadow: 0 0 24px rgba(233,196,106,.4); }
.loading-inner .sub { opacity: .65; margin-bottom: 24px; }
.bar { width: 64vmin; max-width: 420px; height: 10px; background: rgba(255,255,255,.12); border-radius: 6px; overflow: hidden; margin: 0 auto; }
#loading-bar { width: 0%; height: 100%; background: var(--accent); transition: width .2s; }
#loading-text { margin-top: 12px; opacity: .7; font-size: 14px; }

/* ---------- Start screen ---------- */
#start-screen {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, #3a2c1c, #120d09);
  padding: 16px;
}
.panel {
  background: var(--panel); border: 1px solid rgba(233,196,106,.25);
  border-radius: 18px; padding: 28px 26px; max-width: 720px; width: 100%;
  backdrop-filter: blur(6px); box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.panel h1 { font-size: 9vmin; color: var(--accent); letter-spacing: .3vmin; }
.panel .tag { opacity: .7; margin: 4px 0 18px; }
.controls-help { display: flex; gap: 18px; flex-wrap: wrap; }
.controls-help .col { flex: 1; min-width: 200px; background: rgba(255,255,255,.04); border-radius: 12px; padding: 14px 16px; }
.controls-help h3 { color: var(--accent); margin-bottom: 8px; font-size: 16px; }
.controls-help ul { list-style: none; line-height: 1.9; font-size: 14px; opacity: .92; }
.controls-help b { color: #fff; }
#start-btn {
  margin-top: 20px; width: 100%; padding: 16px; font-size: 20px; font-weight: 700;
  background: var(--accent); color: #2a2014; border: none; border-radius: 12px; cursor: pointer;
  transition: transform .1s, filter .1s;
}
#start-btn:active { transform: scale(.98); filter: brightness(1.08); }
/* כפתורי הגרסה הקלאסית / המשך-משחק — סגנון משני */
#start-classic-btn, #continue-btn {
  margin-top: 10px; width: 100%; padding: 14px; font-size: 17px; font-weight: 700;
  background: rgba(255,255,255,.07); color: #f0e6d2;
  border: 1px solid rgba(233,196,106,.4); border-radius: 12px; cursor: pointer;
  transition: transform .1s, filter .1s;
}
#start-classic-btn:active, #continue-btn:active { transform: scale(.98); filter: brightness(1.14); }
.version-note { margin-top: 12px; font-size: 12.5px; opacity: .6; line-height: 1.5; }

/* ---------- HUD ---------- */
/* z-index מעל פקדי המגע (25) — כדי שכפתורי המפה/מקרא/סאונד יהיו לחיצים גם במובייל.
   ה-HUD עצמו pointer-events:none, רק האלמנטים האינטראקטיביים מקבלים auto. */
#hud { position: fixed; inset: 0; z-index: 26; pointer-events: none; }

/* מפת-מיני + לחצנים — למעלה משמאל */
#map-zone { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
#minimap {
  width: 150px; height: 150px; border-radius: 50%;
  border: 3px solid rgba(233,196,106,.6); background: #2a2118;
  box-shadow: 0 6px 18px rgba(0,0,0,.5); pointer-events: auto; cursor: pointer;
}
#map-buttons { display: flex; gap: 8px; }
#map-buttons button {
  pointer-events: auto; width: 40px; height: 40px; border-radius: 10px; font-size: 18px;
  background: var(--panel); border: 1px solid rgba(233,196,106,.5); color: #f3e9d8; cursor: pointer;
}
#map-buttons button:active { background: rgba(233,196,106,.4); }

/* מקרא צבעי המפה — איזה צבע = איזו חנות */
#map-legend {
  background: var(--panel); border: 1px solid rgba(233,196,106,.4); border-radius: 10px;
  padding: 6px 8px; font-size: 11px; line-height: 1.55; color: #f3e9d8;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px;
  max-width: 230px; box-shadow: 0 4px 14px rgba(0,0,0,.45);
}
#map-legend.hidden { display: none; }
.legend-row { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend-dot {
  width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto;
  border: 1px solid rgba(0,0,0,.4);
}

/* סטטוס — למעלה מימין */
#stats { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
#clockbox { display: flex; gap: 8px; align-items: center; }
#clock { font-size: 20px; font-weight: 800; color: #fff; text-shadow: 0 2px 5px rgba(0,0,0,.6); font-variant-numeric: tabular-nums; }
#weather { font-size: 13px; background: var(--panel); padding: 2px 8px; border-radius: 12px; border: 1px solid rgba(255,255,255,.15); white-space: nowrap; }
#money { font-size: 26px; font-weight: 800; color: var(--accent); text-shadow: 0 2px 6px rgba(0,0,0,.6); }
#wanted { font-size: 22px; letter-spacing: 3px; min-height: 26px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.bar-wrap { display: flex; align-items: center; gap: 8px; }
.bar-label { font-size: 12px; width: 30px; opacity: .85; text-align: center; }
.meter { width: 140px; height: 13px; background: rgba(0,0,0,.45); border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.15); }
#health-fill { width: 100%; height: 100%; background: linear-gradient(90deg, #e25b45, #f2a25c); transition: width .15s; }
#armor-fill { width: 100%; height: 100%; background: linear-gradient(90deg, #5b8def, #8fc1ff); transition: width .15s; }

#mission { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-size: 14px; color: #fff;
  background: var(--panel); padding: 6px 12px; border-radius: 10px; border: 1px solid rgba(58,139,255,.5); white-space: nowrap; }

#weapon-box {
  position: absolute; bottom: 16px; left: 16px; background: var(--panel);
  border-radius: 10px; padding: 8px 14px; font-size: 14px; display: flex; gap: 10px; align-items: baseline;
  border: 1px solid rgba(255,255,255,.12);
}
#weapon-name { color: #fff; font-weight: 700; }
#ammo { opacity: .8; }

#district-name {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  font-size: 15px; opacity: 0; transition: opacity .4s; background: var(--panel);
  padding: 6px 16px; border-radius: 20px; border: 1px solid rgba(233,196,106,.3); color: var(--accent);
}
#district-name.show { opacity: 1; }

#toast {
  position: absolute; top: 18%; left: 50%; transform: translateX(-50%);
  background: var(--panel); padding: 10px 18px; border-radius: 10px; font-size: 16px;
  border: 1px solid rgba(233,196,106,.3); opacity: 0; transition: opacity .3s; max-width: 80vw; text-align: center;
}
#toast.show { opacity: 1; }

#prompt {
  position: absolute; bottom: 30%; left: 50%; transform: translateX(-50%);
  background: rgba(28,22,15,.85); padding: 10px 18px; border-radius: 10px; font-size: 15px;
  border: 1px solid rgba(233,196,106,.5); color: #f3e9d8; text-align: center; white-space: nowrap;
}
#prompt b { color: var(--accent); }

/* כוונת ירי במרכז המסך */
#crosshair {
  position: absolute; top: 50%; left: 50%; width: 28px; height: 28px;
  transform: translate(-50%, -50%); pointer-events: none;
  border: 2px solid rgba(255,255,255,.45); border-radius: 50%;
  transition: border-color .12s, transform .12s;
}
#crosshair::before, #crosshair::after {
  content: ''; position: absolute; background: rgba(255,255,255,.9);
  box-shadow: 0 0 3px rgba(0,0,0,.9);
}
#crosshair::before { left: 50%; top: -7px; width: 2px; height: 42px; transform: translateX(-50%); }
#crosshair::after  { top: 50%; left: -7px; height: 2px; width: 42px; transform: translateY(-50%); }
#crosshair.hit { border-color: rgba(255,80,60,.95); transform: translate(-50%, -50%) scale(1.25); }
#crosshair.hit.head { border-color: rgba(255,210,60,1); transform: translate(-50%, -50%) scale(1.45); }
/* מצב זום — כוונת צלפים עדינה עם נקודת מרכז */
#crosshair.zoom { width: 16px; height: 16px; border-color: rgba(255,235,170,.85); }
#crosshair.zoom::before { top: -14px; height: 44px; width: 1.5px; }
#crosshair.zoom::after  { left: -14px; width: 44px; height: 1.5px; }

/* וינייטה קולנועית קבועה — עומק ופוקוס למרכז התמונה */
#cine-vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 17;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(10, 8, 14, 0.32) 100%);
}

/* וינייטה אדומה כשנפגעים */
#damage-vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 18; opacity: 0;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(170,10,10,.55) 100%);
  transition: opacity .1s;
}
#damage-vignette.show { opacity: 1; transition: opacity .05s; }

/* ---------- גלגל-נשקים ---------- */
#weapon-wheel {
  position: fixed; inset: 0; z-index: 24; pointer-events: none;
  display: none; opacity: 0; transition: opacity .12s;
  background: radial-gradient(circle at center, rgba(8,6,10,.55) 0%, rgba(8,6,10,.2) 30%, transparent 55%);
}
#weapon-wheel.show { display: block; opacity: 1; }
.ww-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 70px; height: 70px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(28,22,15,.85); border: 2px solid rgba(233,196,106,.5); color: var(--accent);
  font-size: 13px; font-weight: 700;
}
.ww-seg {
  position: absolute; top: 50%; left: 50%; width: 92px; min-height: 64px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 8px 6px; border-radius: 14px; text-align: center;
  background: rgba(20,16,11,.78); border: 2px solid rgba(255,255,255,.14);
  transition: transform .1s, border-color .1s, background .1s;
}
.ww-seg.active {
  background: rgba(60,46,20,.92); border-color: var(--accent);
  box-shadow: 0 0 18px rgba(233,196,106,.55);
}
.ww-ico { font-size: 26px; line-height: 1; }
.ww-name { font-size: 12px; color: #f3e9d8; }
.ww-ammo { font-size: 11px; opacity: .7; }
.ww-seg.active .ww-name { color: var(--accent); font-weight: 700; }

/* ---------- מסך קולנועי: WASTED / BUSTED ---------- */
#cine-screen {
  position: fixed; inset: 0; z-index: 58; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.45) 30%, rgba(0,0,0,.85) 100%);
}
#cine-screen.show { opacity: 1; visibility: visible; }
.cine-title {
  font-size: clamp(48px, 13vw, 150px); font-weight: 900; letter-spacing: .06em;
  font-style: italic; transform: scale(1.4); opacity: 0; transition: transform 1.2s ease, opacity .8s ease;
  text-shadow: 0 4px 30px rgba(0,0,0,.8);
}
#cine-screen.show .cine-title { transform: scale(1); opacity: 1; }
#cine-screen.wasted .cine-title { color: #e23b2e; }
#cine-screen.busted .cine-title { color: #4a8be8; }
.cine-sub {
  margin-top: 6px; font-size: clamp(14px, 3.5vw, 22px); color: #e8dcc8; opacity: 0;
  transition: opacity .8s ease .35s;
}
#cine-screen.show .cine-sub { opacity: .9; }
/* השחתת-צבע קולנועית על הקנבס בזמן מסך מוות/מעצר */
#game.cine-fx { filter: grayscale(.85) brightness(.7) contrast(1.1); transition: filter .6s ease; }

/* ---------- Touch UI ---------- */
#touch-ui { position: fixed; inset: 0; z-index: 25; pointer-events: none; }
/* תנועה: אגודל שמאל (אזור דינמי). מבט+לחצנים: אגודל ימין. */
#move-pad { position: absolute; left: 0; bottom: 0; width: 45%; height: 80%; pointer-events: auto; touch-action: none; }
#joystick {
  position: absolute; display: none; width: 130px; height: 130px; z-index: 1;
  border-radius: 50%; background: rgba(255,255,255,.10); border: 2px solid rgba(255,255,255,.22);
  pointer-events: none; touch-action: none;
}
#joystick .knob {
  position: absolute; top: 50%; left: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px;
  border-radius: 50%; background: rgba(233,196,106,.8); border: 2px solid rgba(255,255,255,.5);
}
.touch-btn {
  position: absolute; pointer-events: auto; touch-action: none;
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(28,22,15,.7); border: 2px solid rgba(233,196,106,.5);
  color: #f3e9d8; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.touch-btn:active { background: rgba(233,196,106,.5); }
/* פריסת לחצנים בקשת — בלי חפיפות (נבדק גיאומטרית) */
#btn-attack { bottom: 110px; right: 24px;  width: 86px; height: 86px; background: rgba(226,91,69,.55); }
#btn-jump   { bottom: 52px;  right: 132px; width: 64px; height: 64px; }
#btn-enter  { bottom: 150px; right: 124px; width: 64px; height: 64px; }
#btn-weapon { bottom: 28px;  right: 36px;  width: 64px; height: 64px; }
#btn-mission{ bottom: 232px; right: 116px; width: 56px; height: 56px; font-size: 12px; }
#btn-phone  { bottom: 286px; right: 36px;  width: 56px; height: 56px; font-size: 24px; }
#btn-zoom   { bottom: 208px; right: 36px;  width: 56px; height: 56px; font-size: 22px; }
#btn-zoom.on { background: rgba(233,196,106,.6); border-color: #fff; }
/* אזור מבט: חצי ימין של המסך (הלחצנים מעליו תופסים עדיפות) */
#look-pad   { position: absolute; top: 0; right: 0; width: 55%; height: 100%; pointer-events: auto; touch-action: none; }

/* ---------- קטלוג חנות נשק ---------- */
#shop-menu {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  background: rgba(10,8,5,.8); pointer-events: auto;
}
#shop-menu-panel {
  width: min(92vw, 460px); max-height: 86vh; overflow-y: auto;
  background: #1d1812; border: 2px solid rgba(233,196,106,.55); border-radius: 14px;
  padding: 18px 20px; box-shadow: 0 10px 40px rgba(0,0,0,.6);
}
#shop-menu-panel h2 { margin: 0 0 4px; color: var(--accent); font-size: 22px; }
#shop-menu-money { color: #9fdb9f; font-weight: 700; margin-bottom: 12px; }
.shop-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px; margin-bottom: 7px; border-radius: 10px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(233,196,106,.18);
}
.shop-item .w-name { font-weight: 700; color: #f3e9d8; }
.shop-item .w-stats { font-size: 11.5px; opacity: .65; }
.shop-item button {
  min-width: 110px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(233,196,106,.5);
  background: rgba(233,196,106,.18); color: var(--accent); font-weight: 700; cursor: pointer; font-size: 13px;
}
.shop-item button:disabled { opacity: .4; cursor: default; }
.shop-item button.owned { border-color: rgba(120,200,120,.5); color: #9fdb9f; background: rgba(120,200,120,.12); }
#shop-menu-close {
  width: 100%; margin-top: 6px; padding: 10px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); color: #f3e9d8; font-weight: 700;
}

/* ---------- סמארטפון ---------- */
#phone-wrap {
  position: fixed; inset: 0; z-index: 42; display: flex; align-items: center; justify-content: center;
  background: rgba(8,6,4,.72); pointer-events: auto; backdrop-filter: blur(3px);
}
#phone-frame {
  position: relative; width: min(86vw, 320px); height: min(82vh, 600px);
  background: linear-gradient(160deg, #14161c, #0b0c10); border: 3px solid #2a2d36;
  border-radius: 34px; box-shadow: 0 18px 60px rgba(0,0,0,.7), inset 0 0 0 2px rgba(255,255,255,.04);
  padding: 14px 12px 16px; display: flex; flex-direction: column;
}
#phone-notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 16px; background: #000; border-radius: 0 0 12px 12px;
}
#phone-statusbar {
  display: flex; justify-content: space-between; align-items: center;
  color: #cfd4da; font-size: 12px; font-weight: 700; padding: 4px 10px 8px;
}
#phone-screen {
  flex: 1; overflow-y: auto; background: rgba(255,255,255,.03);
  border-radius: 18px; padding: 12px 10px; border: 1px solid rgba(255,255,255,.06);
}
#phone-app-title { color: var(--accent); font-size: 18px; font-weight: 800; text-align: center; margin-bottom: 12px; }
#phone-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.phone-tab {
  flex: 1; padding: 8px 0; border-radius: 12px; cursor: pointer; font-size: 19px; line-height: 1;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: #f3e9d8;
}
.phone-tab.active { background: rgba(233,196,106,.18); border-color: rgba(233,196,106,.5); }
.phone-tab:active { background: rgba(233,196,106,.28); }
.phone-contact {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 8px;
  border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(233,196,106,.16);
  cursor: pointer;
}
.phone-contact:active { background: rgba(233,196,106,.14); }
.phone-contact.hostile { opacity: .6; }
.phone-delegate {
  display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 12px;
  border-radius: 14px; background: rgba(120,200,120,.12); border: 1px solid rgba(120,200,120,.45); cursor: pointer;
}
.phone-delegate:active { background: rgba(120,200,120,.3); }
.phone-delegate .pc-info b { color: #cdeccd; }
.pc-avatar {
  width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex: 0 0 auto; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.pc-info { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.pc-info b { color: #f3e9d8; font-size: 15px; }
.pc-info small { color: #b9b2a2; font-size: 11.5px; }
.pc-call {
  padding: 8px 12px; border-radius: 20px; border: 1px solid rgba(120,200,120,.5); cursor: pointer;
  background: rgba(120,200,120,.16); color: #9fdb9f; font-weight: 800; font-size: 13px; white-space: nowrap;
}
.pc-call:active { background: rgba(120,200,120,.4); }
#phone-tip { color: #8f8a7e; font-size: 11.5px; text-align: center; margin-top: 8px; }
#phone-close {
  margin-top: 12px; padding: 11px; border-radius: 22px; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); color: #f3e9d8; font-weight: 700;
}

/* ---------- מפה מלאה ---------- */
#bigmap-wrap {
  position: fixed; inset: 0; z-index: 35; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: rgba(10,8,5,.82); pointer-events: auto;
}
#bigmap {
  width: min(92vmin, 760px); height: min(92vmin, 760px);
  border-radius: 14px; border: 2px solid rgba(233,196,106,.5); background: #2a2418;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
  touch-action: none; cursor: grab;
}
#bigmap:active { cursor: grabbing; }
#bigmap-hint { font-size: 14px; color: var(--accent); opacity: .9; text-align: center; max-width: 92vmin; }
#bigmap-controls {
  position: fixed; z-index: 36;
  left: calc(50% - min(46vmin, 380px) + 10px); top: calc(50% - min(46vmin, 380px) + 10px);
  display: flex; flex-direction: column; gap: 8px;
}
#bigmap-controls button {
  width: 42px; height: 42px; font-size: 22px; font-weight: 700; line-height: 1;
  border-radius: 10px; border: 1px solid rgba(233,196,106,.5);
  background: rgba(20,16,10,.85); color: #f3e9d8; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#bigmap-controls button:hover { background: rgba(60,48,28,.9); }

/* ---------- מובייל: צמצום וסידור ---------- */
@media (max-width: 820px), (pointer: coarse) {
  #minimap { width: 112px; height: 112px; border-width: 2px; }
  #map-buttons button { width: 36px; height: 36px; font-size: 16px; }
  #map-legend { font-size: 10px; max-width: 180px; padding: 4px 6px; }
  #clock { font-size: 17px; }
  #weather { font-size: 11px; padding: 2px 6px; }
  #money { font-size: 20px; }
  #wanted { font-size: 18px; min-height: 20px; }
  .meter { width: 104px; height: 11px; }
  .bar-label { font-size: 10px; width: 24px; }
  #mission { top: 8px; font-size: 12px; padding: 4px 9px; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; }
  /* קופסת הנשק לא תתנגש עם הג'ויסטיק/לחצנים — למרכז־תחתון */
  #weapon-box { left: 50%; transform: translateX(-50%); bottom: 12px; padding: 6px 12px; font-size: 12px; }
  #district-name { bottom: 60px; font-size: 13px; }
  #prompt { bottom: 38%; font-size: 13px; max-width: 70vw; white-space: normal; }
  #toast { font-size: 14px; top: 14%; }
}

/* ---- מעבר בין ערים: fade שחור + מסך נסיעה ברכבת ---- */
#fade {
  position: fixed; inset: 0; background: #000; opacity: 0;
  pointer-events: none; transition: opacity .6s ease; z-index: 60;
}
#fade.on { opacity: 1; pointer-events: auto; }

#ride-overlay {
  position: fixed; inset: 0; z-index: 70; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
  background: linear-gradient(#1a2230 0%, #2a3a4a 55%, #c8a86a 55%, #d9c089 100%);
}
#ride-overlay.hidden { display: none; }
/* נוף מדברי נגלל אופקית — תחושת תנועה דרך החלון */
#ride-overlay .ride-scenery {
  position: absolute; left: 0; right: 0; bottom: 38%; height: 120px;
  background:
    radial-gradient(circle at 10% 100%, #6b8f3a 0 26px, transparent 27px),
    radial-gradient(circle at 30% 100%, #5a7a30 0 34px, transparent 35px),
    radial-gradient(circle at 55% 100%, #7a9a45 0 22px, transparent 23px),
    radial-gradient(circle at 78% 100%, #6b8f3a 0 30px, transparent 31px),
    linear-gradient(transparent, transparent);
  background-repeat: repeat-x; background-size: 420px 120px;
  animation: ride-scroll 1.1s linear infinite; opacity: .8;
}
@keyframes ride-scroll { from { background-position-x: 0; } to { background-position-x: -420px; } }
#ride-overlay .ride-panel {
  position: relative; z-index: 2; margin-bottom: 8%; text-align: center;
  background: rgba(10, 20, 35, .82); color: #fff; padding: 22px 34px;
  border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.5); direction: rtl;
}
#ride-overlay .ride-title { font-size: 30px; font-weight: 800; margin-bottom: 14px; }
#ride-overlay .ride-bar-wrap {
  width: min(70vw, 460px); height: 14px; background: rgba(255,255,255,.18);
  border-radius: 8px; overflow: hidden; margin: 0 auto;
}
#ride-overlay #ride-bar {
  height: 100%; width: 0%; border-radius: 8px;
  background: linear-gradient(90deg, #2e7bd6, #57c0ff); transition: width .2s linear;
}
#ride-overlay .ride-sub { margin-top: 12px; font-size: 14px; opacity: .85; }
