/* ============================================
   DEFI PRO V4 — Reset + Global
   统一字体、基础颜色、数字与焦点样式
   保留原有页面滚动架构
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--bg);
  overflow: hidden;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-variant-numeric: tabular-nums;

  color: var(--text-fg);
  /* ★ 修复大黑额头：顶部渐变过渡，与 Hero 蓝色呼应 */
  background:
    radial-gradient(520px 320px at 50% -60px, var(--blue-glow), transparent 70%),
    var(--bg);
  background-attachment: fixed;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  overflow: hidden;
  height: 100%;
  position: fixed;
  width: 100%;
}

a {
  color: var(--brand);
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

/* 保留原有列表重置 */
ul, ol {
  list-style: none;
}

/* ── 键盘焦点：不改变正常点击外观 ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand-hover);
  outline-offset: 3px;
}

/* ── 滚动条 ── */
::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(163, 173, 194, 0.14);
  border-radius: var(--r-full);
}

/* ── 选择高亮 ── */
::selection {
  background: var(--gold-border);
  color: var(--text-fg);
}

/* ── 原有等宽字体类：保留 ── */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ── 新增：只统一数字宽度，不切换字体 ── */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* ── 文字截断 ── */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 隐藏：保留原有控制方式 ── */
.hidden {
  display: none !important;
}

/* ── 文字工具类 ── */
.text-muted { color: var(--text-muted); }
.text-dim   { color: var(--text-dim); }
.text-brand { color: var(--brand); }
.text-red   { color: var(--red); }
.text-amber { color: var(--amber); }
.text-gold  { color: var(--gold-text); }

.text-sm    { font-size: var(--fs-sm); }
.text-xs    { font-size: var(--fs-xs); }
/* ── 页面标题:Page-Title 24/700,取消全大写和宽字距 ── */
.page-title {
  font-size: 24px;
  line-height: 1.2;
  color: var(--text-1);
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
  font-style: normal !important;
}

/* ── 减少动态效果 ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}