/* ============================================================
   DUNE STORM — style.css
   Mobile-first, RTL, safe-area aware. Warm desert theme.
   ============================================================ */

:root {
  --bg: #141009;
  --panel: rgba(26, 20, 13, 0.88);
  --panel-line: rgba(245, 185, 66, 0.28);
  --amber: #f5b942;
  --amber-deep: #c8922a;
  --sand: #d9a45b;
  --green: #7ec850;
  --red: #e5484d;
  --text: #f3ead6;
  --text-dim: #b8ad92;
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  color: var(--text);
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}

#screen-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #141009 url('../ASSETS/SYSTEM/THEME.webp') no-repeat center center / cover;
}

canvas#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
body:not(.playing) canvas#game { display: none !important; }

/* ================= BUTTONS & TOUCH OPTIMIZATIONS ================= */
button, .btn, .btn-play-hero, .btn-garage-hero, .menu-top-icon-btn, .bottom-hero-icon-btn, .mode-card, .profile-chip {
  touch-action: manipulation !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  cursor: pointer !important;
}
.btn {
  pointer-events: auto; cursor: pointer;
  font-family: inherit; font-weight: 800; color: var(--amber);
  background: linear-gradient(180deg, rgba(245,185,66,.14), rgba(245,185,66,.05));
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  padding: 13px 42px;
  font-size: 17px; letter-spacing: .5px;
  transition: transform .08s, background .15s, box-shadow .15s;
}
.btn:hover:not(:disabled) { box-shadow: 0 0 22px rgba(245,185,66,.25); }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn.primary { background: var(--amber); color: #221703; border-color: transparent; }
.btn.primary:hover { box-shadow: 0 6px 30px rgba(245,185,66,.45); }
.btn.big { padding: 17px 64px; font-size: 21px; }
.btn.slim { padding: 10px 26px; font-size: 14px; }
.btn.tiny { padding: 7px 16px; font-size: 13px; border-radius: 9px; }
.btn.back {
  position: relative;
  margin-top: 12px;
  margin-bottom: max(14px, env(safe-area-inset-bottom));
  flex-shrink: 0;
  z-index: 100;
  pointer-events: auto !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  padding: 12px 38px;
}
.btn.buy {
  background: linear-gradient(135deg, #2e8b40, #1f6b2f);
  border: 1.2px solid #57c46a;
  color: #ffffff !important;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(32, 109, 48, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn.buy:hover {
  background: linear-gradient(135deg, #38a34d, #27813a);
  border-color: #7ee692;
  box-shadow: 0 3px 10px rgba(87, 196, 106, 0.4);
}
.btn.buy .coin-img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
.btn.done { opacity: .55; }
.btn:disabled { cursor: default; opacity: .6; }

/* ================= SCREENS ================= */
.screen {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 12px;
  background:
    radial-gradient(120% 90% at 70% 10%, rgba(245,185,66,.07), transparent 55%),
    linear-gradient(165deg, rgba(18,13,8,.96), rgba(26,18,10,.98));
  padding: max(16px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  overflow-y: auto;
  pointer-events: auto;
}
.screen.overlay {
  z-index: 100 !important;
  justify-content: center;
  background: rgba(12, 9, 5, .88);
  backdrop-filter: blur(8px);
}
.hidden { display: none !important; }

#screen-menu {
  background: url('../ASSETS/SYSTEM/THEME.webp') no-repeat center center / cover;
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
}

/* ================= STUDIO SPLASH SCREEN (KKO) ================= */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: auto;
  transition: opacity 0.6s ease-in-out;
}
.splash-screen.hidden {
  display: none !important;
}
.splash-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.8s ease-in-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.splash-logo-wrap.show {
  opacity: 1;
  transform: scale(1);
}
.splash-logo-wrap.fade-out {
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.7s ease-in-out, transform 0.7s ease-in;
}
.splash-studio-logo {
  max-width: min(340px, 78vw);
  max-height: min(240px, 65vh);
  object-fit: contain;
  filter: drop-shadow(0 0 35px rgba(255, 215, 80, 0.25)) drop-shadow(0 4px 20px rgba(0,0,0,0.9));
}
.splash-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 185, 66, 0.15) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}

/* ================= LOADING SCREEN (THEMO) ================= */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: #0d0905;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.5s ease-out;
  padding: 0 !important;
}
.loading-screen.hidden {
  display: none !important;
}
.loading-backdrop {
  position: absolute;
  inset: 0;
  background: url('../ASSETS/SYSTEM/THEMO.webp') center center / cover no-repeat;
  filter: saturate(1.1) brightness(0.95);
  transform: scale(1.02);
  transition: transform 5s ease-out;
}
.loading-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 65%, rgba(0,0,0,0.75) 100%);
  pointer-events: none;
}
.loading-edge-bar-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.loading-edge-bar-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  font-size: 13px;
  font-weight: 800;
}
.loading-tip-text {
  color: #ffd700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.95), 0 0 12px rgba(0,0,0,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.loading-pct-text {
  color: #ffd700;
  font-family: Consolas, monospace;
  font-size: 15px;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,0.95), 0 0 12px rgba(0,0,0,0.9);
}
.loading-edge-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.75);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
}
.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffb300 0%, #ffd700 50%, #fff176 100%);
  box-shadow: 0 0 14px #ffd700, 0 0 26px rgba(255, 215, 0, 0.85);
  transition: width 0.12s linear;
}

/* ================= MENU TOP BAR ================= */
.menu-top-bar {
  position: absolute; top: max(8px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right));
  display: flex; justify-content: space-between; align-items: flex-start;
  z-index: 10; pointer-events: auto;
}

.profile-chip {
  display: flex; align-items: center; gap: 8px;
  background: transparent;
  border: none;
  border-radius: 0; padding: 0;
  box-shadow: none;
  cursor: pointer;
}
.profile-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--amber);
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.7));
}
.profile-name {
  font-weight: 900; font-size: 14px; color: #ffffff;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.95), 0 0 10px rgba(0,0,0,0.8);
}

.menu-top-left-wrap {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.menu-currency-display {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-top: 3px; /* Aligned to the top */
  margin-inline-end: 6px; /* 5 units to the right */
}
.menu-coin-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.85)) drop-shadow(0 0 6px rgba(245, 185, 66, 0.4));
}
.menu-currency-display .coin-amount {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.95), 0 0 10px rgba(0,0,0,0.8);
}
.coin-curr-label {
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 2px 6px rgba(0,0,0,0.95);
  margin-inline-start: 2px;
}

.currency-chip {
  display: flex; align-items: center; gap: 7px;
  background: rgba(30, 24, 16, 0.92);
  border: 1px solid rgba(245, 185, 66, 0.45);
  border-radius: 24px; padding: 4px 16px 4px 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}
.coin-img {
  width: 26px; height: 26px; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(245,185,66,0.4));
}
.coin-amount {
  font-size: 16px; font-weight: 900; color: #ffe9a8;
  letter-spacing: 0.5px;
}
.currency-chip small {
  color: var(--amber); font-size: 11px; font-weight: 700;
  margin-inline-start: 2px;
}

/* Top Actions: Settings + Gifts (7px vertical spacing) */
.top-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
}
.menu-top-icon-btn {
  background: transparent;
  border: none;
  width: 40px; height: 40px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; outline: none;
  transition: transform .12s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.menu-top-icon-img {
  width: 36px; height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.7));
  transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.menu-top-icon-btn:hover .menu-top-icon-img {
  transform: scale(1.12);
}
.menu-top-icon-btn:active {
  transform: scale(0.92);
}

/* Gifts Button: +30% Larger with Radiant Glow & Sparkles */
#btn-gifts {
  position: relative;
  width: 52px; height: 52px;
  margin-top: 2px;
  animation: giftBounceGlow 2.4s ease-in-out infinite;
}
#btn-gifts .menu-top-icon-img {
  width: 48px; height: 48px;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8)) drop-shadow(0 4px 12px rgba(0,0,0,0.85));
}
#btn-gifts::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.5) 0%, rgba(255, 165, 0, 0.2) 55%, transparent 75%);
  animation: giftHaloPulse 1.8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: -1;
}
#btn-gifts::after {
  content: '✨';
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 14px;
  animation: sparkleTwinkle 1.6s ease-in-out infinite alternate;
  pointer-events: none;
  filter: drop-shadow(0 0 6px #ffe600);
}

/* Tasks Button */
#btn-tasks {
  position: relative;
  width: 53px; height: 53px;
  margin-top: 5px;
}
#btn-tasks .menu-top-icon-img {
  width: 48px; height: 48px;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.85)) drop-shadow(0 0 6px rgba(56, 189, 248, 0.4));
}
#btn-tasks:hover .menu-top-icon-img {
  transform: scale(1.12);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.9)) drop-shadow(0 0 10px rgba(56, 189, 248, 0.7));
}
#btn-tasks:active {
  transform: scale(0.92);
}

/* Workshop Button */
#btn-workshop {
  position: relative;
  width: 53px; height: 53px;
  margin-top: 5px;
}
#btn-workshop .menu-top-icon-img {
  width: 48px; height: 48px;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.85)) drop-shadow(0 0 6px rgba(255, 210, 94, 0.4));
  transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1), filter .25s ease;
}
#btn-workshop:hover .menu-top-icon-img {
  transform: scale(1.12);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.9)) drop-shadow(0 0 12px rgba(255, 210, 94, 0.75));
}
#btn-workshop:active {
  transform: scale(0.92);
}

@keyframes giftBounceGlow {
  0%, 100% { transform: translateY(0) scale(1); }
  15% { transform: translateY(-4px) rotate(-6deg) scale(1.08); }
  30% { transform: translateY(0) rotate(5deg) scale(1.05); }
  45% { transform: translateY(-2px) rotate(-3deg) scale(1.03); }
  60% { transform: translateY(0) rotate(0deg) scale(1); }
}

@keyframes giftHaloPulse {
  0% { transform: scale(0.85); opacity: 0.35; }
  100% { transform: scale(1.3); opacity: 0.95; filter: drop-shadow(0 0 14px rgba(255, 200, 0, 0.9)); }
}

@keyframes sparkleTwinkle {
  0% { transform: scale(0.7) rotate(0deg); opacity: 0.3; }
  50% { transform: scale(1.25) rotate(20deg); opacity: 1; }
  100% { transform: scale(0.9) rotate(-10deg); opacity: 0.5; }
}

/* ================= MENU CENTER HERO ================= */
.menu-center {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; margin-top: 4px; z-index: 50;
  pointer-events: auto;
}
.menu-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  pointer-events: none !important;
}
.menu-game-logo {
  width: clamp(230px, 36vw, 340px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.8));
  animation: logoFloat 3.5s ease-in-out infinite alternate;
  pointer-events: none !important;
}
@keyframes logoFloat {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-5px); }
}

.btn-play-hero {
  position: relative; background: transparent; border: none;
  cursor: pointer !important; padding: 0; outline: none;
  margin: 12px 0 2px; /* lowered by 6 units */
  z-index: 100; pointer-events: auto !important;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .12s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-play-hero * {
  pointer-events: none !important;
  user-select: none !important;
}
.btn-play-hero:hover { transform: scale(1.06); }
.btn-play-hero:active { transform: scale(0.95); }
.play-hero-bg {
  width: min(240px, 42vw); height: auto; display: block;
  filter: drop-shadow(0 6px 18px rgba(245,185,66,0.45));
}
.play-hero-text {
  position: absolute; top: 48%; left: 50%; transform: translate(-50%, -50%);
  font-size: clamp(20px, 3vw, 26px); font-weight: 900; color: #1a1000;
  letter-spacing: 1.5px; text-shadow: 0 1px 1px rgba(255,255,255,0.4);
}

/* ================= MENU BOTTOM BAR ================= */
.menu-bottom-bar {
  position: absolute; bottom: max(8px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right));
  display: flex; justify-content: space-between; align-items: flex-end;
  z-index: 10; pointer-events: auto;
}

.btn-garage-hero {
  position: relative;
  background: transparent; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .12s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none; padding: 0;
  margin-right: 12px;
  margin-bottom: -10px; /* lowered by 6 units */
  transform: translateY(6px);
}
.garage-hero-img {
  width: clamp(150px, 22vw, 196px); height: auto; display: block;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.7));
}
.garage-hero-label {
  position: absolute; top: 51%; left: 56%;
  transform: translate(-50%, -50%);
  font-size: clamp(13.5px, 2vw, 17.5px);
  font-weight: 900;
  color: #000000;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(255,255,255,0.7);
  -webkit-text-stroke: 0.4px #000000;
  pointer-events: none;
  white-space: nowrap;
}
.btn-garage-hero:hover { transform: translateY(6px) scale(1.06); }
.btn-garage-hero:active { transform: translateY(6px) scale(0.95); }

.bottom-extra-btns {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 2px;
}
.bottom-hero-icon-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bottom-hero-icon-img {
  width: clamp(52px, 8.5vw, 70px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.65));
  transition: transform .2s ease;
}
.bottom-hero-icon-btn:hover {
  transform: scale(1.1);
}
.bottom-hero-icon-btn:active {
  transform: scale(0.93);
}

/* ================= MODE SELECTION (BULLETIN BOARD) ================= */
#screen-modes {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: #141009 url('../ASSETS/SYSTEM/SELECT%20MODE/THEMEMD.webp') no-repeat center center / cover;
  overflow: hidden;
  padding: 0;
}

.modes-back-btn {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(26, 19, 12, 0.9) !important;
  border: 1.5px solid rgba(245, 185, 66, 0.45) !important;
  border-radius: 20px !important;
  padding: 4px 14px !important;
  color: var(--amber) !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.7) !important;
  backdrop-filter: blur(8px);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease;
}
.modes-back-btn:hover {
  transform: scale(1.06);
  background: rgba(245, 185, 66, 0.25) !important;
}
.modes-back-btn:active {
  transform: scale(0.94);
}

.modes-posters-wrap {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.5vw, 30px);
  width: 100%;
  max-width: min(840px, 94vw);
  margin-top: clamp(6px, 2.0vh, 18px);
  z-index: 70;
  pointer-events: auto;
}

