/* ==========================================================================
   base.css — 重置与排版（design.md §5.4）
   ========================================================================== */

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

html, body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .25s cubic-bezier(.22, 1, .36, 1),
              opacity .25s cubic-bezier(.22, 1, .36, 1);
}
a:hover { color: var(--accent-cyan); }

img, svg, video {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color .25s cubic-bezier(.22, 1, .36, 1),
              background-color .25s cubic-bezier(.22, 1, .36, 1),
              opacity .25s cubic-bezier(.22, 1, .36, 1),
              transform .25s cubic-bezier(.22, 1, .36, 1);
}

/* 全局细微扫描线噪点质感（纯 CSS、低对比，压在内容之上、转场层之下） */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(230, 236, 247, .018) 0,
    rgba(230, 236, 247, .018) 1px,
    transparent 1px,
    transparent 3px
  );
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* 细滚动条，贴合蓝黑基调 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: #1d2a44;
  border-radius: 5px;
  border: 2px solid var(--bg-0);
}
::-webkit-scrollbar-thumb:hover { background: #2a3c60; }

/* 路由兜底占位（页面模块尚未注册时显示） */
.route-pending,
.route-error {
  padding: 4rem 3rem;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: .1em;
}
