/* Dhaka Streets: Open World — Master Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Hind+Siliguri:wght@500;600;700&display=swap');

:root {
  --bg-dark: rgba(10, 14, 23, 0.88);
  --bg-panel: rgba(17, 24, 39, 0.85);
  --accent-emerald: #10b981;
  --accent-gold: #f59e0b;
  --accent-crimson: #ef4444;
  --accent-cyan: #06b6d4;
  --text-light: #f8fafc;
  --text-muted: #94a3b8;
  --border-glass: rgba(255, 255, 255, 0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #070b12;
  font-family: 'Inter', 'Hind Siliguri', sans-serif;
  color: var(--text-light);
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

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

.bengali-text {
  font-family: 'Hind Siliguri', 'Inter', sans-serif;
}

/* Glassmorphism Panel Utility */
.glass-panel {
  background: rgba(13, 19, 33, 0.92);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  contain: layout style;
}

/* HUD Layer */
#hud-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

#hud-layer.hidden {
  display: none !important;
}

.interactive-ui {
  pointer-events: auto;
}

/* Top Bar */
.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

/* Top Left: Minimap + Location + Mission */
.hud-top-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 520px;
}

.minimap-wrapper {
  position: relative;
  width: 176px;
  height: 176px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(16, 185, 129, 0.8);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.65);
  background: #0b1520;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.minimap-wrapper:hover {
  transform: scale(1.02);
  border-color: #10b981;
}

#minimap-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.minimap-badge {
  position: absolute;
  bottom: 6px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(9, 13, 22, 0.85);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.district-banner {
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.district-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #059669, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

/* Mission Box */
.mission-card {
  padding: 12px 14px;
  border-left: 4px solid var(--accent-gold);
  transition: all 0.25s ease;
}

/* Top Right: Wanted Stars, Money, Health, Quick Controls */
.hud-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.wanted-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 8px 14px;
  gap: 4px;
}

.wanted-stars {
  display: flex;
  gap: 6px;
  font-size: 22px;
}

.star-icon {
  color: rgba(255, 255, 255, 0.2);
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  transition: transform 0.2s ease, color 0.2s ease;
}

.star-icon.active {
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.9);
  animation: pulseStar 0.9s infinite alternate;
}

.star-icon.police-flash {
  animation: policeFlash 0.45s infinite alternate;
}

@keyframes pulseStar {
  0% { transform: scale(1); }
  100% { transform: scale(1.16); }
}

@keyframes policeFlash {
  0% { color: #ef4444; text-shadow: 0 0 14px #ef4444; }
  100% { color: #3b82f6; text-shadow: 0 0 14px #3b82f6; }
}

/* Bottom HUD */
.hud-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  gap: 12px;
}

/* Interaction Prompt Center */
.interaction-prompt {
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid #10b981;
  border-radius: 999px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  z-index: 20;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.key-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  background: linear-gradient(180deg, #34d399, #059669);
  color: #042f2e;
  font-weight: 800;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.5);
}

/* Speedometer & Vehicle Panel */
.speedometer-panel {
  padding: 10px 14px;
  min-width: 195px;
  max-width: 225px;
  margin-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 4px solid #ec4899;
}

.speed-readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.speed-value {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #ffffff, #6ee7b7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Modal & Menu Overlays */
.modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.78) 0%, rgba(4, 7, 15, 0.94) 100%);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.menu-btn {
  width: 100%;
  padding: 13px 20px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(30, 41, 59, 0.85);
  color: #f8fafc;
}

.menu-btn:hover {
  transform: translateY(-2px);
  background: rgba(51, 65, 85, 0.95);
  border-color: #10b981;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
}

.menu-btn-primary {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #022c22;
  border-color: #34d399;
}

.menu-btn-primary:hover {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  color: #022c22;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
}

/* Toast Notification Banner */
#toast-banner {
  position: absolute;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Touch / On-screen controls */
.touch-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.touch-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, transform 0.1s;
}

.touch-btn:active {
  background: #10b981;
  color: #022c22;
  transform: scale(0.94);
}

@media (max-width: 768px) {
  .minimap-wrapper {
    width: 135px;
    height: 135px;
  }
  .speedometer-panel {
    min-width: 175px;
    padding: 10px 12px;
  }
  .speed-value {
    font-size: 26px;
  }
}