.mode-poster-card {
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer !important;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s cubic-bezier(0.25, 1, 0.5, 1);
  transform-origin: center center;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.mode-poster-card * {
  pointer-events: none !important;
}

.poster-city-card {
  transform: rotate(-2.8deg);
}
.poster-travel-card {
  transform: rotate(0deg) scale(1.02);
  z-index: 2;
}
.poster-mountain-card {
  transform: rotate(2.8deg);
}

.mode-poster-paper {
  height: clamp(185px, 52vh, 320px);
  width: auto;
  max-width: min(165px, 30vw);
  object-fit: contain;
  filter: none;
  transition: transform 0.12s ease;
}

.poster-city-card:hover {
  transform: rotate(-2.8deg) scale(1.035);
}
.poster-travel-card:hover {
  transform: rotate(0deg) scale(1.055);
}
.poster-mountain-card:hover {
  transform: rotate(2.8deg) scale(1.035);
}

/* Light, tactile press feedback on touch/click */
.poster-city-card:active {
  transform: rotate(-2.8deg) scale(0.96) translateY(2px);
}
.poster-travel-card:active {
  transform: rotate(0deg) scale(0.96) translateY(2px);
}
.poster-mountain-card:active {
  transform: rotate(2.8deg) scale(0.96) translateY(2px);
}

.logo {
  font-size: clamp(40px, 8vw, 76px);
  letter-spacing: 7px; font-weight: 900;
  text-shadow: 0 0 34px rgba(245,185,66,.35), 0 4px 0 rgba(0,0,0,.35);
}
.logo em { font-style: normal; color: var(--amber); }
.tagline { color: var(--text-dim); letter-spacing: 2px; margin-bottom: 8px; font-size: 14px; }
.menu-meta {
  margin-top: 10px; display: flex; gap: 34px; text-align: center;
}
.menu-meta small { display: block; color: var(--text-dim); font-size: 11px; letter-spacing: 1px; margin-bottom: 3px; }
.menu-meta b { font-size: 18px; color: var(--amber); }

.scr-title { font-size: 16px; letter-spacing: 2px; color: var(--amber); margin-top: 2px; margin-bottom: 2px; font-weight: 900; }
.wallet-chip { font-size: 11.5px; color: var(--text-dim); margin-bottom: 4px; }
.wallet-chip b { color: var(--amber); font-size: 13px; }

/* ================= VEHICLE HEALTH SCREEN ================= */
/* ================= VEHICLE HEALTH & WHEELS STORE ================= */
#screen-health {
  z-index: 60;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, rgba(32, 22, 12, 0.97) 0%, rgba(12, 8, 4, 0.99) 100%);
  backdrop-filter: blur(8px);
  padding: max(10px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  direction: rtl;
  overflow: hidden;
}
.health-screen-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  width: min(520px, 92vw);
  background: linear-gradient(135deg, rgba(28, 20, 10, 0.96), rgba(16, 11, 6, 0.98));
  border: 1.5px solid rgba(245, 185, 66, 0.35);
  border-radius: 0px;
  padding: 16px 20px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
  position: relative;
}
.health-screen-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border-top: 2px solid rgba(245,185,66,0.6);
  border-left: 2px solid rgba(245,185,66,0.6);
}
.health-screen-container::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 12px; height: 12px;
  border-bottom: 2px solid rgba(245,185,66,0.6);
  border-right: 2px solid rgba(245,185,66,0.6);
}
.health-header-box {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(245, 185, 66, 0.20);
  padding-bottom: 10px;
}
.health-header-icon {
  width: 42px;
  height: 42px;
  background: rgba(245, 185, 66, 0.12);
  border: 1.2px solid rgba(245, 185, 66, 0.35);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.health-header-text {
  display: flex;
  flex-direction: column;
}
.health-header-title {
  font-size: 15px;
  font-weight: 900;
  color: #ffe9a8;
  margin: 0;
  letter-spacing: 0.3px;
}
.health-header-sub {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(245, 185, 66, 0.65);
  margin-top: 2px;
}
.hl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0;
}
.hl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(10, 8, 4, 0.75);
  border: 1px solid rgba(245, 185, 66, 0.22);
  border-radius: 0px;
  padding: 8px 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}
.hl-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 165px;
  flex-shrink: 0;
}
.hl-icon {
  font-size: 14px;
}
.hl-name {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
}
.hl-status-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 0;
  border: 1px solid;
}
.hl-track {
  flex: 1;
  height: 9px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 0px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.hl-fill {
  height: 100%;
  border-radius: 0px;
  transition: width 0.35s ease;
}
.hl-pct {
  font-size: 13px;
  font-weight: 900;
  min-width: 44px;
  text-align: left;
  direction: ltr;
}
.btn-visit-hamada {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  border-radius: 0px !important;
  background: linear-gradient(135deg, #d4900a 0%, #f5b942 100%) !important;
  color: #1a1000 !important;
  border: 1.5px solid #f5b942 !important;
  box-shadow: 0 4px 16px rgba(245, 185, 66, 0.35) !important;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease !important;
  margin-top: 4px;
}
.btn-visit-hamada:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 185, 66, 0.5) !important;
}
.btn-visit-hamada:active {
  transform: scale(0.98);
}
#health-back, .btn.back-icon-only {
  position: absolute !important;
  top: max(10px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  color: rgba(255, 255, 255, 0.85);
  padding: 6px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 80;
  transition: transform 0.15s ease, color 0.2s ease;
  border-radius: 0px !important;
}
#health-back:hover, .btn.back-icon-only:hover {
  transform: scale(1.15) translateX(-2px);
  color: var(--amber);
}
#health-back:active, .btn.back-icon-only:active {
  transform: scale(0.95);
}

/* ================= AAA GARAGE SHOWROOM (CENTERED & 2-COL LANDSCAPE) ================= */
#screen-garage {
  padding: max(4px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
}

.garage-header {
  width: 100%; max-width: 960px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px 0 4px;
  border-bottom: 1px solid rgba(245, 185, 66, 0.2);
  margin-bottom: 3px; flex-shrink: 0;
}
.garage-header-right {
  display: flex; align-items: center; gap: 10px;
}
.garage-title {
  font-size: 15px; font-weight: 900;
  color: var(--amber); letter-spacing: 1px; margin: 0;
  text-shadow: 0 0 12px rgba(245,185,66,0.3);
}
.garage-wallet-chip {
  padding: 2px 8px 2px 6px; border-radius: 14px;
  background: rgba(26, 20, 12, 0.85);
  border: 1px solid rgba(245, 185, 66, 0.35);
  gap: 5px;
}
.garage-wallet-chip .coin-img { width: 16px; height: 16px; }
.garage-wallet-chip .coin-amount { font-size: 13px; font-weight: 900; color: #ffe494; }

.garage-header-left {
  display: flex; align-items: center;
}
.garage-back-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(35, 27, 18, 0.85);
  border: 1px solid rgba(245, 185, 66, 0.35);
  color: var(--amber); border-radius: 8px;
  padding: 3px 10px !important;
  font-size: 11px !important; font-weight: 800;
  cursor: pointer; transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.garage-back-btn:hover {
  background: var(--amber); color: #1e1509; border-color: #ffe9a8;
}

/* 2-Column Split Landscape Layout */
.garage-split-layout {
  width: 100%; max-width: 960px;
  display: flex; flex-direction: row; gap: 8px;
  align-items: stretch; justify-content: space-between;
  flex: 1; min-height: 0;
}
.garage-col-stage {
  position: relative;
  flex: 1; display: flex; flex-direction: column; gap: 4px;
  justify-content: center; align-items: center;
  min-width: 0;
}
.stage-lock-icon {
  position: absolute; top: -2px; right: 8px;
  background: transparent; border: none; padding: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 25; pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.95));
}
.stage-lock-icon svg {
  width: 28px; height: 28px; fill: #f5b942; flex-shrink: 0;
}
.stage-lock-icon.hidden {
  display: none !important;
}
.garage-col-tuning {
  flex: 1.15; display: flex; flex-direction: column; gap: 0;
  justify-content: flex-start;
  min-width: 0;
  padding-top: 2px;
  overflow: visible;
}
.garage-col-tuning .garage-cat-tabs {
  flex-shrink: 0;
  margin-top: -5px;
  margin-bottom: 4px;
}
.garage-col-tuning .specs-grid-row {
  flex-shrink: 0;
  margin-top: -4px;
}
.garage-col-tuning .garage-icon-panels {
  flex-shrink: 0;
  margin-top: 2px;
}

/* 1. Hero Showcase Area */
.garage-hero-stage {
  position: relative; width: 100%; height: 120px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  flex-shrink: 0;
}
.btn-car-nav {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(35, 27, 18, 0.95);
  border: 1.5px solid rgba(245, 185, 66, 0.5);
  color: var(--amber); font-size: 16px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
  flex-shrink: 0; z-index: 15;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn-car-nav:hover {
  background: var(--amber); color: #1e1509;
  border-color: #ffe9a8; transform: scale(1.08);
}
.btn-car-nav:active { transform: scale(0.92); }

.showroom-stage-center {
  position: relative; flex: 1; height: 120px;
  background: transparent; border: none;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
  touch-action: pan-y;
  user-select: none;
}
#garage-preview-canvas {
  width: 100%; height: 100%; aspect-ratio: 900 / 340; display: block; object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.7));
  cursor: grab;
  touch-action: pan-y;
}

