/* ═══════════════════════════════════════════════════
   铁口直断 V62 商用版 — Base Styles
   重置 + 排版 + 工具类
   ═══════════════════════════════════════════════════ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--ink-800);
  background: var(--bg-page);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── 标题层级 ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--ink-900);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-base); }

/* ── 链接 ── */
a {
  color: var(--primary-700);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--primary-600); }

/* ── 图片 ── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── 列表 ── */
ul, ol { list-style: none; }

/* ── 表单 ── */
input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
}

/* ── 滚动条 ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-card-alt);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--ink-300);
  border-radius: var(--radius-full);
}

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

/* ── 选中 ── */
::selection {
  background: var(--primary-200);
  color: var(--ink-900);
}

/* ── 工具类 ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-gold  { color: var(--primary-700); }
.text-green { color: var(--success); }
.text-red   { color: var(--danger); }
.text-muted { color: var(--ink-500); }

.text-xs  { font-size: var(--text-xs); }
.text-sm  { font-size: var(--text-sm); }
.text-md  { font-size: var(--text-md); }
.text-lg  { font-size: var(--text-lg); }

.font-serif { font-family: var(--font-serif); }
.font-mono  { font-family: var(--font-mono); }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.no-select {
  user-select: none;
  -webkit-user-select: none;
}

/* ── 加载动画 ── */
@keyframes shimmer {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--ink-100) 25%, var(--ink-50) 50%, var(--ink-100) 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-light);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
