:root {
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-dark: rgba(15, 23, 42, 0.8);
  --ink: #0f172a;
  --muted: #475569;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --green: #22c55e;
  --blue: #38bdf8;
  --red: #ef4444;
  --gold: #f59e0b;
  --border: rgba(15, 23, 42, 0.22);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}

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

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: #87ceeb;
  user-select: none;
  touch-action: manipulation;
}

.hidden {
  display: none !important;
}

#game-container {
  position: fixed;
  inset: 0;
  z-index: 1;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#world-labels {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.world-label {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.world-label.nametag {
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.world-label.nametag.self {
  background: rgba(37, 99, 235, 0.92);
}

.world-label.landmark {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  border: 2px solid #0f172a;
  font-size: 12px;
}

/* Auth Overlay */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: radial-gradient(circle at top, rgba(125, 211, 252, 0.88), rgba(30, 58, 138, 0.92));
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card {
  background: #ffffff;
  border: 3px solid #0f172a;
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.35);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 28px 26px;
  text-align: center;
}

.brand-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: #fef08a;
  border: 2px solid #0f172a;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.auth-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 900;
}

.auth-subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.google-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 13px 18px;
  border-radius: 14px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
  transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.google-btn:hover {
  border-color: #4285f4;
  box-shadow: 0 6px 18px rgba(66, 133, 244, 0.22);
  transform: translateY(-1px);
}

.google-icon {
  width: 22px;
  height: 22px;
}

.auth-note {
  margin: 16px 0 0;
  font-size: 12px;
  color: #64748b;
}

.auth-warning {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 600;
}

.chooser-header {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  margin-bottom: 16px;
}

.chooser-g {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #eef2ff;
  border: 2px solid #4285f4;
  color: #4285f4;
  font-weight: 900;
  font-size: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.chooser-title {
  margin: 0;
  font-size: 18px;
}

.chooser-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.saved-accounts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.saved-account-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
}

.saved-account-btn:hover {
  border-color: #4285f4;
  background: #eff6ff;
}

.account-avatar-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.custom-google-form,
.nickname-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.custom-google-form label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.custom-google-form input,
.nickname-form input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  font-size: 15px;
  outline: none;
}

.custom-google-form input:focus,
.nickname-form input:focus {
  border-color: var(--accent);
}

.chooser-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.chooser-actions button {
  flex: 1;
}

/* Shared Buttons */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-buy {
  border: 2px solid #0f172a;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.12s ease;
}

.btn-primary {
  background: #3b82f6;
  color: #ffffff;
}

.btn-secondary {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-danger {
  background: #ef4444;
  color: #ffffff;
}

.btn-buy {
  background: #fbbf24;
  color: #0f172a;
  white-space: nowrap;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover,
.btn-buy:hover {
  filter: brightness(0.96);
}

.btn-primary:active,
.btn-secondary:active,
.btn-danger:active,
.btn-buy:active {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.25);
  transform: none !important;
}

.btn-large {
  padding: 13px 18px;
  font-size: 16px;
}

.btn-mini-danger {
  border: 2px solid #0f172a;
  border-radius: 999px;
  padding: 4px 10px;
  background: #fecaca;
  color: #7f1d1d;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

/* HUD Layout */
.hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
}

.hud button,
.hud .virtual-wheel,
.hud .hotbar-slot,
.hud .interact-prompt {
  pointer-events: auto;
}

.hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hud-top-left,
.hud-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.circle-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid #0f172a;
  background: var(--bg-glass);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.circle-btn:active {
  transform: scale(0.94);
}

.icon-menu {
  gap: 5px;
}

.icon-menu span {
  width: 22px;
  height: 3.5px;
  border-radius: 4px;
  background: #0f172a;
}

.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--bg-glass);
  border: 3px solid #0f172a;
  box-shadow: var(--shadow);
  font-weight: 900;
  font-size: 15px;
}

.online-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.online-heart {
  color: #0f172a;
  font-size: 14px;
}

.coins-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fef9c3;
  border: 3px solid #0f172a;
  box-shadow: var(--shadow);
  font-weight: 900;
  font-size: 16px;
}