.garage-hero-details {
  width: 100%; height: 42px; min-height: 42px; max-height: 42px; box-sizing: border-box;
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  background: rgba(26, 20, 13, 0.85);
  border-radius: 8px; padding: 4px 8px;
  border: 1px solid rgba(245, 185, 66, 0.2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  flex-shrink: 0;
}
.gh-meta { display: flex; flex-direction: column; gap: 1px; text-align: right; flex: 1; min-width: 0; overflow: hidden; }
.gh-name-row { display: flex; align-items: center; gap: 5px; }
#sh-car-name { font-size: 13px; font-weight: 900; color: #fff; margin: 0; white-space: nowrap; }
.sh-badge {
  font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
  background: rgba(126,200,80,0.18); color: var(--green); border: 1px solid rgba(126,200,80,0.4);
}
.sh-badge.active { background: rgba(87,196,106,0.18); color: #7fe692; border: 1px solid rgba(87,196,106,0.4); }
.sh-badge.owned { background: rgba(58,159,216,0.18); color: #82ccf5; border: 1px solid rgba(58,159,216,0.4); }
.sh-badge.locked { background: rgba(245, 185, 66, 0.16); color: #ffe494; border: 1px solid rgba(245, 185, 66, 0.6); }
#sh-car-desc { font-size: 8.5px; color: var(--text-dim); margin: 0; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sh-action-btn {
  height: 28px; line-height: 26px; padding: 0 10px !important; font-size: 11px !important; font-weight: 900;
  white-space: nowrap; flex-shrink: 0; border-radius: 7px !important; box-sizing: border-box;
}

/* ── Garage Category Filter Tabs ─────────────────────────────────────── */
.garage-cat-tabs {
  display: flex;
  flex-direction: row-reverse;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0 2px 7px 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.garage-cat-tabs::-webkit-scrollbar { display: none; }

.gcat-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 14px;
  border: 1.2px solid rgba(245, 185, 66, 0.30);
  background: rgba(30, 23, 15, 0.75);
  color: #c9a84c;
  font-size: 10px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
}
.gcat-btn:hover {
  background: rgba(245, 185, 66, 0.15);
  border-color: rgba(245, 185, 66, 0.55);
  color: #ffe9a8;
}
.gcat-btn.active {
  background: linear-gradient(135deg, #c68a00, #f5b942);
  border-color: #f5b942;
  color: #1a1000;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(245, 185, 66, 0.30);
}
.gcat-btn:active { transform: scale(0.94); }

.gcat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 7px;
  background: rgba(255,255,255,0.12);
  color: inherit;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0;
  margin-right: 2px;
  vertical-align: middle;
  line-height: 1;
  transition: background 0.18s ease;
}
.gcat-btn.active .gcat-count {
  background: rgba(0,0,0,0.22);
  color: #1a1000;
}

/* Specs Grid (Clean 2x2 Showcase of Vehicle Stats) */
.specs-grid-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  height: auto;
  min-height: 0;
  flex-shrink: 0;
}
.spec-card {
  background: rgba(30, 23, 15, 0.88);
  border: 1px solid rgba(245, 185, 66, 0.22);
  border-radius: 8px;
  padding: 7px 9px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.40);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.spec-card:hover {
  border-color: rgba(245, 185, 66, 0.48);
  transform: translateY(-1px);
}
.spec-top { display: flex; justify-content: space-between; align-items: center; }
.spec-icon {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.spec-icon svg { width: 12px; height: 12px; }
.spec-icon-speed  { color: #f5b942; background: rgba(245, 185, 66, 0.15); }
.spec-icon-fuel   { color: #57c46a; background: rgba(87,  196, 106, 0.15); }
.spec-icon-torque { color: #e5484d; background: rgba(229,  72,  77, 0.15); }
.spec-icon-grip   { color: #3a9fd8; background: rgba(58,  159, 216, 0.15); }
.spec-info  { display: flex; justify-content: space-between; align-items: baseline; }
.spec-label { font-size: 9.5px; font-weight: 700; color: var(--text-dim); }
.spec-val   { font-size: 11.5px; font-weight: 900; color: #ffe9a8; letter-spacing: 0.2px; }
.spec-bar   { width: 100%; height: 4px; background: rgba(0,0,0,0.65); border-radius: 2px; overflow: hidden; }
.spec-fill  { height: 100%; border-radius: 2px; background: linear-gradient(90deg, #f5b942, #ffe494); }
.spec-fill.fuel   { background: linear-gradient(90deg, #57c46a, #9fe0a8); }
.spec-fill.torque { background: linear-gradient(90deg, #e5484d, #ff9d92); }
.spec-fill.grip   { background: linear-gradient(90deg, #3a9fd8, #82ccf5); }

/* ── Garage 3 Sharp Icon Panels ──────────────────────────────────────── */
.garage-icon-panels {
  display: flex;
  flex-direction: row-reverse;
  gap: 5px;
  margin-top: 5px;
  width: 85%;
  align-self: center;
}
.gip-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: rgba(20, 15, 8, 0.80);
  border: 1.5px solid rgba(245, 185, 66, 0.22);
  border-radius: 0;                     /* حاد تماماً */
  padding: 8%;
  box-sizing: border-box;
  cursor: pointer;
  color: rgba(245, 185, 66, 0.60);
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
  position: relative;
  overflow: hidden;
}
/* حرف زاوية قصاصة علوية يسار */
.gip-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 10px; height: 10px;
  border-top: 2px solid rgba(245,185,66,0.45);
  border-left: 2px solid rgba(245,185,66,0.45);
  pointer-events: none;
  z-index: 2;
}
/* حرف زاوية قصاصة سفلية يمين */
.gip-card::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 10px; height: 10px;
  border-bottom: 2px solid rgba(245,185,66,0.45);
  border-right: 2px solid rgba(245,185,66,0.45);
  pointer-events: none;
  z-index: 2;
}
.gip-card:hover {
  border-color: rgba(245, 185, 66, 0.55);
  color: rgba(245, 185, 66, 0.95);
  background: rgba(30, 20, 5, 0.92);
}
.gip-card:hover::before,
.gip-card:hover::after {
  border-color: rgba(245,185,66,0.9);
}
.gip-card:active { transform: scale(0.96); }
.gip-card svg {
  width: 100%;
  height: 100%;
  display: block;
}
.gip-card img, .gip-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.85));
  transition: transform 0.18s ease;
}
.gip-card:hover img, .gip-card:hover .gip-img {
  transform: scale(1.10);
}
/* علامة الاستفهام — لون مختلف خافت */
.gip-mystery {
  color: rgba(180, 180, 200, 0.45);
  border-color: rgba(180, 180, 200, 0.18);
}
.gip-mystery::before,
.gip-mystery::after {
  border-color: rgba(180,180,200,0.35);
}
.gip-mystery:hover {
  color: rgba(200, 200, 230, 0.90);
  border-color: rgba(200, 200, 230, 0.50);
  background: rgba(20, 18, 30, 0.92);
}
.gip-mystery:hover::before,
.gip-mystery:hover::after {
  border-color: rgba(200,200,230,0.80);
}

/* ================= SERDAB (PARTS VAULT) SCREEN ================= */
#screen-serdab {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%; height: 100%;
  background: #0d0b07;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}
.serdab-header {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(245,185,66,0.18);
  flex-shrink: 0;
  gap: 10px;
}
.serdab-back {
  background: none;
  border: 1.5px solid rgba(245,185,66,0.35);
  border-radius: 0;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: #f5b942;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
}
.serdab-back:hover { background: rgba(245,185,66,0.10); }
.serdab-back:active { transform: scale(0.93); }
.serdab-title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  color: #ffe9a8;
  letter-spacing: 0.5px;
}
.serdab-wallet-chip {
  display: flex; align-items: center; gap: 4px;
  background: rgba(245,185,66,0.10);
  border: 1px solid rgba(245,185,66,0.28);
  border-radius: 0;
  padding: 4px 8px;
  color: #f5b942;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Grid */
.serdab-grid {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: row-reverse;
  gap: 8px;
  padding: 12px 12px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-items: center;
}
.serdab-grid::-webkit-scrollbar { display: none; }

/* Card — حواف حادة ومتساوية في كل الأبعاد */
.serdab-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 8px 6px 8px;
  border-radius: 0;
  border: 1.5px solid rgba(245,185,66,0.22);
  background: rgba(18,13,6,0.90);
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
  overflow: hidden;
  flex: 0 0 calc(20% - 7px);   /* 5 visible per row */
  min-width: 82px;
  max-width: 110px;
  height: 168px;               /* كل المربعات بالظبط كد بعض */
}
/* corner cuts */
.serdab-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 10px; height: 10px;
  border-top: 2px solid rgba(245,185,66,0.40);
  border-right: 2px solid rgba(245,185,66,0.40);
  pointer-events: none;
  z-index: 2;
}
.serdab-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 10px; height: 10px;
  border-bottom: 2px solid rgba(245,185,66,0.40);
  border-left: 2px solid rgba(245,185,66,0.40);
  pointer-events: none;
  z-index: 2;
}
.serdab-card.serdab-owned:hover {
  border-color: rgba(245,185,66,0.55);
  background: rgba(30,20,5,0.95);
}
.serdab-card.serdab-owned:hover::before,
.serdab-card.serdab-owned:hover::after {
  border-color: rgba(245,185,66,0.85);
}
.serdab-card.serdab-active {
  border-color: #f5b942;
  background: rgba(35,25,5,0.95);
}
.serdab-card.serdab-active::before,
.serdab-card.serdab-active::after {
  border-color: #f5b942;
}
.serdab-card.serdab-locked {
  border-color: rgba(120,100,60,0.20);
  cursor: default;
  opacity: 0.85;
}

/* Real image wrapper & image */
.srd-img-wrap {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(0,0,0,0.25);
  flex-shrink: 0;
}
.srd-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.serdab-locked .srd-img { filter: grayscale(1) brightness(0.45); }
.serdab-active .srd-img { filter: drop-shadow(0 0 6px rgba(245,185,66,0.55)); }

/* Name */
.srd-name {
  font-size: 10px;
  font-weight: 800;
  color: #ffe9a8;
  text-align: center;
  line-height: 1.25;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
}
.serdab-locked .srd-name { color: rgba(200,180,120,0.45); }

/* Bonus tags row */
.srd-bonuses {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 3px;
  height: 20px;
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
}
.srd-bonus {
  font-size: 8px;
  font-weight: 800;
  border-radius: 0;
  padding: 1px 4px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.srd-bonus.speed  { background: rgba(245,185,66,0.12); color: #f5b942; border-color: rgba(245,185,66,0.25); }
.srd-bonus.torque { background: rgba(229,72,77,0.12);  color: #e5484d; border-color: rgba(229,72,77,0.25); }
.srd-bonus.grip   { background: rgba(58,159,216,0.12); color: #3a9fd8; border-color: rgba(58,159,216,0.25); }
.srd-bonus.stock  { background: rgba(140,140,140,0.10); color: #888; border-color: rgba(140,140,140,0.20); }

/* Status slot & Active badge */
.srd-status-slot {
  height: 18px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.srd-active-badge {
  font-size: 8px;
  font-weight: 900;
  color: #1a1000;
  background: linear-gradient(135deg, #c68a00, #f5b942);
  border-radius: 0;
  padding: 2px 8px;
  letter-spacing: 0.3px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.srd-active-placeholder {
  height: 16px;
  width: 100%;
}

/* Lock overlay — يغطي الكارت */
.srd-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5,4,2,0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: rgba(180,150,80,0.70);
  backdrop-filter: blur(1px);
  border: none;
}
.srd-lock-price {
  font-size: 11px;
  font-weight: 900;
  color: rgba(245,185,66,0.70);
  letter-spacing: 0.5px;
}

/* ================= SETTINGS SCREEN (CATEGORIZED AAA) ================= */
#screen-settings {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)) 10px;
  box-sizing: border-box;
  background: radial-gradient(circle at center, rgba(32, 22, 12, 0.94) 0%, rgba(12, 8, 4, 0.98) 100%);
  backdrop-filter: blur(8px);
}
#screen-settings.hidden {
  display: none !important;
}
.settings-header {
  width: min(560px, 96vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.settings-main-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}
.settings-main-title svg {
  color: var(--amber);
  filter: drop-shadow(0 2px 4px rgba(245,185,66,0.3));
}
.back-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(36, 26, 16, 0.9) !important;
  border: 1px solid rgba(245, 185, 66, 0.4) !important;
  border-radius: 20px !important;
  padding: 4px 14px !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  color: var(--amber) !important;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5) !important;
  cursor: pointer;
  height: 28px;
}
.settings-scroll-container {
  flex: 1;
  width: min(560px, 96vw);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 185, 66, 0.4) transparent;
}
.settings-scroll-container::-webkit-scrollbar {
  width: 5px;
}
.settings-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(245, 185, 66, 0.35);
  border-radius: 4px;
}
.settings-group {
  background: rgba(24, 18, 11, 0.88);
  border: 1px solid rgba(245, 185, 66, 0.25);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.group-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 900;
  color: var(--amber);
  border-bottom: 1px solid rgba(245, 185, 66, 0.12);
  padding-bottom: 4px;
}
.group-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(245, 185, 66, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  flex-shrink: 0;
}
.group-icon svg {
  width: 14px;
  height: 14px;
}
.group-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(34, 25, 15, 0.65);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 5px 10px;
}
.row-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.row-label {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.row-label svg {
  color: var(--amber);
  flex-shrink: 0;
  opacity: 0.9;
}
.row-desc {
  font-size: 8.5px;
  color: var(--text-dim);
  line-height: 1.1;
}
.val-badge {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--amber);
  background: rgba(245, 185, 66, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
  min-width: 32px;
  text-align: center;
}
.custom-range {
  width: 100px;
  accent-color: var(--amber);
  cursor: pointer;
  height: 4px;
}
.custom-select {
  background: rgba(16, 12, 8, 0.95);
  color: #ffffff;
  border: 1.5px solid rgba(245, 185, 66, 0.45);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 800;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(55, 42, 28, 0.9);
  transition: .18s ease;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: #8c8275;
  transition: .18s ease;
  border-radius: 50%;
}
.toggle-switch input:checked + .toggle-slider {
  background-color: var(--amber);
  border-color: #ffd978;
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(18px);
  background-color: #1a1208;
}
.wipe-btn {
  height: 26px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
}
/* About Card Pro */
.about-card-pro {
  background: linear-gradient(160deg, rgba(38, 28, 17, 0.95), rgba(18, 13, 7, 0.98));
  border: 1.5px solid rgba(245, 185, 66, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  width: 100%;
}
.about-hero-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.about-logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 210, 94, 0.08);
  border: 1.5px solid rgba(255, 210, 94, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 15px rgba(245, 185, 66, 0.25);
  overflow: hidden;
}
.about-game-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.about-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: start;
  flex: 1;
}
.about-game-name {
  font-size: 14.5px;
  font-weight: 900;
  color: #ffe494;
  letter-spacing: 0.5px;
  margin: 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}
.about-creator-line {
  font-size: 12px;
  font-weight: 800;
  color: #57c46a;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}
.about-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}
.about-meta-pill {
  background: rgba(14, 10, 6, 0.85);
  border: 1px solid rgba(245, 185, 66, 0.22);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-sizing: border-box;
}
.about-meta-pill .meta-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
}
.about-meta-pill .meta-val {
  font-size: 12.5px;
  font-weight: 900;
}
.about-meta-pill .version-tag {
  color: #ffd25e;
  font-family: Consolas, 'Courier New', monospace;
  letter-spacing: 0.6px;
}
.about-meta-pill .date-tag {
  color: #7ec850;
  font-family: Consolas, 'Courier New', monospace;
  letter-spacing: 0.4px;
}

/* Eye Care Warm Filter */
body.eye-care-active::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 160, 30, 0.14);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
}

/* Color Blind Accessibility Mode */
body.color-blind-mode .traffic-light.red,
body.color-blind-mode .traffic-marker.red {
  filter: contrast(1.5) saturate(2) hue-rotate(-25deg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: min(500px, 94vw);
  margin-bottom: 6px;
}
.stats-grid > div {
  background: rgba(30, 23, 15, 0.8);
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  padding: 6px 4px;
  text-align: center;
}
.stats-grid small { display: block; color: var(--text-dim); font-size: 9.5px; margin-bottom: 2px; }
.stats-grid b { font-size: 13.5px; color: var(--amber); }

/* ================= PAUSE / GAMEOVER ================= */
#overlay-pause {
  background: rgba(12, 9, 5, 0.88);
  backdrop-filter: blur(8px);
}
.pause-t { font-size: clamp(30px, 6vw, 42px); letter-spacing: 4px; color: var(--amber); margin-bottom: 6px; font-weight: 900; }
.pause-actions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(280px, 84vw);
  align-items: stretch;
}
.pause-btn, .big-pause-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 8px 18px !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
}
.big-pause-btn {
  padding: 10px 20px !important;
  font-size: 15px !important;
}
.go-title { font-size: clamp(34px, 7vw, 54px); letter-spacing: 4px; color: var(--red); text-shadow: 0 0 26px rgba(229,72,77,.4); }
.go-reason { font-size: 17px; color: var(--text-dim); margin-top: 2px; }
.newbest {
  background: var(--amber); color: #221703; font-weight: 800; font-size: 13px;
  padding: 5px 16px; border-radius: 20px; animation: pulse .8s infinite alternate;
}
.go-stats { display: flex; gap: 26px; margin: 16px 0 8px; text-align: center; }
.go-stats small { display: block; color: var(--text-dim); font-size: 11px; margin-bottom: 3px; }
.go-stats b { font-size: 22px; color: var(--amber); }

@keyframes pulse { from { opacity: 1; } to { opacity: .55; } }

/* ================= HUD ================= */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#hud > * { position: absolute; }

.hud-top-left {
  top: 8px; left: 8px;
  display: flex; flex-direction: column; gap: 5px;
}
.fuel-box { display: flex; align-items: center; gap: 8px; }
.fuel-icon {
  width: 15px; height: 20px; border-radius: 3px 3px 4px 4px;
  background: linear-gradient(180deg, var(--fuelDark, #2e7d42), #57c46a);
  position: relative;
}
.fuel-icon::before {
  content: ''; position: absolute; top: -5px; left: 4px; width: 7px; height: 5px;
  background: #57c46a; border-radius: 2px 2px 0 0;
}
.fuel-track { width: min(150px, 24vw); height: 13px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.22); border-radius: 7px; overflow: hidden; }
.fuel-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #57c46a, #a5e087); transition: width .25s; }
.fuel-fill.low { background: linear-gradient(90deg, #c23a2e, #ff7a52); }
.cond-track { width: 86px; height: 6px; margin-left: 23px; background: rgba(0,0,0,.4); border-radius: 3px; overflow: hidden; }
.cond-fill { height: 100%; width: 100%; background: #8fb6d9; transition: width .3s; }

.hud-top-center {
  top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  text-align: center;
}
.dist { font-size: clamp(22px, 4.4vw, 32px); font-weight: 900; letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0,0,0,.65); }
.hud-top-center small { color: var(--text-dim); font-size: 10px; letter-spacing: 3px; }

.hud-top-right {
  top: max(12px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right));
  display: flex; align-items: center; gap: 10px;
}
.icon-btn {
  pointer-events: auto; cursor: pointer;
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--panel); border: 1px solid var(--panel-line);
  color: var(--amber); display: flex; align-items: center; justify-content: center;
}
.icon-btn svg { fill: currentColor; }
.icon-btn:active { transform: scale(.93); }
.hud-coin-img {
  width: 32px; height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.85)) drop-shadow(0 0 5px rgba(245,185,66,0.4));
  flex-shrink: 0;
}
.coin-chip {
  direction: ltr !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0px !important;
  padding: 0 !important;
}
.coin-chip b {
  color: #ffe9a8; font-size: 18.5px; font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,0.95), 0 0 4px rgba(0,0,0,0.8);
  letter-spacing: 0.5px;
}
.coin-chip.pop { animation: pop .3s ease-out; }
@keyframes pop { 40% { transform: scale(1.18); } }

.gauge-wrap {
  bottom: max(12px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
}
#gauge { width: 252px; height: 180px; display: block; }
.speed-num {
  position: absolute; left: calc(50% + 28px); bottom: 14px;
  transform: translateX(-50%);
  text-align: center; pointer-events: none;
}
.speed-num b { font-size: 30px; font-weight: 900; text-shadow: 0 2px 8px rgba(0,0,0,.85); }
.speed-num span { font-size: 12px; color: var(--text-dim); margin-inline-start: 4px; }
.bottom-cluster {
  position: absolute;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: calc(50% - 65px);
  transform: translateX(-50%);
  direction: ltr !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 0px !important;
  pointer-events: none;
  z-index: 15;
}
#city-fuel-gauge,
#travel-fuel-gauge {
  width: 90px;
  height: 106px;
  display: block;
  flex-shrink: 0;
  margin: 0 !important;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.65));
}

/* ================= ENGINE START / STOP BUTTON ================= */
.engine-start-btn {
  pointer-events: auto;
  cursor: pointer;
  width: 52px;
  height: 52px;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  flex-shrink: 0;
  outline: none;
  border: none;
  transform: none !important;
  user-select: none;
  margin-bottom: 14px;
  position: relative;
  z-index: 25;
}
#hud-btn-engine-start {
  position: absolute;
  right: -15px;
  bottom: 8px;
}
#btn-engine-start,
#travel-btn-engine-start {
  margin-left: -18px;
  transform: none !important;
}
.engine-start-btn:active,
.engine-start-btn:focus,
.engine-start-btn:hover {
  transform: none !important;
}
.engine-start-btn.off {
  background: radial-gradient(circle at 35% 35%, #ff5252 0%, #d32f2f 60%, #5a0a0a 100%) !important;
  border: 2.5px solid #ff7979 !important;
  box-shadow: 0 0 16px rgba(244, 67, 54, 0.7), 0 4px 10px rgba(0, 0, 0, 0.8), inset 0 2px 4px rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 12px rgba(244, 67, 54, 0.6), 0 4px 10px rgba(0, 0, 0, 0.8); }
  50% { box-shadow: 0 0 22px rgba(244, 67, 54, 0.95), 0 4px 12px rgba(0, 0, 0, 0.9); }
}

.engine-start-btn.on {
  background: radial-gradient(circle at 35% 35%, #69f0ae 0%, #2e7d32 65%, #0d3811 100%) !important;
  border: 2.5px solid #b9f6ca !important;
  box-shadow: 0 0 18px rgba(76, 175, 80, 0.8), 0 4px 10px rgba(0, 0, 0, 0.8), inset 0 2px 4px rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
}

.engine-btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  gap: 2px;
}
.engine-btn-inner svg {
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.8));
}
.engine-btn-lbl {
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}

#toast {
  top: 26%; left: 50%; transform: translateX(-50%) translateY(-8px);
  background: linear-gradient(180deg, #ffd25e, #f0b13c);
  color: #191405;
  font-size: 15px; font-weight: 800;
  padding: 9px 24px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.28);
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
  opacity: 0; transition: opacity .18s, transform .18s; white-space: nowrap;
  max-width: 94vw; overflow: hidden; text-overflow: ellipsis;
  text-shadow: none;
  pointer-events: none !important;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

body:not(.playing) #hud, body.paused #hud { display: none !important; }
body:not(.playing) #city-hud, body.paused #city-hud { display: none !important; }
body:not(.playing) .pedal, body.paused .pedal { display: none !important; }
body:not(.playing) .gear-shifter, body.paused .gear-shifter { display: none !important; }
body:not(.playing) .car-horn-btn, body.paused .car-horn-btn { display: none !important; }
body:not(.playing) .headlights-btn, body.paused .headlights-btn { display: none !important; }

