/* =========================================================
   LEONIDA ATLAS — GTA 6 Interactive Map Stylesheet
   ========================================================= */

:root {
  --bg-dark: #090c14;
  --panel-bg: rgba(12, 16, 28, 0.92);
  --panel-solid: #0f1423;
  --panel-elevated: rgba(22, 28, 46, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text-primary: #f4f7ff;
  --text-secondary: #9aa7c2;
  --text-muted: #667391;

  --vice-pink: #ff2e93;
  --vice-orange: #ff8a3d;
  --vice-cyan: #00e5ff;
  --vice-gold: #ffd166;
  --vice-green: #38ef7d;
  --vice-danger: #ff5252;

  --sidebar-width: 340px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);

  --inv-scale: 1;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea {
  font-family: inherit;
  color: inherit;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ================= APP SHELL ================= */
.app-shell {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ================= LEFT SIDEBAR ================= */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  background: var(--panel-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 30;
  transition: margin-left 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
}

.sidebar.collapsed {
  margin-left: calc(var(--sidebar-width) * -1);
  opacity: 0;
  pointer-events: none;
}

.sidebar-header {
  padding: 16px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(135deg, rgba(255, 46, 147, 0.12), rgba(0, 229, 255, 0.06));
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--vice-pink), var(--vice-orange));
  display: grid;
  place-items: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 1px;
  color: #fff;
  box-shadow: 0 4px 18px rgba(255, 46, 147, 0.45);
  flex-shrink: 0;
}

.brand-text h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: 1.5px;
  line-height: 1;
}

.brand-text h1 .accent {
  background: linear-gradient(90deg, var(--vice-pink), var(--vice-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text .subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.16s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Progress Card */
.progress-card {
  margin: 12px 14px 8px;
  padding: 12px;
  background: var(--panel-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.progress-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.1px;
  color: var(--vice-cyan);
}

.progress-stats {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-primary);
  font-weight: 600;
}

.progress-bar-track {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--vice-pink), var(--vice-orange), var(--vice-cyan));
  border-radius: 99px;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px rgba(255, 46, 147, 0.5);
}

.progress-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch input {
  display: none;
}

.toggle-slider {
  width: 30px;
  height: 17px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  position: relative;
  transition: background 0.2s;
}

.toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--vice-pink);
}

.toggle-switch input:checked + .toggle-slider::after {
  transform: translateX(13px);
}

.toggle-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.progress-btns {
  display: flex;
  gap: 5px;
}

.mini-btn {
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.mini-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.mini-btn.danger:hover {
  background: rgba(255, 82, 82, 0.2);
  color: #ff8a8a;
  border-color: rgba(255, 82, 82, 0.4);
}

/* Search & Presets */
.search-section {
  padding: 6px 14px 10px;
  position: relative;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 11px;
  color: var(--text-muted);
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: 9px 30px 9px 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}

#search-input:focus {
  border-color: var(--vice-cyan);
  background: rgba(0, 229, 255, 0.06);
}

#search-input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 17px;
  cursor: pointer;
  line-height: 1;
}

.search-results {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 46px;
  max-height: 280px;
  overflow-y: auto;
  background: #12182a;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 60;
}

.search-result-item {
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.14s;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(255, 46, 147, 0.14);
}

.search-result-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.search-result-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.search-result-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

.search-empty {
  padding: 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.chip {
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.16s ease;
}

.chip:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.chip.active {
  background: linear-gradient(135deg, rgba(255, 46, 147, 0.25), rgba(0, 229, 255, 0.2));
  border-color: var(--vice-pink);
  color: #fff;
  font-weight: 600;
}

/* Filter Toolbar */
.filter-toolbar {
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.section-heading {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}

.filter-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--vice-cyan);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

.dot-sep {
  color: var(--text-muted);
  font-size: 11px;
}

/* Category List */
.category-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 12px;
}

.category-list::-webkit-scrollbar {
  width: 6px;
}

.category-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
}

.cat-group {
  margin-bottom: 12px;
}

