/* ============================================
   Base Styles
   ============================================ */
html, body {
  touch-action: manipulation;
  background-color: var(--bg-primary);
  overscroll-behavior-y: none;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-ui);
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  padding-bottom: 40px;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* ---- Selection ---- */
::selection {
  background: rgba(240, 185, 11, 0.3);
  color: var(--text-primary);
}

/* ---- Focus Ring ---- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---- Scrollbar (Dark Theme) ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-hover) transparent;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
