/* --- CSS Variables --- */
:root {
  /* Backgrounds */
  --color-bg: #202124;
  --color-sidebar: #18191b;
  --color-card: #292b2e;
  --color-card-inner: #222427;
  --color-border: #3a3d40;
  --color-accent: #9481c8;
  --color-accent-light: #d4c8f3;

  /* Gradients */
  --gradient-accent: linear-gradient(90deg, #9481c8 0%, #d4c8f3 50%);

  --gradient-chart: linear-gradient(
    90deg,
    #6f5ba7 0%,
    #9481c8 50%,
    #d4c8f3 100%
  );

  /* Text colors */
  --color-text-primary: #f3f4f6;
  --color-text-secondary: #a1a1aa;
}

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

/* --- Global Document Behavior --- */
/* Preserve sidebar positioning when overlays are open */
html.settings-open,
html.help-open,
html.locations-open {
  scrollbar-width: none;
}

html.settings-open::-webkit-scrollbar,
html.help-open::-webkit-scrollbar,
html.locations-open::-webkit-scrollbar {
  display: none;
}

.settings-panel,
.help-panel,
.locations__overlay {
  overscroll-behavior-y: contain;
}

/* Firefox scrollbar styling */
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) transparent;
  }
}

/* Chromium and WebKit scrollbar styling */
@supports selector(::-webkit-scrollbar) {
  *::-webkit-scrollbar {
    width: 8px;
    height: 6px;
  }

  *::-webkit-scrollbar-track {
    background: var(--color-border);
    border-radius: 16px;
  }

  *::-webkit-scrollbar-thumb {
    background: var(--gradient-chart);
    border-radius: 16px;
    background-clip: content-box;
  }
}

/* --- Typography --- */
h2,
h3 {
  font-family: "Roboto", sans-serif;
  color: var(--color-text-primary);
}

h1 {
  font-weight: 500;
  font-size: 18px;
}

h2 {
  font-size: 26px;
  font-weight: 600;
}

h3 {
  font-size: 18px;
  font-weight: 500;
}

/* --- Body --- */
body {
  font-family: "Inter", sans-serif;
  background-color: var(--color-bg);
}