.cat-group-header {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 4px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

.cat-group-header:hover {
  color: var(--text-primary);
}

.cat-group-chevron {
  transition: transform 0.2s;
  font-size: 11px;
}

.cat-group.collapsed .cat-group-chevron {
  transform: rotate(-90deg);
}

.cat-group.collapsed .cat-group-items {
  display: none;
}

.cat-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  margin-top: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
}

.cat-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-subtle);
}

.cat-item.inactive {
  opacity: 0.42;
  background: transparent;
}

.cat-item-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.cat-icon-badge {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #0b0e17;
}

.cat-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-item-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 99px;
  flex-shrink: 0;
}

.cat-item-count.complete {
  color: var(--vice-green);
  background: rgba(56, 239, 125, 0.14);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.25);
}

.primary-action-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--vice-pink), #d81b76);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(255, 46, 147, 0.35);
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.primary-action-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(255, 46, 147, 0.5);
}

.primary-action-btn.active {
  background: linear-gradient(135deg, var(--vice-cyan), #0099cc);
  color: #08121c;
  box-shadow: 0 4px 18px rgba(0, 229, 255, 0.45);
}

.shortcuts-hint {
  margin-top: 8px;
  text-align: center;
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ================= MAP VIEWPORT ================= */
.map-viewport-wrap {
  flex: 1;
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: #081220;
}

.floating-expand-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 25;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
}

/* Top Region Quick-Jump Bar */
.region-bar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border-radius: 99px;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  max-width: calc(100% - 32px);
  overflow-x: auto;
}

.region-bar::-webkit-scrollbar {
  display: none;
}

.region-pill {
  padding: 6px 13px;
  border-radius: 99px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.16s ease;
}

.region-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.region-pill.active {
  background: linear-gradient(135deg, var(--vice-pink), var(--vice-orange));
  color: #fff;
  box-shadow: 0 2px 12px rgba(255, 46, 147, 0.45);
}

/* Pin Mode Banner */
.pin-mode-banner {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  padding: 8px 16px;
  border-radius: 99px;
  background: rgba(0, 229, 255, 0.16);
  border: 1px solid var(--vice-cyan);
  backdrop-filter: blur(12px);
  color: #e0fbff;
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.pin-mode-banner kbd {
  background: rgba(255, 255, 255, 0.16);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--vice-cyan);
  box-shadow: 0 0 10px var(--vice-cyan);
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.55; }
}

/* ================= MAP STAGE & WORLD ================= */
.map-stage {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
  outline: none;
}

.map-stage.dragging {
  cursor: grabbing;
}

.map-stage.pin-mode {
  cursor: crosshair;
}

.map-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 2400px;
  height: 2000px;
  transform-origin: 0 0;
  will-change: transform;
}

