:root {
  /* Light theme (default) - Figma colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --text-primary: #212529;
  --text-secondary: #495057;
  --border-color: #dee2e6;
  
  /* Figma Design Colors */
  --figma-primary-blue: #13548a;
  --figma-accent-blue: #2a92d5;
  --figma-accent-orange: #ff6b35;
  --figma-header-nav: #f4f5f5;
  --figma-menu-cyan-start: #00bcd4;
  --figma-menu-cyan-end: #26c6da;
  --figma-menu-overlay: rgba(255, 255, 255, 0.6);
  --figma-menu-text: #ffffff;
  
  /* Updated accent colors to match Figma */
  --accent-color: #13548a;
  --accent-hover: #2a92d5;
  --shadow: rgba(0, 0, 0, 0.1);
  --legend-bg: rgba(255, 255, 255, 0.9);
  --panel-bg: rgba(255, 255, 255, 0.95);
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
}

[data-theme="dark"] {
  --bg-primary: #212529;
  --bg-secondary: #343a40;
  --bg-tertiary: #495057;
  --text-primary: #f8f9fa;
  --text-secondary: #e9ecef;
  --border-color: #495057;
  --accent-color: #0d6efd;
  --accent-hover: #0a58ca;
  --shadow: rgba(0, 0, 0, 0.3);
  --legend-bg: rgba(33, 37, 41, 0.9);
  --panel-bg: rgba(33, 37, 41, 0.95);
  --success-color: #20c997;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
}

/* Theme switcher styles - hidden for Figma design */
.theme-switcher {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  align-items: center;
  background-color: var(--bg-secondary);
  border-radius: 30px;
  padding: 5px 15px;
  box-shadow: 0 2px 10px var(--shadow);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.theme-switcher label {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  margin: 0 10px;
}

.theme-switcher input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-tertiary);
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--bg-primary);
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-color);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.theme-icon {
  color: var(--text-primary);
  font-size: 16px;
}

/* Transition effects for theme change */
body, .options_panel, .options_menu, .legend, .over_map_container, button, input, select {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}