/* ================= CAR HORN BUTTON (زر الكلاكس والتريكس) ================= */
.car-horn-btn {
  position: fixed;
  top: 86px;
  left: max(16px, env(safe-area-inset-left));
  z-index: 18;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(245, 185, 66, 0.40), rgba(28, 22, 16, 0.96));
  border: 2px solid rgba(245, 185, 66, 0.85);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65), inset 0 2px 2px rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  color: #ffd54f;
  transition: transform 0.08s ease, background 0.12s ease, border-color 0.12s ease;
  backdrop-filter: blur(4px);
  padding: 0;
  outline: none;
}

.car-horn-btn svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}

.car-horn-btn:active, .car-horn-btn.active {
  transform: scale(0.88) !important;
  background: radial-gradient(circle at 45% 45%, rgba(255, 213, 79, 0.9), rgba(245, 127, 23, 0.98)) !important;
  border-color: #ffe082 !important;
  box-shadow: 0 0 20px rgba(255, 213, 79, 0.95), inset 0 1px 3px #ffffff !important;
  color: #ffffff !important;
}

/* ================= HEADLIGHTS BUTTON (زر كشافات العربية) ================= */
.headlights-btn {
  position: fixed;
  top: 144px;
  left: max(16px, env(safe-area-inset-left));
  z-index: 18;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.12), rgba(28, 22, 16, 0.96));
  border: 2px solid rgba(245, 185, 66, 0.70);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65), inset 0 2px 2px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  color: #a89f91;
  transition: transform 0.08s ease, background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
  backdrop-filter: blur(4px);
  padding: 0;
  outline: none;
}

.headlights-btn svg {
  width: 23px;
  height: 23px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}

.headlights-btn:active {
  transform: scale(0.88) !important;
}

.headlights-btn.active {
  background: radial-gradient(circle at 45% 45%, rgba(56, 189, 248, 0.45), rgba(14, 116, 144, 0.95)) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.85), inset 0 1px 3px rgba(255, 255, 255, 0.6) !important;
}

/* ================= GEAR SHIFTER (سوستة الفتيس D / N / R) ================= */
.gear-shifter {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  right: calc(max(18px, env(safe-area-inset-right)) + 180px);
  z-index: 20;
  display: flex;
  flex-direction: row;
  pointer-events: auto;
  user-select: none;
  transform: none !important;
}
.gear-shifter-housing {
  background: linear-gradient(180deg, rgba(28, 22, 16, 0.94), rgba(12, 9, 6, 0.97));
  border: 1.5px solid rgba(245, 185, 66, 0.4);
  border-radius: 12px;
  padding: 3px;
  display: flex;
  flex-direction: row;
  gap: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}
.gear-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  width: 31px;
  height: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  color: #8e8071;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
  padding: 0;
  line-height: 1;
  transform: none !important;
}
.gear-badge {
  font-size: 10px;
  font-weight: 900;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0.3px;
}
.gear-txt {
  font-size: 5.5px;
  font-weight: 700;
  margin-top: 1px;
  opacity: 0.85;
}

/* Gear States */
.gear-btn[data-gear="D"].active {
  background: radial-gradient(circle at 40% 40%, rgba(105, 240, 174, 0.35), rgba(46, 125, 50, 0.7)) !important;
  border-color: #69f0ae !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(105, 240, 174, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
}
.gear-btn[data-gear="N"].active {
  background: radial-gradient(circle at 40% 40%, rgba(255, 213, 79, 0.35), rgba(245, 127, 23, 0.7)) !important;
  border-color: #ffd54f !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(255, 213, 79, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
}
.gear-btn[data-gear="R"].active {
  background: radial-gradient(circle at 40% 40%, rgba(255, 82, 82, 0.35), rgba(198, 40, 40, 0.7)) !important;
  border-color: #ff5252 !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(255, 82, 82, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
}
.gear-btn:active, .gear-btn:focus, .gear-btn:hover {
  transform: none !important;
}

/* ================= PEDALS (Hill-Climb style) ================= */
.pedal {
  position: fixed; bottom: max(18px, env(safe-area-inset-bottom));
  width: 171px; height: 213px;
  border-radius: 38px;
  display: flex; align-items: center; justify-content: center;
  z-index: 15; touch-action: none; cursor: pointer;
  background: linear-gradient(180deg, rgba(44,37,25,.78), rgba(15,12,8,.85));
  border: 3px solid rgba(245, 185, 66, .55);
  color: var(--amber);
  box-shadow: 0 8px 22px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(2px);
  transition: transform .06s, background .12s, border-color .12s;
}
.pedal svg { width: 95px; height: 95px; }
.pedal.brake {
  left: max(18px, env(safe-area-inset-left));
  width: 188px; height: 227px;
  color: #ff9d8a;
  border-color: rgba(229, 110, 90, .65);
}
.pedal.gas { right: max(18px, env(safe-area-inset-right)); color: #b8e08a; }
.pedal.active, .pedal:active {
  transform: translateY(5px) scale(.97);
  background: linear-gradient(180deg, rgba(245,185,66,.30), rgba(120,90,30,.30));
  border-color: var(--amber);
}
.pedal.brake.active, .pedal.brake:active { border-color: #ff8d7a; }
body.touch .pedal { display: flex; }

/* ================= ROTATE HINT ================= */
#rotate-hint {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 30; background: var(--panel); border: 1px solid var(--panel-line);
  padding: 8px 16px; border-radius: 10px; font-size: 12.5px; color: var(--amber);
  display: none;
}
@media (orientation: portrait) { body.touch.playing #rotate-hint { display: block; } }

/* ================= CITY MODE ================= */
.btn.city {
  border-color: rgba(126,200,80,.55);
  color: var(--green);
  background: linear-gradient(180deg, rgba(126,200,80,.14), rgba(126,200,80,.04));
}
.btn.city:hover { box-shadow: 0 0 26px rgba(126,200,80,.35); }

#city-hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#city-hud > * { position: absolute; }
.chud-tl {
  position: absolute;
  top: 8px;
  left: 8px;
  direction: ltr !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 6px;
  margin: 0 !important;
  padding: 0 !important;
}
#chud-minimap { width: 244px; height: 48px; display: block; filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); margin: 0 !important; }
.chud-tc { top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); text-align: center; width: min(300px, 40vw); }
.chud-tr { top: max(12px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); display: flex; gap: 10px; align-items: center; }
.chip { display: flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 11px; padding: 8px 13px; font-weight: 800; }
.money-chip {
  direction: ltr !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  align-self: flex-start !important;
  gap: 6px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0px !important;
  padding: 0 !important;
  margin: 0 !important;
}
.money-chip .hud-coin-img {
  margin: 0 !important;
  padding: 0 !important;
}
.money-chip b {
  color: #ffe9a8; font-size: 18.5px; font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,0.95), 0 0 4px rgba(0,0,0,0.8);
  letter-spacing: 0.5px;
  margin: 0 !important;
  padding: 0 !important;
}
.pass-chip { color: #b8e08a; }
.pass-chip b { font-size: 15px; }
.route-bar { height: 12px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.22); border-radius: 6px; overflow: hidden; }
.route-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #57c46a, #a5e087); transition: width .3s; border-radius: 6px; }
.chud-tc small { color: var(--text-dim); font-size: 11px; letter-spacing: 1px; }
#chud-toast {
  position: fixed !important;
  top: 15%;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: linear-gradient(180deg, #2b3340, #181d26);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 800;
  padding: 8px 20px;
  border-radius: 24px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  opacity: 0;
  pointer-events: none !important;
  transition: opacity 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28), transform 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  white-space: nowrap;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  z-index: 120 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  backdrop-filter: blur(8px);
}
#chud-toast.show {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
}

.toast-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.toast-coin-img {
  width: 21px;
  height: 21px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.toast-svg {
  width: 19px;
  height: 19px;
  display: block;
  fill: currentColor;
}
.toast-text-wrap {
  display: inline-block;
  line-height: 1;
}

/* Green Themes: Fare (+16 with coin), New Passengers (ركاب جدد), Dropoff & Hailing locations (لوكيشن أخضر) */
#chud-toast.fare,
#chud-toast.pass,
#chud-toast.loc {
  background: linear-gradient(180deg, #1b5e20, #0a3310) !important;
  color: #e8f5e9 !important;
  border-color: #4caf50 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(76, 175, 80, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}
#chud-toast.fare .toast-text-wrap {
  font-size: 17px;
  font-weight: 900;
  color: #b9f6ca;
  letter-spacing: 0.5px;
}
#chud-toast.loc .toast-svg,
#chud-toast.pass .toast-svg {
  color: #69f0ae;
}

/* Red Theme: Violations & Penalties (بلاغ مخالفة) */
#chud-toast.fine {
  background: linear-gradient(180deg, #b71c1c, #560808) !important;
  color: #ffebee !important;
  border-color: #ef5350 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 18px rgba(239, 83, 80, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}
#chud-toast.fine .toast-svg {
  color: #ff8a80;
}

/* Amber / Warn Theme: Fuel / Snacks / Warnings */
#chud-toast.warn,
#chud-toast.wrench,
#chud-toast.fuel {
  background: linear-gradient(180deg, #e65100, #5c2000) !important;
  color: #fff3e0 !important;
  border-color: #ff9800 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 14px rgba(255, 152, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}
#chud-toast.warn .toast-svg,
#chud-toast.wrench .toast-svg,
#chud-toast.fuel .toast-svg {
  color: #ffd180;
}
.city-gauge-wrap {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  transform: translateX(-24px) !important;
  display: flex;
  align-items: flex-end;
}
#city-gauge,
#travel-gauge {
  width: 200px;
  height: 142px;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.7));
}

/* ================= CITY UPCOMING SPEED ZONE ALERT WIDGET ================= */
.city-speed-alert-widget {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  direction: rtl;
  opacity: 1;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.city-speed-alert-widget.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}
.cs-speed-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  border: 4.5px solid #e53935;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8), inset 0 0 4px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#cs-speed-limit-val {
  color: #111111;
  font-family: Arial, "Segoe UI", sans-serif;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.5px;
}
.cs-text-wrap {
  display: flex;
  align-items: center;
  white-space: nowrap;
}
#cs-limit-text {
  color: #ffffff;
  font-size: 15.5px;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 14px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.3px;
}

@media (max-width: 600px) {
  .city-speed-alert-widget {
    top: 48px;
    gap: 8px;
  }
  .cs-speed-circle {
    width: 40px;
    height: 40px;
    border-width: 4px;
  }
  #cs-speed-limit-val {
    font-size: 18px;
  }
  #cs-limit-text {
    font-size: 13.5px;
  }
}

/* ================= CITY MODALS & REPAIR CENTER (CLEAN 2x2 LANDSCAPE) ================= */
.city-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 95;
  pointer-events: auto;
  background: linear-gradient(165deg, rgba(30, 22, 14, 0.97), rgba(16, 11, 6, 0.99));
  border: 1.5px solid rgba(245, 185, 66, 0.45);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  width: min(440px, 94vw);
  max-height: 92vh;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.9), 0 0 20px rgba(245, 185, 66, 0.15);
  backdrop-filter: blur(10px);
  animation: fadein .18s ease-out;
}
.city-panel.hidden { display: none !important; }

.cp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border-bottom: 1px solid rgba(245, 185, 66, 0.2);
  padding-bottom: 5px;
}
.cp-icon {
  font-size: 22px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}
.cp-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cp-title-wrap h3 {
  color: var(--amber);
  letter-spacing: 0.5px;
  font-size: 13.5px;
  font-weight: 900;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.cp-title-wrap .sp-row {
  font-size: 11px;
  color: var(--text-dim);
}
.cp-title-wrap .sp-row b {
  color: #ffe494;
  font-weight: 900;
}

/* Repair 2x2 Grid */
.rp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
  margin: 2px 0;
}
.rp-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(24, 18, 11, 0.85);
  border: 1px solid rgba(245, 185, 66, 0.25);
  border-radius: 10px;
  padding: 6px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.rp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rp-part-name {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
}
.rp-pct {
  font-size: 11px;
  font-weight: 900;
}
.rp-track {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.rp-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.25s ease;
}
.rp-buy-btn {
  width: 100%;
  padding: 4px 6px !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  border-radius: 6px !important;
  margin: 0 !important;
  text-align: center;
  cursor: pointer;
}
.rp-buy-btn.ready {
  background: linear-gradient(180deg, #57c46a, #388e3c) !important;
  color: #ffffff !important;
  border-color: #7ec850 !important;
}

.st-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
  margin: 4px 0;
}
.st-options-grid .sp-buy {
  width: 100%;
  padding: 6px 4px !important;
  font-size: 11px !important;
  border-radius: 8px !important;
  margin: 0 !important;
}

.sp-close-btn {
  background: rgba(35, 26, 17, 0.9) !important;
  border: 1px solid rgba(245, 185, 66, 0.35) !important;
  color: var(--amber) !important;
  border-radius: 20px !important;
  padding: 4px 18px !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  cursor: pointer;
  margin-top: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: transform 0.15s ease;
}
.sp-close-btn:hover {
  background: rgba(245, 185, 66, 0.2) !important;
  transform: scale(1.04);
}
.sp-close-btn:active {
  transform: scale(0.95);
}

/* ================= WEAR PANEL COMPACT & CLOSE BUTTON ================= */
.wear-panel {
  position: absolute; top: 54px; right: max(12px, env(safe-area-inset-right));
  z-index: 95; pointer-events: auto;
  background: linear-gradient(165deg, rgba(26, 19, 12, 0.98), rgba(14, 10, 5, 0.99));
  border: 1.5px solid rgba(245, 185, 66, 0.45);
  border-radius: 0px; padding: 6px 9px; width: 148px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  user-select: none;
}
.wear-panel.hidden { display: none !important; }
.wp-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px; border-bottom: 1px solid rgba(245, 185, 66, 0.2);
  padding-bottom: 3px;
}
.wp-header h4 { color: var(--amber); font-size: 10.5px; font-weight: 900; margin: 0; letter-spacing: 0.3px; }
.wp-close-btn {
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff; width: 17px; height: 17px; border-radius: 0px;
  font-size: 9px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; line-height: 1; transition: background 0.15s;
}
.wp-close-btn:hover { background: rgba(229, 72, 77, 0.85); border-color: #ff8d7a; }

.wp-row { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin: 3px 0; font-size: 9.5px; font-weight: 800; }
.wp-row span { width: 42px; color: #d6cfc5; font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-row .hl-track { flex: 1; height: 4.5px; background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0px; overflow: hidden; }
.wp-row .hl-fill { height: 100%; border-radius: 0px; transition: width 0.2s ease; }
.wp-row b { width: 28px; text-align: right; font-size: 9.5px; font-weight: 900; direction: ltr; }
.wear-panel small { color: var(--text-dim); font-size: 8px; font-weight: 700; display: block; margin-top: 4px; text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 3px; }
.icon-btn.warn { color: #ff8d7a; border-color: rgba(255,120,90,.7); box-shadow: 0 0 14px rgba(255,110,80,.4); }
.sp-progress { width: 100%; height: 13px; background: rgba(0,0,0,.5); border-radius: 7px; overflow: hidden; border: 1px solid rgba(255,255,255,.16); }
#st-prog-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #f0b13c, #ffd25e); border-radius: 7px; }
.sp-prog-text { min-height: 16px; font-size: 13px; color: var(--amber); font-weight: 800; }

/* ================= GIFTS & REWARDS MODAL ================= */
.gifts-modal-card {
  background: linear-gradient(165deg, rgba(28, 21, 13, 0.98), rgba(14, 10, 5, 0.99));
  border: 2px solid rgba(245, 185, 66, 0.5);
  border-radius: 18px;
  padding: 14px 18px;
  width: min(690px, 96vw);
  max-height: 94vh;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.9), 0 0 28px rgba(245, 185, 66, 0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: pop .22s ease-out;
  backdrop-filter: blur(10px);
}

.gifts-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid rgba(245, 185, 66, 0.25);
  padding-bottom: 8px;
}
.gifts-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gifts-badge-hda-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(245, 185, 66, 0.45));
}
.gifts-header-title h3 {
  color: var(--amber);
  font-size: 16px;
  font-weight: 900;
  margin: 0;
}
.gifts-header-title small {
  color: var(--text-dim);
  font-size: 11px;
}
.btn-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.btn-modal-close:hover {
  background: rgba(229, 72, 77, 0.85);
  transform: scale(1.1);
}