.map-world.animating {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.map-svg-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.leonida-svg {
  display: block;
}

.map-stage.labels-hidden .map-labels-layer {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.map-labels-layer {
  transition: opacity 0.2s ease;
}

/* ================= SVG MAP THEMES ================= */

/* 1. ATLAS THEME (Default — GTA Classic Crisp Slate & Stone) */
.theme-atlas .ocean-stop-inner { stop-color: #16304b; }
.theme-atlas .ocean-stop-outer { stop-color: #0b192b; }
.theme-atlas .map-grid-line { stroke: rgba(140, 195, 255, 0.08); }
.theme-atlas .map-bathymetry { fill: rgba(34, 82, 128, 0.22); stroke: rgba(100, 175, 240, 0.14); stroke-width: 1.5; }
.theme-atlas .map-bathymetry-inner { fill: rgba(44, 108, 160, 0.2); stroke: rgba(100, 195, 255, 0.18); stroke-width: 1.5; }
.theme-atlas .map-shallows { fill: rgba(38, 175, 200, 0.26); }
.theme-atlas .map-land { fill: #263142; stroke: #4b617d; stroke-width: 2.5; }
.theme-atlas .map-beach { fill: #c4b082; opacity: 0.55; }
.theme-atlas .map-forest { fill: #1f3936; opacity: 0.9; }
.theme-atlas .map-elevation-1 { fill: #264540; stroke: rgba(120, 210, 180, 0.18); stroke-width: 1.5; }
.theme-atlas .map-elevation-2 { fill: #2f524a; stroke: rgba(150, 225, 195, 0.22); stroke-width: 1.5; }
.theme-atlas .map-elevation-3 { fill: #3c6359; stroke: rgba(185, 240, 215, 0.28); stroke-width: 1.5; }
.theme-atlas .map-farm-patch { fill: rgba(162, 185, 118, 0.14); }
.theme-atlas .map-farm-row { stroke: rgba(162, 185, 118, 0.18); }
.theme-atlas .map-wetland { fill: #1c353a; opacity: 0.92; }
.theme-atlas .map-swamp-dot { fill: rgba(74, 200, 175, 0.28); }
.theme-atlas .map-swamp-reed { stroke: rgba(74, 200, 175, 0.3); }
.theme-atlas .map-urban { fill: #313d52; }
.theme-atlas .map-city-block { fill: rgba(255, 255, 255, 0.08); stroke: rgba(10, 14, 24, 0.35); stroke-width: 1; }
.theme-atlas .map-inland-water { fill: #153654; stroke: #3d6b94; stroke-width: 2; }
.theme-atlas .map-river { fill: none; stroke: #1a4569; stroke-width: 10; stroke-linecap: round; }
.theme-atlas .map-river-thin { fill: none; stroke: #1a4569; stroke-width: 5.5; stroke-linecap: round; }
.theme-atlas .map-airport rect { fill: #1c2433; stroke: #607596; stroke-width: 1.5; }
.theme-atlas .runway-dash { stroke: rgba(255, 255, 255, 0.65); stroke-width: 1.5; stroke-dasharray: 8 6; }
.theme-atlas .map-raceway { fill: none; stroke: #5a6b87; stroke-width: 11; }
.theme-atlas .map-raceway-inner { fill: #253445; stroke: rgba(255, 255, 255, 0.22); stroke-width: 1.5; }
.theme-atlas .map-piers rect { fill: #3f4f69; stroke: #647b9e; stroke-width: 1; }
.theme-atlas .map-road-secondary { fill: none; stroke: rgba(180, 198, 224, 0.35); stroke-width: 3.5; stroke-linecap: round; }
.theme-atlas .map-highway-casing { fill: none; stroke: #0d1421; stroke-width: 9.5; stroke-linecap: round; stroke-linejoin: round; }
.theme-atlas .map-highway-core { fill: none; stroke: #f2b45a; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.theme-atlas .compass-rose { color: #8da6c7; }

/* 2. SATELLITE THEME (Lush Aerial Florida/Leonida) */
.theme-satellite .ocean-stop-inner { stop-color: #0e4a7b; }
.theme-satellite .ocean-stop-outer { stop-color: #06213d; }
.theme-satellite .map-grid-line { stroke: rgba(255, 255, 255, 0.05); }
.theme-satellite .map-bathymetry { fill: rgba(18, 112, 168, 0.28); stroke: rgba(90, 210, 245, 0.16); stroke-width: 1.5; }
.theme-satellite .map-bathymetry-inner { fill: rgba(26, 148, 194, 0.28); stroke: rgba(110, 235, 255, 0.22); stroke-width: 1.5; }
.theme-satellite .map-shallows { fill: rgba(45, 222, 216, 0.42); }
.theme-satellite .map-land { fill: #4a6b48; stroke: #d8c696; stroke-width: 3.5; }
.theme-satellite .map-beach { fill: #f1dfae; opacity: 0.92; }
.theme-satellite .map-forest { fill: #2b4d32; opacity: 0.95; }
.theme-satellite .map-elevation-1 { fill: #355c39; stroke: rgba(255, 255, 255, 0.12); stroke-width: 1.2; }
.theme-satellite .map-elevation-2 { fill: #496e47; stroke: rgba(255, 255, 255, 0.15); stroke-width: 1.2; }
.theme-satellite .map-elevation-3 { fill: #6c7a5c; stroke: rgba(255, 255, 255, 0.22); stroke-width: 1.2; }
.theme-satellite .map-farm-patch { fill: rgba(154, 178, 86, 0.35); }
.theme-satellite .map-farm-row { stroke: rgba(110, 134, 60, 0.4); }
.theme-satellite .map-wetland { fill: #2f5449; opacity: 0.94; }
.theme-satellite .map-swamp-dot { fill: rgba(34, 128, 128, 0.45); }
.theme-satellite .map-swamp-reed { stroke: rgba(118, 186, 132, 0.35); }
.theme-satellite .map-urban { fill: #696f78; }
.theme-satellite .map-city-block { fill: rgba(235, 238, 245, 0.22); stroke: rgba(42, 46, 54, 0.45); stroke-width: 1; }
.theme-satellite .map-inland-water { fill: #125c8a; stroke: #7db49a; stroke-width: 2; }
.theme-satellite .map-river { fill: none; stroke: #186a99; stroke-width: 10; stroke-linecap: round; }
.theme-satellite .map-river-thin { fill: none; stroke: #186a99; stroke-width: 5.5; stroke-linecap: round; }
.theme-satellite .map-airport rect { fill: #484e57; stroke: #b8c2cf; stroke-width: 1.5; }
.theme-satellite .runway-dash { stroke: #ffffff; stroke-width: 1.5; stroke-dasharray: 8 6; }
.theme-satellite .map-raceway { fill: none; stroke: #4c525c; stroke-width: 11; }
.theme-satellite .map-raceway-inner { fill: #4a7846; stroke: rgba(255, 255, 255, 0.35); stroke-width: 1.5; }
.theme-satellite .map-piers rect { fill: #8c9199; stroke: #c9cfd8; stroke-width: 1; }
.theme-satellite .map-road-secondary { fill: none; stroke: rgba(238, 232, 210, 0.55); stroke-width: 3.5; stroke-linecap: round; }
.theme-satellite .map-highway-casing { fill: none; stroke: #2b2f36; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.theme-satellite .map-highway-core { fill: none; stroke: #e6e1d3; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.theme-satellite .compass-rose { color: #c4e4f7; }

/* 3. VICE NIGHT THEME (Neon Synthwave Tactical) */
.theme-vice-night .ocean-stop-inner { stop-color: #130b29; }
.theme-vice-night .ocean-stop-outer { stop-color: #06040f; }
.theme-vice-night .map-grid-line { stroke: rgba(255, 46, 147, 0.11); }
.theme-vice-night .map-bathymetry { fill: rgba(45, 16, 86, 0.25); stroke: rgba(0, 229, 255, 0.16); stroke-width: 1.5; }
.theme-vice-night .map-bathymetry-inner { fill: rgba(65, 20, 110, 0.22); stroke: rgba(255, 46, 147, 0.22); stroke-width: 1.5; }
.theme-vice-night .map-shallows { fill: rgba(0, 229, 255, 0.22); }
.theme-vice-night .map-land { fill: #151226; stroke: #00e5ff; stroke-width: 2.2; }
.theme-vice-night .map-beach { fill: #ff2e93; opacity: 0.45; }
.theme-vice-night .map-forest { fill: #141b2e; opacity: 0.9; }
.theme-vice-night .map-elevation-1 { fill: #1b223d; stroke: rgba(0, 229, 255, 0.22); stroke-width: 1.3; }
.theme-vice-night .map-elevation-2 { fill: #23284d; stroke: rgba(179, 136, 255, 0.28); stroke-width: 1.3; }
.theme-vice-night .map-elevation-3 { fill: #2f2c5c; stroke: rgba(255, 46, 147, 0.36); stroke-width: 1.3; }
.theme-vice-night .map-farm-patch { fill: rgba(179, 136, 255, 0.12); }
.theme-vice-night .map-farm-row { stroke: rgba(0, 229, 255, 0.16); }
.theme-vice-night .map-wetland { fill: #10202e; opacity: 0.92; }
.theme-vice-night .map-swamp-dot { fill: rgba(0, 229, 255, 0.35); }
.theme-vice-night .map-swamp-reed { stroke: rgba(56, 239, 125, 0.28); }
.theme-vice-night .map-urban { fill: #211738; }
.theme-vice-night .map-city-block { fill: rgba(255, 46, 147, 0.14); stroke: rgba(0, 229, 255, 0.2); stroke-width: 0.8; }
.theme-vice-night .map-inland-water { fill: #0e0a24; stroke: #00e5ff; stroke-width: 1.8; }
.theme-vice-night .map-river { fill: none; stroke: #10324d; stroke-width: 10; stroke-linecap: round; }
.theme-vice-night .map-river-thin { fill: none; stroke: #10324d; stroke-width: 5.5; stroke-linecap: round; }
.theme-vice-night .map-airport rect { fill: #191330; stroke: #ff2e93; stroke-width: 1.5; }
.theme-vice-night .runway-dash { stroke: #00e5ff; stroke-width: 1.5; stroke-dasharray: 8 6; }
.theme-vice-night .map-raceway { fill: none; stroke: #ff2e93; stroke-width: 9; opacity: 0.7; }
.theme-vice-night .map-raceway-inner { fill: #18102b; stroke: #00e5ff; stroke-width: 1.4; }
.theme-vice-night .map-piers rect { fill: #271c45; stroke: #00e5ff; stroke-width: 1; }
.theme-vice-night .map-road-secondary { fill: none; stroke: rgba(0, 229, 255, 0.32); stroke-width: 3; stroke-linecap: round; }
.theme-vice-night .map-highway-casing { fill: none; stroke: rgba(255, 46, 147, 0.35); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.theme-vice-night .map-highway-core { fill: none; stroke: #ff2e93; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.theme-vice-night .compass-rose { color: #00e5ff; }

/* SVG Typography */
.region-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 46px;
  letter-spacing: 5px;
  fill: rgba(255, 255, 255, 0.92);
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(8, 12, 22, 0.85);
  stroke-width: 6px;
  stroke-linejoin: round;
}

.region-label-vice {
  fill: #ff85c0;
}

.region-sublabel {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3.5px;
  fill: rgba(220, 232, 255, 0.75);
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(8, 12, 22, 0.8);
  stroke-width: 3.5px;
}

.district-label {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.8px;
  fill: rgba(255, 255, 255, 0.85);
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(8, 12, 22, 0.88);
  stroke-width: 3.5px;
}

.district-label-xs {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.3px;
  fill: rgba(224, 234, 255, 0.78);
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(8, 12, 22, 0.88);
  stroke-width: 3px;
}

.water-label {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 7px;
  fill: rgba(150, 210, 255, 0.34);
  text-anchor: middle;
}

.water-label-sm {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 2.5px;
  fill: rgba(165, 225, 255, 0.62);
  text-anchor: middle;
}

.highway-shield rect {
  fill: #131b2c;
  stroke: #ffd166;
  stroke-width: 1.6;
}

.highway-shield text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  fill: #ffd166;
  text-anchor: middle;
}

/* ================= MARKERS LAYER ================= */
.markers-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-marker {
  position: absolute;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  margin-top: -16px;
  border-radius: 50%;
  border: 2px solid rgba(10, 14, 24, 0.9);
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  transform: scale(var(--inv-scale));
  transition: filter 0.15s ease, opacity 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
  color: #0b0e17;
  z-index: 2;
}

.map-marker:hover {
  z-index: 25;
  filter: brightness(1.15);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.28), 0 8px 20px rgba(0, 0, 0, 0.7);
}

.map-marker.legendary {
  border: 2px solid #fff6d6;
  box-shadow: 0 0 14px rgba(255, 209, 102, 0.65), 0 4px 14px rgba(0, 0, 0, 0.6);
}

.map-marker.selected {
  z-index: 30;
  box-shadow: 0 0 0 4px #fff, 0 0 22px var(--vice-pink);
}

.map-marker.selected::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid #fff;
  animation: marker-ring 1.4s ease-out infinite;
  pointer-events: none;
}

@keyframes marker-ring {
  0% { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(1.65); opacity: 0; }
}

.map-marker.found {
  opacity: 0.42;
  filter: saturate(0.45);
}

.map-marker.found::before {
  content: "✓";
  position: absolute;
  top: -5px;
  right: -5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--vice-green);
  color: #06140c;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 1.5px solid #090c14;
}

/* Marker Hover Tooltip */
.marker-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(10, 14, 24, 0.95);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.14s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

.map-marker:hover .marker-tooltip {
  opacity: 1;
}

/* ================= HUD CONTROLS ================= */
.hud-bottom-left {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.map-style-switcher {
  display: inline-flex;
  padding: 4px;
  border-radius: 10px;
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
}

.style-btn {
  padding: 6px 12px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.style-btn:hover {
  color: var(--text-primary);
}

.style-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.coord-hud {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.hud-region {
  color: var(--vice-cyan);
  font-weight: 700;
  letter-spacing: 0.8px;
}

.hud-coords, .hud-zoom {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
}

.hud-sep {
  opacity: 0.35;
}

.hud-bottom-right {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hud-ctrl-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  color: var(--text-primary);
  font-size: 19px;
  font-weight: 600;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.16s ease;
}

.hud-ctrl-btn:hover {
  border-color: var(--vice-cyan);
  background: rgba(24, 32, 54, 0.96);
}

.hud-ctrl-btn.active {
  color: var(--vice-cyan);
  border-color: rgba(0, 229, 255, 0.45);
}

/* ================= DETAIL INSPECTOR PANEL ================= */
.detail-panel {
  position: absolute;
  top: 70px;
  right: 16px;
  width: 345px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  background: var(--panel-bg);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  z-index: 28;
  animation: slideInRight 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

.detail-accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--vice-pink);
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.detail-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.rarity-badge.LEGENDARY {
  background: rgba(255, 209, 102, 0.2);
  color: var(--vice-gold);
  border: 1px solid rgba(255, 209, 102, 0.45);
}

.rarity-badge.HIGH-VALUE {
  background: rgba(56, 239, 125, 0.18);
  color: var(--vice-green);
  border: 1px solid rgba(56, 239, 125, 0.4);
}

.rarity-badge.RARE {
  background: rgba(0, 229, 255, 0.18);
  color: var(--vice-cyan);
  border: 1px solid rgba(0, 229, 255, 0.4);
}

.rarity-badge.ROBBERY {
  background: rgba(255, 92, 92, 0.2);
  color: #ff8080;
  border: 1px solid rgba(255, 92, 92, 0.45);
}

.detail-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 5px;
}

.detail-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.detail-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: #d6dff2;
  margin-bottom: 14px;
}

/* Stat Bars */
.detail-stats {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  margin-bottom: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-row-top {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
}

.stat-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-bar-bg {
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 99px;
}

/* Tip Box */
.detail-tip-box {
  background: rgba(0, 229, 255, 0.08);
  border-left: 3px solid var(--vice-cyan);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 15px;
}

.tip-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--vice-cyan);
  margin-bottom: 4px;
}

.detail-tip-box p {
  font-size: 12.5px;
  line-height: 1.48;
  color: #d7f5fa;
}

.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.found-toggle-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.found-toggle-btn:hover {
  background: rgba(56, 239, 125, 0.18);
  border-color: var(--vice-green);
}

.found-toggle-btn.is-found {
  background: rgba(56, 239, 125, 0.22);
  border-color: var(--vice-green);
  color: var(--vice-green);
}

.secondary-btn {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s;
}

.secondary-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.12);
}

.secondary-btn.danger {
  color: #ff8080;
  border-color: rgba(255, 82, 82, 0.35);
}

.secondary-btn.danger:hover {
  background: rgba(255, 82, 82, 0.2);
}

/* ================= MODAL ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.72);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 80;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: 390px;
  max-width: calc(100vw - 32px);
  background: #121829;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 13px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--vice-cyan);
}

.color-picker-row {
  display: flex;
  gap: 10px;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.color-swatch.active {
  border-color: #fff;
  transform: scale(1.15);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.modal-actions .primary-action-btn {
  width: auto;
  padding: 9px 18px;
}

/* ================= TOAST ================= */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 99px;
  background: #141c30;
  border: 1px solid var(--vice-cyan);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 90;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 820px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 310px;
    min-width: 310px;
  }

  .region-bar {
    top: 12px;
    max-width: calc(100% - 110px);
    left: auto;
    right: 12px;
    transform: none;
  }

  .detail-panel {
    top: auto;
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-height: 55vh;
  }
}
