/* ═══════════════════════════════════════════
   FragranceAI — Main Entry Point
   ═══════════════════════════════════════════
   CSS 已拆分为 4 个文件，通过 <link> 顺序加载:
   1. tokens.css  — 设计令牌（变量、主题）
   2. layout.css  — 布局、网格、响应式
   3. components.css — 全部组件样式
   4. main.css    — 全局 reset & 基础样式
   ═══════════════════════════════════════════ */

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

/* ── Body Base ── */
body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Scrollbar (Webkit) ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--gray-200);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ── Focus ring for keyboard nav ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Selection ── */
::selection {
  background: rgba(8, 145, 178, 0.2);
  color: var(--text-primary);
}

/* ── Image / Media max-width ── */
img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

/* ── Code blocks ── */
code,
pre {
  font-family: var(--font-mono);
}

/* ── Links ── */
a {
  color: inherit;
}

/* ── Buttons (native reset) ── */
button {
  font-family: inherit;
  cursor: pointer;
}

/* ── Input / Textarea inherit font ── */
input,
textarea,
select {
  font-family: inherit;
}

/* ── ECharts containers - leave untouched ── */
/* (ECharts sets its own dimensions and styles) */