.gifts-sections-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}
@media (max-width: 620px) {
  .gifts-sections-wrap {
    grid-template-columns: 1fr;
  }
}

.gift-card {
  position: relative;
  background: rgba(22, 16, 9, 0.85);
  border: 1.5px solid rgba(245, 185, 66, 0.3);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: transform 0.18s, border-color 0.18s;
}
.gift-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}
.mystery-gift-card {
  border-color: rgba(255, 215, 80, 0.45);
  background: linear-gradient(180deg, rgba(32, 24, 12, 0.9), rgba(20, 14, 6, 0.95));
}
.vgift-gift-card {
  border-color: rgba(72, 202, 228, 0.45);
  background: linear-gradient(180deg, rgba(14, 26, 36, 0.92), rgba(8, 16, 22, 0.96));
}

.gift-card-body {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}
.gift-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(245, 185, 66, 0.12);
  border: 1.5px solid rgba(245, 185, 66, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.vgift-icon-wrap {
  background: rgba(72, 202, 228, 0.12);
  border-color: rgba(72, 202, 228, 0.35);
}
.gift-modal-hda-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(245, 185, 66, 0.35));
  animation: giftBounceGlow 2.5s infinite ease-in-out;
}
.gift-modal-gift-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(72, 202, 228, 0.5));
  animation: giftBounceGlow 2.5s infinite ease-in-out;
}
.gift-reward-val.cyan {
  color: #48cae4;
  text-shadow: 0 0 8px rgba(72, 202, 228, 0.4);
}
.cyan-pulse-btn {
  background: linear-gradient(135deg, #0077b6 0%, #0096c7 50%, #48cae4 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #90e0ef !important;
  box-shadow: 0 4px 14px rgba(0, 150, 199, 0.55), 0 0 20px rgba(72, 202, 228, 0.35) !important;
  animation: cyanPulse 1.8s infinite ease-in-out;
}
@keyframes cyanPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 14px rgba(0, 150, 199, 0.5), 0 0 16px rgba(72, 202, 228, 0.3);
  }
  50% {
    transform: scale(1.025);
    box-shadow: 0 6px 20px rgba(0, 150, 199, 0.8), 0 0 28px rgba(72, 202, 228, 0.6);
  }
}

.gift-card-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gift-card-details h4 {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  margin: 0;
}
.gift-card-details p {
  font-size: 10px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.25;
}
.gift-reward-val {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 900;
  color: #57c46a;
}
.gift-reward-val.gold {
  color: #ffd25e;
}
.gift-coin-icon {
  width: 16px;
  height: 16px;
}

.gift-card-footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.gift-claim-btn {
  width: 100%;
  padding: 8px 10px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  border-radius: 10px !important;
  cursor: pointer;
}
.gift-claim-btn.claimed {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: var(--text-dim) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

.gift-timer-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 3px;
}
.gift-timer-sub b {
  color: var(--amber);
  font-size: 12.5px;
  font-family: Consolas, monospace;
  letter-spacing: 1px;
}

/* Celebration Popup Modal */
.reward-popup-card {
  background: linear-gradient(165deg, rgba(34, 25, 15, 0.98), rgba(18, 12, 6, 0.99));
  border: 2px solid #ffd25e;
  border-radius: 20px;
  padding: 22px 24px;
  width: min(340px, 88vw);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(255, 210, 94, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  animation: pop .25s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(12px);
}
.reward-sparkles {
  font-size: 20px;
  animation: sparkleTwinkle 1.4s infinite alternate;
}
.reward-popup-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 94, 0.35) 0%, rgba(255, 210, 94, 0) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0;
}
.reward-popup-coin {
  width: 52px;
  height: 52px;
  animation: giftHaloPulse 1.8s infinite ease-in-out;
}
.reward-popup-title {
  font-size: 22px;
  font-weight: 900;
  color: #ffd25e;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}
.reward-popup-msg {
  font-size: 14px;
  color: #fff;
  margin: 0 0 8px;
}
.reward-popup-msg b {
  color: #57c46a;
  font-size: 18px;
}
.reward-collect-btn {
  width: 100%;
  padding: 10px 24px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 20px rgba(245, 185, 66, 0.4) !important;
}

/* ================= MISSIONS & OPERATIONS FULL SCREEN (TACTICAL SHARP ZERO-EMOJI) ================= */
#screen-tasks {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  height: 100%;
  background: #090c12;
  color: #f8fafc;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
  direction: rtl;
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  z-index: 50;
}

#screen-tasks * {
  border-radius: 0 !important;
  box-sizing: border-box;
}

/* --- Top Tactical Header (Slim & Compact for Mobile) --- */
.tasks-full-header {
  width: 100%;
  background: #0c1018;
  border-bottom: 1px solid #1a2332;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  min-height: 38px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.tasks-back-sharp {
  width: 28px;
  height: 28px;
  background: #121824;
  border: 1px solid #243042;
  color: #f5b942;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tasks-back-sharp svg {
  width: 15px;
  height: 15px;
}

.tasks-back-sharp:hover {
  background: rgba(245, 185, 66, 0.15);
  border-color: #f5b942;
  color: #fff;
}

.tasks-back-sharp:active {
  transform: scale(0.95);
}

.tasks-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 0;
  padding: 0 4px;
}

.tasks-full-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.tasks-full-sub {
  font-size: 9px;
  font-weight: 600;
  color: #7f8fa4;
  margin-top: 1px;
  white-space: nowrap;
  line-height: 1.2;
}

.tasks-wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  background: #121824;
  border: 1px solid #243042;
  color: #f5b942;
  font-weight: 800;
  font-size: 11px;
  flex-shrink: 0;
  line-height: 1;
}

.task-wallet-coin {
  width: 12px;
  height: 12px;
  object-fit: contain;
}

/* --- Nav Tabs: Daily vs Weekly (Slim & Low Height) --- */
.tasks-nav-tabs {
  display: flex;
  gap: 6px;
  padding: 5px 10px;
  background: #0a0e16;
  border-bottom: 1px solid #161e2a;
  flex-shrink: 0;
  width: 100%;
}

.tasks-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 8px;
  background: #0f1520;
  border: 1px solid #1a2434;
  color: #8fa0b5;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tasks-tab-btn svg {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  stroke: #8fa0b5;
  transition: stroke 0.15s;
}

.tasks-tab-btn:hover {
  background: #131b28;
  border-color: #29384e;
  color: #cbd5e1;
}

.tasks-tab-btn:hover svg {
  stroke: #cbd5e1;
}

.tasks-tab-btn.active {
  background: #141d2a;
  border: 1px solid #f5b942;
  color: #f8fafc;
  box-shadow: inset 0 -2px 0 #f5b942, 0 1px 6px rgba(245, 185, 66, 0.1);
}

.tasks-tab-btn.active svg {
  stroke: #f5b942;
}

.tasks-tab-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  min-width: 0;
}

.tasks-tab-title {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.tasks-tab-badge {
  font-size: 8.5px;
  font-weight: 700;
  color: #64748b;
  margin-top: 1px;
  line-height: 1.1;
}

.tasks-tab-btn.active .tasks-tab-badge {
  color: #f5b942;
}

/* --- Scrollable Content Grid --- */
.tasks-full-content {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px 16px;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.tasks-list-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

/* --- Tactical Task Card / Strip (Compact Mobile Proportioned) --- */
.task-strip {
  background: #0e141f;
  border: 1px solid #1a2434;
  border-inline-start: 3px solid #0284c7;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.15s, background 0.15s;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.task-strip:hover {
  border-color: #28374d;
  background: #111825;
}

.task-strip.task-weekly-strip {
  border-inline-start: 3px solid #f5b942;
  background: #101522;
}

.task-strip.task-core-strip {
  border-inline-start: 3px solid #f5b942;
  background: #111722;
}

.task-strip.task-core-strip .task-strip-icon-box {
  color: #f5b942;
  border-color: rgba(245, 185, 66, 0.35);
}

.task-core-badge {
  font-size: 8px;
  font-weight: 800;
  padding: 1px 5px;
  background: rgba(245, 185, 66, 0.14);
  border: 1px solid rgba(245, 185, 66, 0.45);
  color: #f5b942;
  letter-spacing: 0.2px;
  white-space: nowrap;
  line-height: 1.2;
}

.task-strip.completed {
  border-color: #22c55e;
  border-inline-start: 3px solid #22c55e;
  background: #0b1713;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.12);
}

.task-strip.claimed {
  opacity: 0.45;
  background: #090d13;
  border-color: #141c26;
  border-inline-start: 3px solid #3d4a5c;
}

/* Left Icon */
.task-strip-icon-box {
  width: 26px;
  height: 26px;
  background: #080b11;
  border: 1px solid #1a2434;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #38bdf8;
}

.task-strip-icon-box svg {
  width: 13px;
  height: 13px;
  display: block;
}

.task-strip.task-weekly-strip .task-strip-icon-box {
  color: #f5b942;
}

.task-strip.completed .task-strip-icon-box {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.35);
}

/* Main Details */
.task-strip-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.task-strip-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.task-title {
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  letter-spacing: 0.1px;
  line-height: 1.2;
}

.task-desc {
  font-size: 9px;
  color: #8b9baa;
  margin: 0;
  line-height: 1.2;
}

.task-strip-progress-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-progress-track {
  flex: 1;
  height: 4px;
  background: #07090e;
  border: 1px solid #1a2434;
  overflow: hidden;
}

.task-progress-bar {
  height: 100%;
  background: #0284c7;
  transition: width 0.25s ease-out;
}

.task-strip.task-weekly-strip .task-progress-bar {
  background: #f5b942;
}

.task-strip.completed .task-progress-bar {
  background: #22c55e;
}

.task-progress-num {
  font-size: 8.5px;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
  font-family: monospace, sans-serif;
  letter-spacing: 0.2px;
}

/* Actions & Rewards */
.task-strip-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.task-reward-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #090d13;
  border: 1px solid #222e3f;
  padding: 3px 6px;
  color: #f5b942;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 0.2px;
  line-height: 1;
}

.task-coin-mini {
  width: 11px;
  height: 11px;
  object-fit: contain;
}

.task-btn {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
  text-transform: uppercase;
  font-family: 'Cairo', 'Segoe UI', sans-serif;
  line-height: 1.2;
}

.task-btn.claim {
  background: #16a34a;
  color: #ffffff;
  border: 1px solid #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.task-btn.claim:hover {
  background: #22c55e;
  color: #052e16;
  font-weight: 900;
}

.task-btn.claim:active {
  transform: scale(0.97);
}

.task-btn.in-progress {
  background: #121824;
  color: #55667a;
  border: 1px solid #1a2434;
  cursor: not-allowed;
}

.task-btn.claimed-done {
  background: transparent;
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.35);
  cursor: default;
}

/* Responsive adjustment for extra compact mobile viewports */
@media (max-width: 480px) {
  .tasks-full-header {
    padding: 4px 8px;
    gap: 6px;
  }
  .tasks-back-sharp {
    width: 26px;
    height: 26px;
  }
  .tasks-full-title {
    font-size: 11.5px;
  }
  .tasks-full-sub {
    font-size: 8.5px;
  }
  .tasks-wallet-chip {
    padding: 2px 5px;
    font-size: 10px;
  }
  .tasks-nav-tabs {
    padding: 4px 8px;
    gap: 5px;
  }
  .tasks-tab-btn {
    padding: 4px 6px;
    gap: 5px;
  }
  .tasks-tab-title {
    font-size: 10px;
  }
  .tasks-tab-badge {
    font-size: 8px;
  }
  .task-strip {
    padding: 5px 7px;
    gap: 6px;
  }
  .task-strip-icon-box {
    width: 24px;
    height: 24px;
  }
  .task-title {
    font-size: 10.5px;
  }
  .task-desc {
    font-size: 8.5px;
  }
  .task-btn {
    padding: 3px 8px;
    font-size: 9.5px;
  }
  .task-reward-badge {
    padding: 2px 5px;
    font-size: 9.5px;
  }
}

/* ================= DEBUG PANEL ================= */
#debug-panel {
  position: fixed; bottom: 8px; inset-inline-start: 8px; z-index: 50;
  background: rgba(0, 0, 0, .82); color: #9fe08a;
  font: 11.5px/1.55 Consolas, monospace;
  padding: 8px 10px; border-radius: 8px; direction: ltr; text-align: left;
  border: 1px solid rgba(120, 220, 120, .3);
  max-width: 74vw;
}
#debug-panel b { color: #ffd95e; }
.dbg-row { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.dbg-row button {
  background: rgba(120, 220, 120, .12); color: #c9f0b8;
  border: 1px solid rgba(120, 220, 120, .4); border-radius: 6px;
  font: 11px Tahoma; padding: 4px 8px; cursor: pointer;
}

@media (max-height: 460px) {
  .logo { font-size: 42px; letter-spacing: 6px; }
  .tagline { font-size: 13px; margin-bottom: 8px; }
  .menu-inner { gap: 7px; }
  .btn.big { padding: 11px 44px; font-size: 16px; }
  .btn { padding: 10px 30px; font-size: 14px; }
  .menu-meta { margin-top: 8px; gap: 22px; }
  .hint-desktop { display: none; }
  .divider { margin: 10px auto; }
  #chud-minimap { width: 150px; height: 30px; }
  .chud-tc, .thud-tc { width: min(240px, 34vw); }
  #chud-toast { font-size: 12px; padding: 6px 14px; top: 12%; }
  .go-title { font-size: 34px; }
  .stats-grid { gap: 9px; }
  .stats-grid > div { padding: 9px 11px; }
  .stats-grid b { font-size: 16px; }
}

@media (max-height: 430px) {
  .pedal { width: 96px; height: 120px; border-radius: 26px; }
  .pedal.brake { width: 105px; height: 128px; }
  .pedal svg { width: 54px; height: 54px; }
  #gauge { width: 121px; height: 87px; }
  #city-gauge, #travel-gauge { width: 140px; height: 100px; }
  #city-fuel-gauge, #travel-fuel-gauge { width: 68px; height: 80px; }
  .speed-num { left: calc(50% + 15px); bottom: 5px; }
  .speed-num b { font-size: 20px; }
  .speed-num span { font-size: 9px; }
  .bottom-cluster { gap: 4px !important; }
}

/* ================= CITY END SCREEN DIALOG ================= */
#city-end {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(10, 8, 5, 0.88);
  backdrop-filter: blur(6px);
  padding: 6px;
  z-index: 50;
}
.ce-dialog {
  width: min(540px, 95vw);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: linear-gradient(165deg, rgba(32, 24, 15, 0.98), rgba(18, 13, 8, 0.99));
  border: 1.5px solid rgba(245, 185, 66, 0.4);
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(245, 185, 66, 0.15);
  box-sizing: border-box;
  overflow-y: auto;
}
.ce-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.ce-title {
  font-size: 16px;
  font-weight: 900;
  color: #7ec850;
  margin: 0;
  text-shadow: 0 1px 8px rgba(126, 200, 80, 0.4);
}
.ce-note {
  font-size: 11px;
  font-weight: 800;
  color: #ffe9a8;
  margin: 0;
}