.avatar-btn {
  background: #e0f2fe;
}

.avatar-square-face {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 2.5px solid #0f172a;
  background: #fde68a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 0.7;
  font-weight: 900;
}

.face-eyes {
  font-size: 14px;
  letter-spacing: 3px;
}

.face-mouth {
  font-size: 13px;
}

/* Cashier Banner */
.cashier-banner {
  align-self: center;
  margin-top: 8px;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(254, 249, 195, 0.95);
  border: 3px solid #0f172a;
  box-shadow: var(--shadow);
  min-width: 280px;
  text-align: center;
  pointer-events: auto;
}

.cashier-banner-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
}

.cashier-sub {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

/* Toasts */
.toast-container {
  position: fixed;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 60;
  pointer-events: none;
}

.toast {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  animation: toastIn 0.2s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bottom Section */
.hud-bottom {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 14px;
}

.hud-bottom-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.drive-hud {
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}

.drive-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-glass);
  border: 3px solid #0f172a;
  box-shadow: var(--shadow);
}

.drive-label {
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  padding: 0 4px;
}

.drive-btn {
  border: 2px solid #0f172a;
  background: #e2e8f0;
  border-radius: 999px;
  min-width: 36px;
  height: 32px;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
}

.drive-btn.active {
  background: #3b82f6;
  color: #fff;
}

.drive-btn.stop {
  background: #fecaca;
  color: #7f1d1d;
  font-size: 11px;
  padding: 0 8px;
}

.speed-readout {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  padding: 0 4px;
}

.fuel-gauge-card {
  padding: 6px 12px;
  border-radius: 14px;
  background: var(--bg-glass);
  border: 3px solid #0f172a;
  box-shadow: var(--shadow);
  min-width: 215px;
}

.fuel-gauge-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
}

.fuel-track {
  height: 10px;
  border-radius: 999px;
  background: #cbd5e1;
  border: 2px solid #0f172a;
  overflow: hidden;
}

.fuel-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f59e0b 40%, #22c55e);
  transition: width 0.15s linear;
}

.wheels-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.sprint-pill {
  padding: 9px 14px;
  border-radius: 999px;
  border: 3px solid #0f172a;
  background: var(--bg-glass);
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

.sprint-pill.active {
  background: #fde047;
}

.wheel-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.wheel-label {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.8);
  padding: 1px 8px;
  border-radius: 999px;
  border: 2px solid #0f172a;
}

.virtual-wheel {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  border: 3.5px solid #0f172a;
  box-shadow: var(--shadow);
  touch-action: none;
  cursor: grab;
}

.virtual-wheel:active {
  cursor: grabbing;
}

.wheel-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border: 3px solid #0f172a;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

