@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
}

body {
  font-family: var(--font-sans);
  background-color: #FBFBFA;
  color: #37352F;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
}

/* Custom Notion-style Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #E1DFDD;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #C8C6C4;
}

/* Custom Apple-Style Range Sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  width: 100%;
}

/* Track */
input[type="range"]::-webkit-slider-runnable-track {
  background: #EDECE9;
  height: 6px;
  border-radius: 9999px;
  transition: background 0.15s ease;
}

input[type="range"]:focus::-webkit-slider-runnable-track {
  background: #E1DFDD;
}

/* Thumb */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -5px; /* Centers the thumb on track */
  background-color: #FFFFFF;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  border: 0.5px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.02);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), 0 1px 1px rgba(0, 0, 0, 0.02);
}

/* Firefox Support */
input[type="range"]::-moz-range-track {
  background: #EDECE9;
  height: 6px;
  border-radius: 9999px;
}

input[type="range"]::-moz-range-thumb {
  background-color: #FFFFFF;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  border: 0.5px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.02);
  transition: transform 0.1s ease;
}

input[type="range"]:active::-moz-range-thumb {
  transform: scale(1.15);
}

/* Toggle Switch styling */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #E5E5EA;
  transition: .2s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

input:checked + .toggle-slider {
  background-color: #0071E3; /* Apple Blue */
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Radar Animations */
@keyframes radar-sweep {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.radar-sweep-line {
  animation: radar-sweep 4s linear infinite;
  transform-origin: 100px 100px;
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 4px currentColor);
  }
}

.animate-pulse-glow {
  animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Navigation active tab style transition */
.nav-tab {
  position: relative;
  transition: color 0.2s ease;
}

.nav-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #37352F;
  transition: width 0.2s ease, left 0.2s ease;
}

.nav-tab.active {
  color: #37352F;
  font-weight: 500;
}

.nav-tab.active::after {
  width: 100%;
  left: 0;
}