/* Two-column layout on landscape and larger screens */
.ce-grid-body {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 10px;
  width: 100%;
  align-items: stretch;
}
@media (max-width: 500px) {
  .ce-grid-body {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.ce-invoice-card {
  width: 100%;
  background: rgba(14, 11, 7, 0.85);
  border: 1px solid rgba(245, 185, 66, 0.2);
  border-radius: 12px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  box-sizing: border-box;
}
.ce-inv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}
.ce-inv-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(243, 234, 214, 0.88);
  font-weight: 700;
  font-size: 11px;
}
.inv-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}
.inv-icon.inc {
  color: #7ec850;
  filter: drop-shadow(0 0 4px rgba(126, 200, 80, 0.45));
}
.inv-icon.exp {
  color: #ff7a6b;
  filter: drop-shadow(0 0 4px rgba(255, 122, 107, 0.45));
}
.inv-icon.gold {
  color: #ffd25e;
  filter: drop-shadow(0 0 6px rgba(255, 210, 94, 0.6));
}
.ce-inv-val {
  font-size: 12px;
  font-weight: 900;
}
.ce-inv-row.income .ce-inv-val { color: #7ec850; }
.ce-inv-row.expense .ce-inv-val { color: #ff7a6b; }
.ce-inv-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 2px 0;
}
.ce-inv-row.total {
  padding-top: 2px;
}
.ce-inv-row.total .ce-inv-label {
  font-size: 12px;
  font-weight: 900;
  color: #ffd25e;
}
.ce-inv-row.total .ce-inv-val {
  font-size: 14px;
  font-weight: 900;
  color: #ffd25e;
}

.ce-side-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.ce-meta-strip {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 4px 6px;
  box-sizing: border-box;
}
.ce-meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.ce-meta-item small {
  font-size: 9px;
  color: var(--text-dim);
}
.ce-meta-item b {
  font-size: 11.5px;
  font-weight: 800;
  color: #f3ead6;
}

/* Big Rewarded Ad Hero Double Button */
.ad-double-hero {
  width: 100%;
  position: relative;
}
.ad-double-hero.hidden {
  display: none !important;
}
.gold-pulse-btn-hero {
  width: 100%;
  background: linear-gradient(135deg, #ffe580 0%, #f5b942 50%, #d48b12 100%) !important;
  color: #1a1002 !important;
  border: 2px solid #fff5c0 !important;
  border-radius: 12px !important;
  padding: 8px 10px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  box-shadow: 0 4px 18px rgba(245, 185, 66, 0.65), 0 0 25px rgba(255, 210, 94, 0.4) !important;
  cursor: pointer;
  animation: heroAdPulse 1.8s infinite ease-in-out;
  transition: transform 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  text-align: start;
}
@keyframes heroAdPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(245, 185, 66, 0.5), 0 0 20px rgba(255, 210, 94, 0.3);
  }
  50% {
    transform: scale(1.025);
    box-shadow: 0 6px 24px rgba(245, 185, 66, 0.85), 0 0 35px rgba(255, 210, 94, 0.6);
  }
}
.gold-pulse-btn-hero:active {
  transform: scale(0.96) !important;
}
.ad-hero-icon-badge {
  width: 34px;
  height: 34px;
  background: rgba(26, 16, 2, 0.85);
  color: #ffd25e;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.ad-hero-icon-badge svg {
  width: 20px;
  height: 20px;
}
.ad-hero-texts {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.ad-hero-action-title {
  font-size: 13px;
  font-weight: 900;
  color: #1a1002;
  letter-spacing: 0.3px;
  line-height: 1.2;
}
.ad-hero-sub {
  font-size: 9.5px;
  font-weight: 800;
  color: #422a03;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ce-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.ce-actions .btn {
  flex: 1;
  padding: 7px 10px !important;
  font-size: 12.5px !important;
  font-weight: 900 !important;
  border-radius: 10px !important;
  text-align: center;
}
.ce-btn-retry {
  background: linear-gradient(180deg, #57c46a, #388e3c) !important;
  border-color: #7ec850 !important;
  color: #ffffff !important;
}

/* ================= INTERACTIVE VIDEO AD SIMULATOR ================= */
.ad-player-box {
  width: min(500px, 92vw);
  background: #0f0c08;
  border: 2px solid #ffd25e;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.9), 0 0 35px rgba(255, 210, 94, 0.35);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadein .2s ease-out;
}
.ad-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 10px;
}
.ad-badge-live {
  background: rgba(255,210,94,0.18);
  border: 1px solid #ffd25e;
  color: #ffd25e;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.ad-timer-countdown {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}
.ad-video-stage {
  position: relative;
  background: radial-gradient(circle at center, #261b0c, #100b05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 32px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  overflow: hidden;
}
.ad-brand-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.ad-brand-logo h3 {
  font-size: 20px;
  font-weight: 900;
  color: #ffd25e;
  letter-spacing: 2px;
  margin: 0;
}
.ad-brand-logo p {
  font-size: 13px;
  color: rgba(243, 234, 214, 0.85);
  margin: 0;
}
.ad-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}
.ad-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ffd25e, #7ec850);
  border-radius: 4px;
  transition: width 0.1s linear;
}

/* ================= INSUFFICIENT FUNDS MODAL ================= */
#insufficient-funds-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 8, 5, 0.85);
  backdrop-filter: blur(4px);
  z-index: 120;
}
#insufficient-funds-modal.hidden {
  display: none !important;
}

#travel-funds-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 8, 5, 0.88);
  backdrop-filter: blur(5px);
  z-index: 150;
}
#travel-funds-modal.hidden {
  display: none !important;
}
.travel-funds-card {
  position: relative;
  max-width: 360px !important;
  width: 90% !important;
  padding: 20px 22px !important;
  border: 1.5px solid rgba(245, 185, 66, 0.7) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(245, 185, 66, 0.3) !important;
}
.travel-funds-card .modal-close-btn {
  position: absolute;
  top: 10px;
  left: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.travel-funds-card .modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}
.travel-funds-status-pill {
  margin: 6px auto;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(229, 72, 77, 0.15);
  border: 1px solid rgba(229, 72, 77, 0.6);
  color: #ff8d7a;
  font-size: 13px;
  font-weight: bold;
}
.funds-modal-card {
  background: linear-gradient(180deg, rgba(38, 28, 18, 0.98), rgba(20, 15, 10, 0.98));
  border: 1.5px solid rgba(245, 185, 66, 0.5);
  border-radius: 16px;
  padding: 16px 20px;
  max-width: 320px;
  width: 86%;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85), 0 0 20px rgba(245, 185, 66, 0.2);
  animation: popIn 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.funds-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(245, 185, 66, 0.15);
  border: 1.2px solid rgba(245, 185, 66, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.funds-coin-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}
.funds-modal-title {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  margin: 0;
}
.funds-modal-msg {
  font-size: 12px;
  font-weight: 700;
  color: #ffe9a8;
  margin: 0;
  line-height: 1.45;
}
.funds-modal-btn {
  width: 120px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  border-radius: 8px !important;
  margin-top: 6px !important;
  box-shadow: 0 4px 12px rgba(245, 185, 66, 0.3) !important;
  line-height: 1 !important;
  text-align: center !important;
}

/* ================= PLAYER NAME MODAL ================= */
#player-name-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 6, 4, 0.88);
  backdrop-filter: blur(5px);
  z-index: 130;
}
#player-name-modal.hidden {
  display: none !important;
}
.name-modal-card {
  position: relative;
  background: linear-gradient(180deg, rgba(38, 28, 18, 0.98), rgba(20, 15, 10, 0.98));
  border: 1.5px solid rgba(245, 185, 66, 0.55);
  border-radius: 18px;
  padding: 20px 22px 18px;
  max-width: 330px;
  width: 88%;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(245, 185, 66, 0.25);
  animation: popIn 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#btn-name-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: none;
  color: #c4a47c;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
#btn-name-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.name-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 4px;
}
.name-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(245, 185, 66, 0.15);
  border: 1.5px solid var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}
.name-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.name-modal-title {
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
}
.name-modal-sub {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffe494;
  margin: 0;
}
.name-input-wrapper {
  width: 100%;
  margin: 4px 0;
}
#input-player-name {
  width: 100%;
  box-sizing: border-box;
  background: rgba(15, 10, 6, 0.95);
  border: 1.5px solid rgba(245, 185, 66, 0.5);
  border-radius: 10px;
  padding: 8px 14px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  text-align: center;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#input-player-name:focus {
  border-color: #ffd25e;
  box-shadow: 0 0 12px rgba(245, 185, 66, 0.4);
}
.name-modal-btn {
  flex: 1 !important;
  max-width: 130px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(245, 185, 66, 0.35) !important;
  line-height: 1 !important;
  text-align: center !important;
  cursor: pointer !important;
}
.name-modal-btn-skip {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #e0d0b0 !important;
  border: 1.5px solid rgba(245, 185, 66, 0.35) !important;
  box-shadow: none !important;
}
.name-modal-btn-skip:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}
#profile-chip-btn {
  cursor: pointer;
  transition: transform 0.12s ease;
}
#profile-chip-btn:hover {
  transform: scale(1.04);
}
#profile-chip-btn:active {
  transform: scale(0.96);
}

/* ================= NO INTERNET MODAL (نافذة انقطاع الإنترنت الحادة) ================= */
.no-net-modal-card {
  position: relative;
  background: linear-gradient(145deg, rgba(28, 20, 16, 0.98), rgba(12, 10, 8, 0.99));
  border: 1.5px solid rgba(255, 75, 75, 0.85);
  border-radius: 4px; /* حواف حادة هندسية */
  padding: 24px 22px 20px;
  width: min(92vw, 360px);
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.95), 0 0 30px rgba(255, 60, 60, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  animation: popIn 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.no-net-modal-icon {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(255, 60, 60, 0.20), rgba(40, 10, 10, 0.9));
  border: 1.5px solid rgba(255, 75, 75, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff5252;
  box-shadow: 0 6px 18px rgba(255, 40, 40, 0.35), inset 0 0 12px rgba(255, 60, 60, 0.2);
}

.no-net-icon-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 75, 75, 0.4);
  animation: pulseGlow 1.8s infinite ease-in-out;
  pointer-events: none;
}

.no-net-wifi-svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 6px rgba(255, 40, 40, 0.6));
}

.no-net-modal-title {
  font-size: 17px;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.no-net-modal-msg {
  font-size: 13px;
  font-weight: 700;
  color: #e0d8c8;
  line-height: 1.5;
  margin: 0;
  padding: 0 6px;
}

.no-net-modal-btn {
  width: 150px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  border-radius: 4px !important;
  margin-top: 6px !important;
  background: linear-gradient(135deg, #ff5252, #c62828) !important;
  border: 1.5px solid #ff8a80 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(255, 40, 40, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.3) !important;
  line-height: 1 !important;
  text-align: center !important;
  cursor: pointer !important;
  transition: transform 0.1s ease, filter 0.1s ease !important;
}

.no-net-modal-btn:hover {
  filter: brightness(1.1) !important;
  transform: scale(1.02) !important;
}

.no-net-modal-btn:active {
  transform: scale(0.96) !important;
}

/* =========================================================================
   WORKSHOP SCREEN (ورشة الأسطى حمادة - Visual Novel Story Mode)
   ========================================================================= */

#screen-workshop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  z-index: 45;
  background-color: #0b080f;
}

.workshop-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 1;
  filter: brightness(0.85) contrast(1.08);
  transform: scale(1.02);
  transition: transform 10s ease-out;
}

#screen-workshop:not(.hidden) .workshop-bg {
  transform: scale(1.06);
}

.workshop-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 75% 40%, rgba(255, 180, 50, 0.08) 0%, transparent 50%),
              linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(15, 10, 20, 0.2) 35%, rgba(10, 8, 15, 0.75) 75%, rgba(6, 4, 10, 0.96) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Top Bar Navigation */
.workshop-top-bar {
  position: absolute;
  top: 14px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 30;
  pointer-events: auto;
}

.workshop-back-btn {
  background: rgba(22, 18, 28, 0.85) !important;
  border: 1.5px solid rgba(255, 215, 0, 0.3) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px !important;
  padding: 6px 18px !important;
  color: #fef08a !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6) !important;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.workshop-back-btn:hover {
  transform: scale(1.06) !important;
  border-color: rgba(255, 215, 0, 0.7) !important;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.25) !important;
}

.workshop-back-btn:active {
  transform: scale(0.94) !important;
}

.workshop-title-badge {
  background: rgba(18, 14, 24, 0.85);
  border: 1.5px solid rgba(255, 193, 7, 0.45);
  border-radius: 999px;
  padding: 5px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 900;
  color: #fef08a;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Character Sprite Presentation (AM-HAMADA) - 20% Larger & Steady */
.workshop-character-wrap {
  position: absolute;
  bottom: -6px;
  right: 2%;
  width: 58vh;
  max-width: 500px;
  height: 104vh;
  max-height: 660px;
  z-index: 10;
  pointer-events: none;
  transform: translateY(120px) scale(0.95);
  opacity: 0;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 20px rgba(251, 191, 36, 0.25));
  transition: transform 0.75s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.75s ease;
}

.workshop-character-wrap.character-entered {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.workshop-character-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom right;
  display: block;
}