/* Bottom Center */
.hud-bottom-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.interact-prompt {
  padding: 7px 16px;
  border-radius: 999px;
  border: 3px solid #0f172a;
  background: #fef08a;
  font-weight: 900;
  font-size: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.interact-prompt:hover {
  background: #fde047;
}

.status-bars {
  width: 100%;
  max-width: 320px;
  padding: 7px 12px;
  border-radius: 16px;
  background: var(--bg-glass);
  border: 3px solid #0f172a;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
}

.bar-track {
  flex: 1;
  height: 11px;
  border-radius: 999px;
  background: #e2e8f0;
  border: 2px solid #0f172a;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  transition: width 0.2s ease;
}

.bar-fill.health {
  background: #ef4444;
}

.bar-fill.hunger {
  background: #22c55e;
}

.bar-fill.thirst {
  background: #38bdf8;
}

.bar-pct {
  font-size: 11px;
  font-weight: 800;
  width: 36px;
  text-align: right;
}

.hotbar {
  display: flex;
  align-items: center;
  background: var(--bg-glass);
  border: 3px solid #0f172a;
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hotbar-slot {
  position: relative;
  width: 50px;
  height: 48px;
  border: none;
  border-right: 2px solid #0f172a;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  padding: 2px;
}

.hotbar-slot:last-child {
  border-right: none;
}

.hotbar-slot.selected {
  background: #bfdbfe;
}

.slot-qty {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 10px;
  font-weight: 900;
  color: #0f172a;
}

.slot-num {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 9px;
  font-weight: 800;
  color: #64748b;
}

.backpack-slot {
  background: #f1f5f9;
  width: 56px;
}

.bp-dots {
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.bp-label {
  font-size: 10px;
  font-weight: 800;
}

/* Bottom Right Stack: Map -> Jump -> Use/Do */
.hud-bottom-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.action-btn {
  border: 3.5px solid #0f172a;
  background: var(--bg-glass);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #0f172a;
}

.action-btn:active {
  transform: scale(0.93);
}

.map-btn {
  width: 78px;
  height: 54px;
  border-radius: 20px;
  background: #fef9c3;
  padding: 3px;
}

.map-btn-title {
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.map-btn-svg {
  width: 54px;
  height: 28px;
}

.jump-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #dbeafe;
}

.jump-arrow {
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
}

.use-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dcfce7;
}

.use-hand {
  font-size: 22px;
  line-height: 1;
}

.use-label {
  font-size: 10px;
  font-weight: 900;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  background: #ffffff;
  border: 3px solid #0f172a;
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-card.modal-wide {
  max-width: 660px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
}

.modal-header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #0f172a;
  background: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 2px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Avatar Modal */
.avatar-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.pill-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.pill-choices button {
  padding: 6px 12px;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: #f8fafc;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.pill-choices button.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #0f172a;
}

.color-inline {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-size: 12px !important;
  color: var(--muted);
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.color-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  font-weight: 700;
  font-size: 14px;
}

input[type="color"] {
  width: 36px;
  height: 28px;
  border: 2px solid #0f172a;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  background: none;
}

/* Shops */
.shop-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shop-info {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.shop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
}

.shop-item p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.job-card {
  background: #fefce8;
  border-color: #facc15;
}

.shop-divider {
  height: 2px;
  background: #e2e8f0;
}

/* Map Modal */
.map-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#world-map-canvas {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 16px;
  border: 3px solid #0f172a;
  background: #86efac;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  font-size: 12px;
  font-weight: 700;
}

.map-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #0f172a;
  margin-right: 4px;
}

.dot.you {
  background: #2563eb;
}
.dot.other {
  background: #ef4444;
}
.dot.car {
  background: #f59e0b;
}

/* Backpack */
.backpack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.bp-item-card {
  padding: 12px;
  border-radius: 14px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.bp-item-icon {
  font-size: 28px;
}

/* Settings */
.settings-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-section p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.controls-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
}

.settings-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.settings-actions {
  display: flex;
  gap: 10px;
}

.settings-actions button {
  flex: 1;
}

@media (max-width: 760px) {
  .virtual-wheel {
    width: 76px;
    height: 76px;
  }
  .wheel-dot {
    width: 28px;
    height: 28px;
  }
  .sprint-pill {
    padding: 7px 10px;
    font-size: 11px;
  }
  .hotbar-slot {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }
  .backpack-slot {
    width: 46px;
  }
  .status-bars {
    max-width: 240px;
  }
  .jump-btn {
    width: 62px;
    height: 62px;
  }
  .use-btn {
    width: 54px;
    height: 54px;
  }
  .map-btn {
    width: 64px;
    height: 44px;
  }
}

@media (max-width: 600px) {
  /* Portrait phones: stack hotbar/status above the wheels + action buttons so nothing overflows */
  .hud-bottom {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      'center center center'
      'left . right';
    row-gap: 8px;
  }
  .hud-bottom-center {
    grid-area: center;
  }
  .hud-bottom-left {
    grid-area: left;
  }
  .hud-bottom-right {
    grid-area: right;
  }
  .wheels-row {
    gap: 8px;
  }
  .fuel-gauge-card {
    min-width: 0;
    width: 100%;
    max-width: 220px;
  }
  .drive-bar {
    flex-wrap: wrap;
    padding: 4px 8px;
    gap: 4px;
  }
}

footer {
  position: fixed;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}

footer p {
  margin: 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
}