/* Visual Novel Story Dialogue Box - Full Width & Low Profile (Lifted) */
.workshop-dialogue-box {
  position: absolute;
  bottom: 24px;
  left: 16px;
  right: 16px;
  width: calc(100% - 32px);
  max-width: none;
  box-sizing: border-box;
  background: rgba(14, 10, 20, 0.92);
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  border-radius: 14px;
  padding: 8px 20px 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 0 16px rgba(245, 158, 11, 0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transform: translateY(40px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.4s ease;
}

.workshop-dialogue-box.dialogue-active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.dialogue-speaker-header {
  position: static;
}

.speaker-pill {
  position: absolute;
  top: -30px;
  right: 18px;
  display: inline-block;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  z-index: 30;
  pointer-events: none;
}

.speaker-name {
  font-size: 16px;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.9);
}

.dialogue-tap-hint {
  position: absolute;
  top: 8px;
  left: 18px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
  animation: hintPulse 1.8s ease-in-out infinite alternate;
}

@keyframes hintPulse {
  0% { opacity: 0.35; }
  100% { opacity: 0.9; color: #fbbf24; }
}

.dialogue-content {
  position: relative;
  min-height: 24px;
  font-size: 13px;
  line-height: 1.45;
  color: #f8fafc;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.dialogue-text {
  display: inline;
  margin: 0;
  padding: 0;
}

.dialogue-cursor {
  display: inline-block;
  color: #fbbf24;
  font-size: 11px;
  font-weight: 900;
  margin-inline-start: 4px;
  animation: cursorBlink 0.7s infinite alternate;
}

@keyframes cursorBlink {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* Floating Story Action Cards (XT: فحص العربية + XG: شوف المحل) */
.workshop-float-actions {
  position: absolute;
  top: -50px;
  left: 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  z-index: 35;
  direction: ltr;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.workshop-float-actions.actions-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.92);
}

.workshop-action-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 15px;
  border-radius: 22px;
  cursor: pointer;
  border: 1.5px solid transparent;
  background: rgba(18, 14, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  direction: rtl;
  font-family: inherit;
  outline: none;
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.18s ease, border-color 0.18s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.workshop-action-card:hover {
  transform: translateY(-2px) scale(1.05);
}

.workshop-action-card:active {
  transform: translateY(1px) scale(0.96);
}

.workshop-action-card.card-inspect {
  background: linear-gradient(135deg, rgba(12, 24, 42, 0.96), rgba(16, 42, 70, 0.92));
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65), 0 0 14px rgba(56, 189, 248, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.workshop-action-card.card-inspect:hover {
  border-color: #38bdf8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 22px rgba(56, 189, 248, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.workshop-action-card.card-inspect .action-card-label {
  color: #e0f2fe;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(56, 189, 248, 0.4);
}

.workshop-action-card.card-shop {
  background: linear-gradient(135deg, rgba(28, 18, 10, 0.96), rgba(48, 30, 12, 0.92));
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65), 0 0 14px rgba(245, 158, 11, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.workshop-action-card.card-shop:hover {
  border-color: #fbbf24;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 22px rgba(245, 158, 11, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.workshop-action-card.card-shop .action-card-label {
  color: #fef3c7;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(245, 158, 11, 0.4);
}

.workshop-action-card.card-repair-accept {
  background: linear-gradient(135deg, rgba(8, 38, 22, 0.96), rgba(14, 58, 32, 0.92));
  border-color: rgba(52, 211, 153, 0.85);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65), 0 0 16px rgba(52, 211, 153, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.workshop-action-card.card-repair-accept:hover {
  border-color: #34d399;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 24px rgba(52, 211, 153, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.workshop-action-card.card-repair-accept .action-card-label {
  color: #d1fae5;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(52, 211, 153, 0.5);
}

.workshop-action-card.card-repair-reject {
  background: linear-gradient(135deg, rgba(34, 20, 24, 0.96), rgba(48, 24, 30, 0.92));
  border-color: rgba(248, 113, 113, 0.75);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65), 0 0 14px rgba(248, 113, 113, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.workshop-action-card.card-repair-reject:hover {
  border-color: #f87171;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 20px rgba(248, 113, 113, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.25);
}

.workshop-action-card.card-repair-reject .action-card-label {
  color: #fee2e2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(248, 113, 113, 0.4);
}

.action-card-emoji {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  pointer-events: none;
}

.workshop-action-card.hidden {
  display: none !important;
}

.action-card-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
  pointer-events: none;
}

.action-card-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  pointer-events: none;
}

/* Mobile & Small Landscape Adjustments */
@media (max-height: 480px) {
  .workshop-top-bar {
    top: 6px;
    left: 12px;
    right: 12px;
  }
  .workshop-back-btn {
    padding: 3px 12px !important;
    font-size: 12px !important;
  }
  .workshop-title-badge {
    padding: 2px 10px;
    font-size: 11px;
  }
  .workshop-character-wrap {
    width: 52vh;
    height: 105vh;
    max-height: 520px;
    right: 1%;
    bottom: -8px;
  }
  .workshop-dialogue-box {
    bottom: 18px;
    left: 12px;
    right: 12px;
    width: calc(100% - 24px);
    padding: 5px 14px 6px;
    gap: 2px;
  }
  .dialogue-content {
    font-size: 12px;
    line-height: 1.4;
    min-height: 22px;
  }
  .speaker-pill {
    top: -24px;
    right: 14px;
    padding: 0;
  }
  .speaker-name {
    font-size: 14px;
  }
  .dialogue-tap-hint {
    top: 5px;
    left: 12px;
  }
  .workshop-float-actions {
    top: -42px;
    left: 10px;
    gap: 8px;
  }
  .workshop-action-card {
    padding: 3px 11px;
    border-radius: 16px;
    gap: 6px;
  }
  .action-card-img {
    width: 22px;
    height: 22px;
  }
  .action-card-label {
    font-size: 11.5px;
  }
}

/* ================= UNCLE HAMADA'S STORE (متجر عم حمادة) ================= */
#screen-hamada-store {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #191424;
  z-index: 20;
}

#screen-hamada-store.hidden {
  display: none !important;
}

.hamada-store-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url('../ASSETS/SYSTEM/CHARACTER/HRDA.webp');
  background-size: cover;
  background-position: center;
  z-index: 1;
  filter: brightness(1.05) contrast(1.02);
}

.hamada-store-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.26) 100%),
              linear-gradient(180deg, rgba(14, 10, 24, 0.35) 0%, transparent 18%, transparent 82%, rgba(14, 10, 24, 0.45) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Top Navigation: Back Button (Extreme Top-Right) & Wallet (Extreme Top-Left) */
#hamada-store-back {
  position: absolute !important;
  top: max(10px, env(safe-area-inset-top)) !important;
  right: max(14px, env(safe-area-inset-right)) !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  border-radius: 0px !important;
  z-index: 60 !important;
  padding: 6px 16px !important;
  font-size: 13px !important;
}

#hamada-store-back:hover {
  transform: scale(1.04) !important;
}

.hstore-wallet-badge {
  position: absolute !important;
  top: max(10px, env(safe-area-inset-top)) !important;
  left: max(14px, env(safe-area-inset-left)) !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 5px 13px !important;
  background: rgba(18, 14, 26, 0.88) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.75) !important;
  border-radius: 0px !important;
  color: #fbbf24 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
  z-index: 60 !important;
}

.hstore-coin-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.hstore-container {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 14px 8px;
  gap: 6px;
  overflow: hidden;
}

/* Category Tabs with Sharp Edges - Centered with clearance for corner elements */
.hstore-category-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 130px;
  min-height: 36px;
  flex-shrink: 0;
}

.hstore-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 15px;
  border-radius: 0px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(18, 14, 28, 0.78);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
}

.hstore-tab-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.hstore-tab-btn:hover {
  border-color: rgba(245, 158, 11, 0.5);
  color: #fef08a;
  transform: translateY(-1px);
}

.hstore-tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(217, 119, 6, 0.5));
  border-color: #fbbf24;
  color: #fef08a;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* Content Body */
/* Catalog Goods Scroll & Full Width 4-Column Grid */
.hstore-catalog-scroll {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 4px 6px 14px;
  -webkit-overflow-scrolling: touch;
}

.hstore-items-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.hstore-card {
  position: relative;
  background: linear-gradient(180deg, rgba(28, 20, 44, 0.78) 0%, rgba(16, 11, 28, 0.85) 100%);
  border: 1.2px solid rgba(255, 255, 255, 0.18);
  border-radius: 0px;
  padding: 5px 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.hstore-card:hover {
  border-color: rgba(245, 158, 11, 0.75);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), 0 0 14px rgba(245, 158, 11, 0.3);
}

.hstore-card:active {
  transform: translateY(-1px) scale(0.99);
}

/* GREEN SQUARE for Owned / Equipped / Activated items */
.hstore-card.card-owned-active {
  background: linear-gradient(180deg, rgba(12, 54, 28, 0.88) 0%, rgba(6, 30, 16, 0.94) 100%);
  border: 1.5px solid #22c55e;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 0 14px rgba(34, 197, 94, 0.2), 0 0 10px rgba(34, 197, 94, 0.25);
}

.hstore-card.card-owned-active:hover {
  border-color: #4ade80;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.65), 0 0 16px rgba(74, 222, 128, 0.45);
}

.hstore-card.card-owned-active .hstore-card-img-wrap {
  background: radial-gradient(circle at center, rgba(34, 197, 94, 0.25) 0%, transparent 72%);
}

.hstore-card.card-owned-active .hstore-card-price {
  color: #86efac;
}

.hstore-card.card-equipped {
  border: 1.8px solid #4ade80;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55), inset 0 0 16px rgba(74, 222, 128, 0.25), 0 0 14px rgba(74, 222, 128, 0.4);
}

.hstore-card-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 8.5px;
  font-weight: 800;
  padding: 1.5px 5px;
  border-radius: 0px;
  white-space: nowrap;
  z-index: 2;
}

.hstore-card-badge.badge-equipped {
  background: #15803d;
  border: 1px solid #4ade80;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.hstore-card-badge.badge-owned {
  background: rgba(22, 101, 52, 0.75);
  border: 1px solid #22c55e;
  color: #bbf7d0;
}

/* Pure white clean category text with NO background rectangle */
.hstore-card-type-text {
  position: absolute;
  top: 4px;
  left: 5px;
  font-size: 8.5px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 4px rgba(0, 0, 0, 0.85);
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 2;
  letter-spacing: 0.3px;
  pointer-events: none;
}

.hstore-card-img-wrap {
  position: relative;
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.12) 0%, transparent 72%);
  border-radius: 0px;
}

.hstore-card-img {
  max-width: 56px;
  max-height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.7));
  pointer-events: none;
  transition: transform 0.22s ease;
}

.hstore-card:hover .hstore-card-img {
  transform: scale(1.08);
}

.hstore-card-name {
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  letter-spacing: 0.1px;
}

.hstore-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 1px;
  padding-top: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hstore-card-price {
  font-size: 10.5px;
  font-weight: 800;
  color: #fbbf24;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.hstore-card-stat {
  font-size: 9.5px;
  font-weight: 800;
  color: #38bdf8;
  direction: ltr;
}

/* Details Popup Modal (نافذة التفاصيل) */
.hstore-modal-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.hstore-modal-overlay.hidden {
  display: none !important;
}

.hstore-modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(6, 4, 12, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hstore-modal-card {
  position: relative;
  z-index: 10;
  width: 92%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(155deg, rgba(24, 17, 38, 0.98) 0%, rgba(13, 8, 22, 0.98) 100%);
  border: 2px solid rgba(245, 158, 11, 0.6);
  border-radius: 0px;
  padding: 18px 22px 20px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.9), 0 0 32px rgba(245, 158, 11, 0.3);
  animation: hstoreModalPop 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  direction: rtl;
}

@keyframes hstoreModalPop {
  0% { transform: scale(0.88); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.hstore-modal-close {
  position: absolute;
  top: 12px;
  left: 14px;
  width: 32px;
  height: 32px;
  border-radius: 0px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: all 0.18s ease;
  z-index: 20;
}

.hstore-modal-close:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: #f87171;
  color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.hstore-modal-pod {
  position: relative;
  width: 100%;
  height: 120px;
  background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.18) 0%, rgba(0, 0, 0, 0.45) 80%);
  border-radius: 0px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
}

.hstore-modal-pod .hstore-preview-img {
  max-width: 110px;
  max-height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.8));
  animation: floatSubtle 3s ease-in-out infinite alternate;
}

.hstore-details-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hstore-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hstore-item-name {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.hstore-item-badge {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 0px;
  padding: 2px 8px;
  white-space: nowrap;
}

.hstore-item-desc {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
  min-height: 32px;
}

.hstore-specs-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 4px 0 6px;
}

.hstore-spec-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.spec-chip-label {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
}

.spec-chip-val {
  font-size: 12.5px;
  color: #38bdf8;
  font-weight: 900;
  white-space: nowrap;
  direction: ltr;
}

.hstore-action-btn {
  margin-top: 6px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 0px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  border: 1.5px solid transparent;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.hstore-action-btn.action-buy {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fef08a;
  color: #1e1b4b;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.5);
}

.hstore-action-btn.action-buy:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.65);
}

.hstore-action-btn.action-equip {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.4);
}

.hstore-action-btn.action-equip:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 22px rgba(56, 189, 248, 0.6);
}

.hstore-action-btn.action-equipped {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #86efac;
  cursor: default;
}

/* Mobile & Small Landscape Adjustments */
@media (max-height: 480px) {
  #hamada-store-back {
    top: 5px !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    padding: 4px 12px !important;
    font-size: 11.5px !important;
  }
  #hamada-store-back:hover {
    transform: scale(1.04) !important;
  }
  .hstore-wallet-badge {
    top: 5px !important;
    left: 10px !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    padding: 3px 9px !important;
    font-size: 11.5px !important;
  }
  .hstore-coin-img {
    width: 17px;
    height: 17px;
  }
  .hstore-container {
    padding: 4px 10px 4px;
    gap: 4px;
  }
  .hstore-category-tabs {
    padding: 0 100px;
    gap: 6px;
    min-height: 28px;
  }
  .hstore-tab-btn {
    padding: 2px 10px;
    font-size: 11px;
  }
  .hstore-items-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }
  .hstore-card {
    padding: 4px 4px 3px;
    gap: 2px;
    border-radius: 0px;
  }
  .hstore-card-img-wrap {
    height: 40px;
    border-radius: 0px;
  }
  .hstore-card-img {
    max-width: 44px;
    max-height: 36px;
  }
  .hstore-card-name {
    font-size: 9.5px;
  }
  .hstore-card-price {
    font-size: 9px;
  }
  .hstore-card-stat {
    font-size: 8.5px;
  }
  .hstore-modal-card {
    max-height: 94vh;
    padding: 12px 16px;
    max-width: 480px;
    border-radius: 0px;
  }
  .hstore-modal-pod {
    height: 80px;
    margin-bottom: 6px;
    border-radius: 0px;
  }
  .hstore-modal-pod .hstore-preview-img {
    max-width: 75px;
    max-height: 70px;
  }
  .hstore-item-name {
    font-size: 14px;
  }
  .hstore-item-desc {
    font-size: 10.5px;
    min-height: 22px;
  }
  .hstore-specs-bar {
    gap: 4px;
    margin: 2px 0;
  }
  .hstore-spec-chip {
    padding: 3px 6px;
  }
  .spec-chip-label {
    font-size: 8.5px;
  }
  .spec-chip-val {
    font-size: 10.5px;
  }
  .hstore-action-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .hstore-category-tabs {
    margin-top: 36px;
    padding: 0 6px;
  }
}

/* ================= TRAVEL MODE (طريق القاهرة - الغردقة السريع) ================= */
body:not(.playing) #travel-hud, body.paused #travel-hud { display: none !important; }
#travel-hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#travel-hud > * { position: absolute; }

.thud-tl {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 5px;
  pointer-events: auto;
}

.travel-health-chip {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: rgba(18, 14, 24, 0.90) !important;
  border: 1.5px solid rgba(74, 222, 128, 0.45) !important;
  border-radius: 999px;
  padding: 2px 8px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s ease;
}
.travel-health-chip.warn {
  border-color: rgba(245, 158, 11, 0.8) !important;
}
.travel-health-chip.warn .thud-health-bar-fill {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.travel-health-chip.warn .thud-health-val {
  color: #fbbf24;
}
.travel-health-chip.danger {
  border-color: rgba(239, 68, 68, 0.95) !important;
  animation: health-pulse 0.8s infinite alternate;
}
.travel-health-chip.danger .thud-health-bar-fill {
  background: linear-gradient(90deg, #ef4444, #f87171);
}
.travel-health-chip.danger .thud-health-val {
  color: #f87171;
}
@keyframes health-pulse {
  0% { box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }
  100% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.9); }
}
.travel-health-chip.damage-pulse {
  animation: health-damage-shake 0.45s ease-out !important;
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.32) !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.85) !important;
}
@keyframes health-damage-shake {
  0% { transform: scale(1.18) rotate(0deg); }
  20% { transform: scale(1.18) rotate(-4deg); }
  40% { transform: scale(1.18) rotate(4deg); }
  60% { transform: scale(1.08) rotate(-2deg); }
  80% { transform: scale(1.04) rotate(1deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.thud-health-bar-fill.damage-hit {
  background: #ff2222 !important;
  box-shadow: 0 0 10px #ff2222 !important;
}

.thud-health-icon {
  font-size: 11px;
  line-height: 1;
}
.thud-health-bar-wrap {
  width: 52px;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.thud-health-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  border-radius: 3px;
  transition: width 0.2s ease, background 0.3s ease;
}
.thud-health-val {
  font-size: 10px;
  font-weight: 900;
  color: #4ade80;
  letter-spacing: 0.5px;
  min-width: 28px;
  text-align: center;
  transition: color 0.3s ease;
}

.thud-tc {
  position: absolute;
  top: max(4px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(310px, 38vw);
  pointer-events: auto;
  text-align: center;
}

.travel-route-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(14, 10, 22, 0.88);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 8px;
  padding: 2px 8px 3px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  direction: ltr !important;
}

.travel-milestones-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 7.2px;
  font-weight: 800;
  color: #cbd5e1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  direction: ltr !important;
}
.travel-milestones-row .ms-node.active {
  color: #fef08a;
  font-weight: 900;
}

.travel-track {
  position: relative;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: visible;
  margin: 1px 0;
  direction: ltr !important;
}
.travel-track-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #eab308, #22c55e);
  border-radius: 3px;
  transition: width 0.18s linear;
}
.travel-veh-marker {
  position: absolute;
  top: -6px;
  left: 0%;
  font-size: 11px;
  transform: translate(-50%, 0) scaleX(-1);
  transition: left 0.18s linear;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
  pointer-events: none;
  line-height: 1;
}

.travel-dist-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 7.8px;
  font-weight: 800;
  color: #94a3b8;
}
.travel-stage-badge {
  color: #fef08a;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 3px;
  padding: 0px 4px;
  font-size: 7.2px;
}
.travel-km-badge {
  color: #38bdf8;
  direction: ltr;
  font-size: 7.8px;
}

.thud-tr {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: auto;
}

/* Station Boarding Overlay (الموقف) */
.travel-station-overlay {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(6, 4, 12, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 40 !important;
  pointer-events: auto !important;
  animation: fadeIn 0.25s ease;
}
.travel-station-overlay.hidden {
  display: none !important;
}

.station-banner-card {
  background: linear-gradient(155deg, rgba(26, 18, 38, 0.96) 0%, rgba(14, 10, 22, 0.98) 100%);
  border: 2px solid rgba(245, 158, 11, 0.7);
  border-radius: 16px;
  padding: 14px 20px 16px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0,0,0,0.9), 0 0 24px rgba(245, 158, 11, 0.25);
  direction: rtl;
}

.station-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}
.station-pin { font-size: 18px; }
.station-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.station-card-status {
  font-size: 13px;
  font-weight: 800;
  color: #fef08a;
  margin: 3px 0 8px;
}

.station-quote-bubble {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-style: italic;
  color: #f1f5f9;
  margin-bottom: 12px;
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.travel-depart-btn {
  width: 100%;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 900;
  border-radius: 10px;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
  color: #94a3b8 !important;
  transition: all 0.25s ease;
}
.travel-depart-btn.ready {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border-color: #fef08a !important;
  color: #1e1b4b !important;
  cursor: pointer !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6) !important;
  animation: departPulse 1.6s infinite alternate;
}

/* Hurghada Arrival End Card */
.travel-end-card {
  border-color: rgba(3, 105, 161, 0.75) !important;
  background: linear-gradient(155deg, rgba(12, 34, 52, 0.98) 0%, rgba(8, 18, 30, 0.98) 100%) !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.9), 0 0 35px rgba(2, 132, 199, 0.3) !important;
}
.travel-end-card .ce-icon-glow {
  background: rgba(2, 132, 199, 0.2) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
}

/* ================= RADAR WARNING WIDGET ================= */
.travel-radar-widget {
  position: absolute;
  top: calc(max(8px, env(safe-area-inset-top)) + 74px);
  left: max(10px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid #38bdf8;
  border-radius: 999px;
  padding: 4px 12px 4px 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7), 0 0 14px rgba(56, 189, 248, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  z-index: 25;
  transition: all 0.25s ease;
}
.travel-radar-widget.warn {
  border-color: #ef4444;
  box-shadow: 0 4px 22px rgba(239, 68, 68, 0.8), 0 0 20px rgba(239, 68, 68, 0.6);
  animation: radarWarnShake 0.4s infinite alternate;
}
@keyframes radarWarnShake {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

.radar-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid rgba(56, 189, 248, 0.6);
  animation: radarRingPulse 1.4s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.travel-radar-widget.warn .radar-pulse-ring {
  border-color: rgba(239, 68, 68, 0.8);
}
@keyframes radarRingPulse {
  0% { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(1.35); opacity: 0; }
}

.radar-inner-circle {
  display: flex;
  align-items: center;
  gap: 5px;
}
.radar-dish-icon {
  font-size: 18px;
  filter: drop-shadow(0 0 4px #38bdf8);
}
.radar-speed-sign {
  width: 32px;
  height: 32px;
  background: #ffffff;
  border: 3.5px solid #dc2626;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.radar-speed-sign span {
  color: #000000;
  font-weight: 900;
  font-size: 13px;
  font-family: Arial, sans-serif;
  line-height: 1;
}
.radar-info-box {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.radar-info-box b {
  color: #fef08a;
  font-size: 13px;
  font-weight: 900;
}
.radar-info-box small {
  color: #94a3b8;
  font-size: 9.5px;
  font-weight: 700;
}

/* ================= POLICE CHECKPOINT ALERT BANNER ================= */
.travel-checkpoint-alert {
  position: absolute;
  top: calc(max(6px, env(safe-area-inset-top)) + 58px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(67, 20, 7, 0.95));
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 6px 18px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.8), 0 0 18px rgba(245, 158, 11, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 30;
  animation: cpAlertPulse 1.2s infinite alternate;
}
@keyframes cpAlertPulse {
  0% { transform: translateX(-50%) scale(0.98); box-shadow: 0 0 10px rgba(245, 158, 11, 0.3); }
  100% { transform: translateX(-50%) scale(1.02); box-shadow: 0 0 24px rgba(245, 158, 11, 0.7); }
}
.cp-alert-icon { font-size: 22px; }
.cp-alert-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  text-align: right;
}
.cp-alert-text b { color: #fef08a; font-size: 13px; font-weight: 900; }
.cp-alert-text small { color: #f87171; font-size: 10.5px; font-weight: 800; }

/* ================= INTERACTIVE POLICE INSPECTION MODAL ================= */
.travel-inspection-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 6, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  padding: 16px;
  pointer-events: auto;
}
.license-inspect-card {
  width: min(440px, 92vw);
  background: linear-gradient(155deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid #38bdf8;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(56, 189, 248, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.lic-card-header {
  background: linear-gradient(90deg, #0369a1, #0284c7);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #f59e0b;
}
.lic-eagle { font-size: 26px; }
.lic-header-titles h4 {
  margin: 0;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 900;
}
.lic-header-titles small {
  color: #bae6fd;
  font-size: 10px;
  font-weight: 700;
}
.lic-card-body {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.lic-photo-box {
  width: 62px;
  height: 74px;
  background: #334155;
  border: 2px solid #64748b;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5);
}
.lic-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}
.lic-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: #94a3b8;
}
.lic-row b { color: #f1f5f9; }
.lic-row b.lic-ok { color: #4ade80; }
.lic-row i {
  color: #fef08a;
  font-style: normal;
  font-weight: 800;
  font-size: 11px;
}
.lic-card-footer {
  padding: 12px 16px 14px;
  background: rgba(15, 23, 42, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.travel-inspect-action-btn {
  width: 100%;
  padding: 11px;
  font-size: 14px;
  font-weight: 900;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border: 2px solid #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5) !important;
  cursor: pointer;
  transition: all 0.2s ease;
}
.travel-inspect-action-btn:active {
  transform: scale(0.97);
}
.lic-inspect-progress {
  color: #38bdf8;
  font-weight: 800;
  font-size: 11.5px;
  margin: 0;
  animation: inspectPulse 0.8s infinite alternate;
}
@keyframes inspectPulse {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* ================= RADAR FLASH & POLICE SIREN OVERLAYS ================= */
.travel-flash-fx {
  position: fixed;
  inset: 0;
  background: #ffffff;
  pointer-events: none;
  z-index: 3000;
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.1, 0.9, 0.2, 1);
}
.travel-flash-fx.active {
  opacity: 0.92;
  transition: none;
}

.travel-siren-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2500;
  box-shadow: inset 0 0 60px 25px rgba(239, 68, 68, 0.8);
  animation: sirenFlash 0.35s infinite alternate;
}
@keyframes sirenFlash {
  0% {
    box-shadow: inset 0 0 70px 30px rgba(239, 68, 68, 0.9);
  }
  100% {
    box-shadow: inset 0 0 70px 30px rgba(59, 130, 246, 0.9);
  }
}

/* ================= CITY UPCOMING SPEED LIMIT ALERT WIDGET ================= */
.city-speed-alert-widget {
  position: absolute;
  top: calc(max(8px, env(safe-area-inset-top)) + 52px);
  left: 50%;
  transform: translateX(-50%) translateY(0);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.94);
  border: 2px solid #38bdf8;
  border-radius: 999px;
  padding: 6px 18px 6px 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.75), 0 0 16px rgba(56, 189, 248, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  z-index: 45;
  direction: rtl;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}

.city-speed-alert-widget.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-22px) scale(0.92);
  pointer-events: none;
}

.city-speed-alert-widget.warn {
  border-color: #ef4444;
  box-shadow: 0 6px 28px rgba(239, 68, 68, 0.85), 0 0 22px rgba(239, 68, 68, 0.55);
  animation: csAlertPulse 0.5s infinite alternate;
}

@keyframes csAlertPulse {
  0% { transform: translateX(-50%) scale(1); }
  100% { transform: translateX(-50%) scale(1.04); }
}

.city-speed-alert-widget.entered {
  border-color: #10b981;
  box-shadow: 0 6px 28px rgba(16, 185, 129, 0.85), 0 0 22px rgba(16, 185, 129, 0.55);
}

.cs-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid rgba(56, 189, 248, 0.6);
  animation: csRingPulse 1.5s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.city-speed-alert-widget.warn .cs-pulse-ring {
  border-color: rgba(239, 68, 68, 0.85);
}

.city-speed-alert-widget.entered .cs-pulse-ring {
  border-color: rgba(16, 185, 129, 0.85);
}

@keyframes csRingPulse {
  0% { transform: scale(0.96); opacity: 1; }
  100% { transform: scale(1.22); opacity: 0; }
}

.cs-sign-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Classic Egyptian / International Circular Speed Limit Sign */
.cs-speed-circle {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: 4.5px solid #dc2626;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  animation: csSignBounce 1.2s infinite ease-in-out;
}

@keyframes csSignBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.cs-speed-circle span {
  color: #0f172a;
  font-weight: 900;
  font-size: 18px;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  line-height: 1;
}

.cs-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cs-top-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-badge {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.city-speed-alert-widget.warn .cs-badge {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.city-speed-alert-widget.entered .cs-badge {
  background: linear-gradient(135deg, #059669, #047857);
}

.cs-top-line b {
  color: #f8fafc;
  font-size: 13.5px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.cs-bottom-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #cbd5e1;
}

.cs-dist-badge {
  color: #facc15;
  font-weight: 800;
}

.cs-sep {
  color: #64748b;
  font-size: 10px;
}

.city-speed-alert-widget.warn .cs-bottom-line {
  color: #fca5a5;
  font-weight: 700;
}

@media (max-width: 600px) {
  .city-speed-alert-widget {
    top: calc(max(6px, env(safe-area-inset-top)) + 46px);
    padding: 4px 14px 4px 6px;
    gap: 9px;
  }
  .cs-speed-circle {
    width: 38px;
    height: 38px;
    border-width: 3.5px;
  }
  .cs-speed-circle span {
    font-size: 16px;
  }
  .cs-top-line b {
    font-size: 12px;
  }
  .cs-bottom-line {
    font-size: 10.5px;
  }
}

/* ================= CLOUD SAVE & AUTH STYLING ================= */

/* 1. Loading Screen Auth Buttons */
.loading-auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px 14px;
  pointer-events: auto;
  animation: authSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.loading-auth-container.hidden {
  display: none !important;
}

@keyframes authSlideUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading-auth-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 22px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1px solid #fbbf24;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.45);
  transition: transform 0.15s ease, filter 0.15s ease;
  pointer-events: auto;
}
.loading-auth-btn:active {
  transform: scale(0.96);
  filter: brightness(0.9);
}
.loading-auth-btn .auth-btn-main {
  font-size: 14.5px;
  font-weight: 900;
  color: #120e09;
  letter-spacing: 0.2px;
}
.loading-auth-btn .auth-btn-sub {
  font-size: 9.5px;
  font-weight: 700;
  color: #3b2207;
  margin-top: 1px;
}

.loading-offline-btn {
  padding: 10px 18px;
  background: rgba(22, 18, 14, 0.88);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 3px;
  color: #f3f4f6;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  pointer-events: auto;
}
.loading-offline-btn:active {
  transform: scale(0.96);
  background: rgba(45, 35, 25, 0.95);
}

/* 2. Player Auth Modal (Sharp, Professional, Zero Emojis) */
.auth-modal-card {
  position: relative;
  background: linear-gradient(180deg, #1f1812 0%, #120e0b 100%);
  border: 1.5px solid #d97706;
  border-radius: 4px;
  padding: 18px 20px;
  max-width: 360px;
  width: 92%;
  box-sizing: border-box;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.95), 0 0 20px rgba(217, 119, 6, 0.2);
  animation: authPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #fff;
}

@keyframes authPop {
  from { opacity: 0; transform: scale(0.93); }
  to { opacity: 1; transform: scale(1); }
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(217, 119, 6, 0.25);
  padding-bottom: 10px;
}
.auth-modal-title {
  font-size: 16px;
  font-weight: 900;
  color: #fbbf24;
  margin: 0;
  letter-spacing: 0.2px;
}
.auth-modal-title.danger-title {
  color: #ef4444;
}
.auth-modal-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #9ca3af;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 2px;
  line-height: 1.2;
  transition: all 0.15s ease;
}
.auth-modal-close:hover,
.auth-modal-close:active {
  color: #fff;
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
}

/* Sharp Tabs */
.auth-tabs {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
.auth-tab-btn {
  flex: 1;
  padding: 8px 6px;
  background: transparent;
  border: none;
  border-radius: 2px;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}
.auth-tab-btn.active {
  background: #d97706;
  color: #111;
  font-weight: 900;
}

/* Auth Form & Inputs */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}
.auth-input-lbl {
  font-size: 12px;
  font-weight: 800;
  color: #d1d5db;
}
.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 3px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-input:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}

/* Live Feedback Msg */
.auth-msg {
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 2px;
  line-height: 1.45;
  border: 1px solid transparent;
}
.auth-msg.error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.auth-msg.success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}
.auth-msg.info {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fde68a;
}
.auth-msg.hidden {
  display: none !important;
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1px solid #fbbf24;
  border-radius: 3px;
  color: #111;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.auth-submit-btn:active {
  transform: scale(0.98);
  filter: brightness(0.9);
}

/* 3. Logout Warning Modal */
.logout-warning-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: #e5e7eb;
  margin: 4px 0 10px;
}
.logout-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.auth-btn-danger {
  flex: 1;
  padding: 10px 12px;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border: 1px solid #ef4444;
  border-radius: 3px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.auth-btn-danger:active {
  filter: brightness(0.85);
}
.auth-btn-secondary {
  flex: 1;
  padding: 10px 12px;
  background: rgba(45, 35, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  color: #f3f4f6;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease;
}
.auth-btn-secondary:active {
  background: rgba(60, 48, 35, 0.95);
}

/* 4. Settings Cloud Group */
#settings-cloud-group .set-row {
  align-items: center;
}
#cloud-user-badge.online {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #86efac;
}
#cloud-user-badge.offline {
  background: rgba(156, 163, 175, 0.15);
  border-color: #9ca3af;
  color: #d1d5db;
}


