/* ============================================================================
   盾查 · CS2 库存助手 — styles.css
   纯手写 CSS，无框架、无外部字体/图标。目录：
   01 设计变量 / Reset        02 基础工具类
   03 按钮与徽标              04 顶部导航
   05 Hero 与查询表单         06 Hero 预览插画
   07 区块标题与功能卡片      08 查询结果：玩家 / 统计
   09 结果工具栏与物品网格    10 骨架屏 / 空状态 / 错误态
   11 查询历史                12 使用说明与隐私
   13 页脚                    14 弹窗与 Toast
   15 动画                    16 响应式
   17 减少动态效果
   ========================================================================== */

/* ============================ 01 设计变量 / Reset ============================ */
:root {
  --bg: #070b12;
  --bg-soft: #0b1220;
  --panel: #11151c;
  --panel-2: #0d121a;
  --panel-3: #0a0f17;
  --line: #1f2937;
  --line-strong: #2b3a4d;
  --text: #e9eef6;
  --text-2: #a5b0c0;
  --text-3: #717d8f;
  --orange: #ff8a00;
  --orange-strong: #ffa726;
  --orange-soft: #ffd27a;
  --amber: #fbbf24;
  --green: #34d399;
  --red: #f87171;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, "Cascadia Code", Consolas,
    "Liberation Mono", "Courier New", monospace;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1200px;
  --header-h: 68px;
}

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

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 全局背景：渐变光晕 + 细网格（固定层，不影响布局） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 50% -14%, rgba(255, 138, 0, 0.13), transparent 62%),
    radial-gradient(880px 520px at 92% 6%, rgba(251, 191, 36, 0.07), transparent 58%),
    linear-gradient(180deg, #070b12 0%, #0b1220 52%, #070b12 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 82% 58% at 50% 0%, #000 18%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse 82% 58% at 50% 0%, #000 18%, transparent 74%);
}

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

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(255, 138, 0, 0.32);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: #202b3b;
  border: 2px solid #070b12;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2b3a4d;
}
::-webkit-scrollbar-track {
  background: #070b12;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ============================ 02 基础工具类 ============================ */
.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: fixed;
  top: -64px;
  left: 16px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffb347, #ff8a00);
  color: #1a1002;
  font-size: 13px;
  font-weight: 700;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
}

.section {
  position: relative;
  padding: 72px 0;
}

/* 统一焦点样式：键盘可见、鼠标不干扰 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #ffb95c;
  outline-offset: 2px;
}

/* ============================ 03 按钮与徽标 ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  transition: transform 0.18s ease, background-color 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 13px;
  gap: 6px;
}
.btn-sm .icon {
  width: 14px;
  height: 14px;
}
.btn-block {
  width: 100%;
}

.btn-primary {
  color: #1a1002;
  border-color: rgba(255, 138, 0, 0.9);
  background: linear-gradient(180deg, #ffb347 0%, #ff8a00 100%);
  box-shadow:
    0 14px 30px -14px rgba(255, 138, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  font-weight: 700;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #ffc266 0%, #ff9514 100%);
  box-shadow:
    0 18px 36px -14px rgba(255, 138, 0, 0.66),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-ghost {
  color: var(--text-2);
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(148, 163, 184, 0.06);
}
.btn-ghost:hover:not(:disabled) {
  color: #ffce8a;
  border-color: rgba(255, 138, 0, 0.32);
  background: rgba(255, 138, 0, 0.09);
}

.btn-danger {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.14);
}
.btn-danger:hover:not(:disabled) {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.2);
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(26, 16, 2, 0.25);
  border-top-color: #1a1002;
  animation: spin 0.7s linear infinite;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.chip .icon {
  width: 11px;
  height: 11px;
}
.chip-demo {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.28);
}
.chip-cache {
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.25);
}

/* ============================ 04 顶部导航 ============================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
  background: rgba(7, 11, 18, 0.74);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand-logo {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 4px 12px rgba(255, 138, 0, 0.25));
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f2f6fc;
}
.brand-text span {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--text-3);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--text-2);
  transition: color 0.18s ease, background-color 0.18s ease;
}
.site-nav a:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.gh-badge {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0c1119;
  font-size: 11px;
  line-height: 1;
  font-family: var(--font-mono);
}
.gh-badge-label {
  display: inline-flex;
  align-items: center;
  padding: 6px 8px;
  color: var(--text-3);
  background: rgba(148, 163, 184, 0.08);
  border-right: 1px solid var(--line);
}
.gh-badge-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  color: var(--text-2);
}
.gh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.8);
}

/* ============================ 05 Hero 与查询表单 ============================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 62px 0 74px;
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-glow-a {
  width: 540px;
  height: 540px;
  top: -240px;
  left: -160px;
  background: radial-gradient(circle, rgba(255, 138, 0, 0.2), transparent 66%);
}
.hero-glow-b {
  width: 460px;
  height: 460px;
  top: 30px;
  right: -180px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.12), transparent 66%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--orange-soft);
}
.hero .eyebrow {
  padding: 7px 12px;
  border: 1px solid rgba(255, 138, 0, 0.22);
  border-radius: 999px;
  background: rgba(255, 138, 0, 0.07);
  color: #ffc266;
  letter-spacing: 0.14em;
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.12);
  animation: pulse 2.4s ease-in-out infinite;
}

.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(2.1rem, 4.1vw, 3.35rem);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f4f7fb;
}
.hero h1 .accent {
  background: linear-gradient(100deg, #ffd27a 0%, #ffa726 46%, #ff8a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(255, 138, 0, 0.25));
}

.hero-lead {
  max-width: 560px;
  font-size: clamp(15px, 1.35vw, 16.5px);
  line-height: 1.78;
  color: var(--text-2);
}
.hero-lead strong {
  color: #dbe4f0;
  font-weight: 600;
}

.query-card {
  position: relative;
  max-width: 660px;
  margin-top: 28px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 138, 0, 0.18);
  background: linear-gradient(180deg, rgba(22, 29, 40, 0.92), rgba(11, 16, 24, 0.94));
  box-shadow:
    0 34px 70px -38px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.query-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: calc(var(--radius-lg) + 1px);
  background: linear-gradient(
    135deg,
    rgba(255, 167, 38, 0.6),
    rgba(255, 138, 0, 0.1) 38%,
    rgba(148, 163, 184, 0.05) 72%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.query-row {
  display: flex;
  gap: 10px;
}

.query-field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.query-icon {
  position: absolute;
  left: 15px;
  width: 19px;
  height: 19px;
  color: var(--text-3);
  pointer-events: none;
}
.query-field input {
  width: 100%;
  height: 56px;
  padding: 0 46px 0 44px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: #080d15;
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  appearance: none;
}
.query-field input::placeholder {
  color: #647184;
}
.query-field input:hover {
  border-color: #36465c;
}
.query-field input:focus {
  outline: none;
  border-color: rgba(255, 138, 0, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.14), 0 0 30px -8px rgba(255, 138, 0, 0.35);
}
.query-field input[aria-invalid="true"] {
  border-color: rgba(248, 113, 113, 0.65);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.input-clear {
  position: absolute;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--text-3);
  transition: color 0.18s ease, background-color 0.18s ease;
}
.input-clear .icon {
  width: 14px;
  height: 14px;
}
.input-clear:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.1);
}

.query-submit {
  flex: none;
  height: 56px;
  padding: 0 26px;
  border-radius: 13px;
  font-size: 15px;
}
.btn-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid rgba(26, 16, 2, 0.25);
  border-top-color: #1a1002;
  animation: spin 0.7s linear infinite;
}
.query-submit.is-loading .btn-spinner {
  display: inline-block;
}

.form-error {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
  font-size: 12.5px;
  line-height: 1.6;
}

.query-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.examples-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-3);
}
.example-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(148, 163, 184, 0.05);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.example-chip:hover {
  color: #ffce8a;
  border-color: rgba(255, 138, 0, 0.35);
  background: rgba(255, 138, 0, 0.08);
}
.demo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 5px 2px;
  border-radius: 8px;
  color: #ffc266;
  font-size: 12.5px;
  font-weight: 600;
  transition: color 0.18s ease;
}
.demo-link .icon {
  width: 14px;
  height: 14px;
}
.demo-link:hover {
  color: #ffd89e;
}

.query-hint {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(148, 163, 184, 0.12);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--text-3);
}
.noscript-note {
  margin-top: 12px;
  font-size: 13px;
  color: #fca5a5;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--text-2);
}
.hero-points li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-points .icon {
  width: 15px;
  height: 15px;
  color: var(--green);
}

/* ============================ 06 Hero 预览插画 ============================ */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
  padding: 16px 0 40px;
}
.hero-visual::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 420px;
  height: 420px;
  transform: translate(-40%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 0, 0.18), transparent 65%);
  filter: blur(30px);
}
.preview-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 16px 16px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(19, 26, 37, 0.96), rgba(9, 13, 20, 0.98));
  box-shadow:
    0 50px 90px -40px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: float-slow 9s ease-in-out infinite;
}

.preview-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.preview-dots {
  display: inline-flex;
  gap: 4px;
}
.preview-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2a3444;
}
.preview-label {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--text-3);
}
.preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 999px;
  color: #7ee2b8;
  background: rgba(52, 211, 153, 0.08);
  font-size: 10px;
}
.preview-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.9);
}

.preview-profile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 4px 12px;
}
.preview-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  color: #160f05;
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(145deg, #ffd27a, #ff8a00);
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.14);
}
.preview-user {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
.preview-user strong {
  font-size: 14px;
  color: #f2f6fc;
}
.preview-user span {
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.preview-count {
  display: flex;
  flex-direction: column;
  margin-left: auto;
  text-align: right;
  line-height: 1.15;
}
.preview-count strong {
  font-size: 20px;
  font-weight: 800;
  color: #f2f6fc;
}
.preview-count span {
  font-size: 10px;
  color: var(--text-3);
}

.preview-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 4px 12px;
}
.preview-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(148, 163, 184, 0.055);
  font-size: 10.5px;
  color: var(--text-3);
}
.preview-stat strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.preview-stat span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.preview-stat.is-cooldown {
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.08);
  color: #d7b25a;
}
.preview-stat.is-cooldown strong {
  color: var(--amber);
}

.preview-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 10px;
}
.preview-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  background: rgba(148, 163, 184, 0.04);
}
.preview-item.is-cooldown {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.06);
}
.preview-art {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}
.art-amber {
  color: #e4ae39;
  border: 1px solid rgba(228, 174, 57, 0.25);
  background: linear-gradient(145deg, rgba(228, 174, 57, 0.3), rgba(228, 174, 57, 0.08));
}
.art-red {
  color: #eb4b4b;
  border: 1px solid rgba(235, 75, 75, 0.25);
  background: linear-gradient(145deg, rgba(235, 75, 75, 0.28), rgba(235, 75, 75, 0.07));
}
.art-purple {
  color: #d32ce6;
  border: 1px solid rgba(211, 44, 230, 0.25);
  background: linear-gradient(145deg, rgba(211, 44, 230, 0.26), rgba(211, 44, 230, 0.06));
}
.preview-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}
.preview-item-info strong {
  max-width: 190px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11.5px;
  font-weight: 600;
  color: #e9eef6;
}
.preview-item-info span {
  font-size: 9.5px;
  color: var(--text-3);
}
.preview-qty {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.preview-state {
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-3);
  font-size: 9.5px;
  white-space: nowrap;
}
.preview-item.is-cooldown .preview-state {
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.1);
}
.preview-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 4px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--text-3);
  font-size: 10px;
}
.pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.8s ease-in-out infinite;
}

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 138, 0, 0.3);
  background: rgba(17, 21, 28, 0.92);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  color: #ffd89e;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: float-chip 7s ease-in-out infinite;
}
.float-chip-a {
  top: 2px;
  right: -14px;
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.35);
}
.float-chip-b {
  bottom: 8px;
  left: -18px;
  color: var(--text-2);
  border-color: rgba(148, 163, 184, 0.2);
  animation-delay: -3s;
}

/* ============================ 07 区块标题与功能卡片 ============================ */
.section-heading {
  max-width: 660px;
  margin-bottom: 32px;
}
.section-heading .eyebrow {
  color: var(--orange-soft);
  font-size: 11px;
  letter-spacing: 0.18em;
}
.section-heading h2 {
  margin: 10px 0;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #f1f5fb;
}
.section-sub {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.75;
}
.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}

.section-features {
  border-top: 1px solid rgba(148, 163, 184, 0.06);
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.34), transparent 72%);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.feature-card {
  position: relative;
  overflow: hidden;
  padding: 22px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19, 25, 34, 0.76), rgba(12, 17, 24, 0.9));
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(300px 150px at 100% 0%, rgba(255, 138, 0, 0.09), transparent 70%);
  transition: opacity 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 138, 0, 0.28);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.9);
}
.feature-card:hover::after {
  opacity: 1;
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 138, 0, 0.18);
  background: rgba(255, 138, 0, 0.09);
  color: #ffb347;
}
.feature-icon .icon {
  width: 21px;
  height: 21px;
}
.feature-card h3 {
  margin-bottom: 8px;
  font-size: 15.5px;
  font-weight: 700;
  color: #eef3fa;
}
.feature-card p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
}
.feature-card-accent {
  border-color: rgba(251, 191, 36, 0.2);
  background: linear-gradient(180deg, rgba(43, 33, 14, 0.5), rgba(12, 17, 24, 0.92));
}
.feature-card-accent .feature-icon {
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.1);
}

/* ============================ 08 查询结果：玩家 / 统计 ============================ */
.section-result {
  padding: 24px 0 60px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.result-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.section-heading-sm {
  margin-bottom: 0;
}
.result-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 演示 / 提示条 */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.notice-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
}
.notice-icon .icon {
  width: 17px;
  height: 17px;
}
.notice-body strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13.5px;
  color: #ffd89e;
}
.notice-body p {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-2);
}
.notice > .btn {
  margin-left: auto;
  flex: none;
}
.notice-demo {
  margin-bottom: 16px;
  border-color: rgba(251, 191, 36, 0.26);
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.09), rgba(17, 21, 28, 0.75));
}
.notice-warn {
  border-color: rgba(251, 191, 36, 0.25);
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.07), rgba(17, 21, 28, 0.8));
}
.notice-warn .notice-icon {
  color: var(--amber);
  background: rgba(251, 191, 36, 0.12);
}
.notice-info {
  border-color: rgba(96, 165, 250, 0.22);
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.07), rgba(17, 21, 28, 0.8));
}
.notice-info .notice-icon {
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.12);
}
.notice-info .notice-body strong {
  color: #bfdbfe;
}
.notice-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 4px;
}

/* 玩家信息卡 */
.player-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(255, 138, 0, 0.06), transparent 38%),
    linear-gradient(180deg, #121821, #0d131c);
}
.player-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(180deg, #ffb347, #ff8a00);
  opacity: 0.8;
}
.player-avatar-wrap {
  position: relative;
  flex: none;
}
.player-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 138, 0, 0.35);
  background: #0b111a;
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.07);
}
.online-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2.5px solid #0e141d;
  background: #64748b;
}
.online-dot.is-online {
  background: var(--green);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
}
.online-dot.is-ingame {
  background: #60a5fa;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.6);
}
.online-dot.is-away {
  background: var(--amber);
}
.online-dot.is-offline {
  background: #64748b;
}

.player-main {
  flex: 1;
  min-width: 0;
}
.player-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.player-title h3 {
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #f2f6fc;
  word-break: break-word;
}
.player-ids {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.id-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 0;
  border-radius: 7px;
  color: var(--text-2);
  font-size: 12.5px;
  transition: color 0.18s ease;
}
.id-button .mono {
  font-size: 12.5px;
}
.id-button .icon {
  width: 13px;
  height: 13px;
  opacity: 0.65;
}
.id-button:hover {
  color: #ffce8a;
}
.id-button:hover .mono {
  color: #ffce8a;
}
.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: #ffc266;
}
.profile-link .icon {
  width: 12px;
  height: 12px;
}
.profile-link:hover {
  color: #ffd89e;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.player-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.player-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.player-meta .meta-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4b5563;
}
.player-meta .meta-online .meta-dot {
  background: var(--green);
  box-shadow: 0 0 5px rgba(52, 211, 153, 0.7);
}
.player-meta .meta-busy .meta-dot {
  background: #60a5fa;
}
.player-meta .meta-away .meta-dot {
  background: var(--amber);
}

.player-side {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: none;
  margin-left: auto;
  text-align: right;
}
.updated-time {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: 12px;
  color: var(--text-2);
}
.updated-time .icon {
  width: 13px;
  height: 13px;
  color: var(--text-3);
}
.player-source {
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--text-3);
}

/* 统计卡 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 24, 33, 0.9), rgba(12, 17, 24, 0.92));
}
.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.stat-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(148, 163, 184, 0.07);
  color: var(--text-2);
}
.stat-icon .icon {
  width: 16px;
  height: 16px;
}
.stat-icon img {
  width: 18px;
  height: 18px;
}
.stat-value {
  margin: 10px 0 4px;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: #f2f6fc;
}
.stat-sub {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-3);
}
.stat-owned .stat-icon {
  color: #86efac;
  border-color: rgba(52, 211, 153, 0.18);
  background: rgba(52, 211, 153, 0.08);
}
.stat-owned .stat-value {
  color: #a7f3d0;
}
.stat-cooldown {
  border-color: rgba(251, 191, 36, 0.3);
  background: linear-gradient(
    160deg,
    rgba(251, 191, 36, 0.13),
    rgba(17, 21, 28, 0.88) 55%,
    rgba(17, 21, 28, 0.95)
  );
  box-shadow: 0 0 40px -24px rgba(251, 191, 36, 0.5);
}
.stat-cooldown .stat-icon {
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.12);
}
.stat-cooldown .stat-value {
  color: var(--amber);
}
.stat-cooldown .stat-sub {
  color: #c9a84c;
}
.stat-ratio .stat-value {
  color: #ffc266;
}
.ratio-bar {
  height: 6px;
  margin: 4px 0 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.1);
}
.ratio-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8a00, var(--amber));
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================ 09 结果工具栏与物品网格 ============================ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 20px 0 12px;
}
.tabs {
  display: flex;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(10, 15, 23, 0.8);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
.tab:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.06);
}
.tab[aria-selected="true"] {
  color: #ffd9a3;
  border-color: rgba(255, 138, 0, 0.28);
  background: linear-gradient(180deg, rgba(255, 138, 0, 0.18), rgba(255, 138, 0, 0.08));
}
.tab-count {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.tab[aria-selected="true"] .tab-count {
  color: #ffce8a;
  background: rgba(255, 138, 0, 0.18);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.search-field {
  position: relative;
  display: flex;
  align-items: center;
}
.search-field .icon {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--text-3);
  pointer-events: none;
}
.search-field input {
  width: 220px;
  max-width: 100%;
  height: 38px;
  padding: 0 12px 0 33px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0a0f17;
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  appearance: none;
}
.search-field input::placeholder {
  color: #5b6778;
}
.search-field input:hover {
  border-color: #344254;
}
.search-field input:focus {
  outline: none;
  border-color: rgba(255, 138, 0, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.1);
}
.search-field input::-webkit-search-cancel-button {
  display: none;
}

.select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.select-wrap select {
  height: 38px;
  padding: 0 32px 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0a0f17;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.select-wrap select:hover {
  border-color: #344254;
}
.select-wrap select:focus {
  outline: none;
  border-color: rgba(255, 138, 0, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.1);
}
.select-wrap select option {
  background: #0d131c;
  color: var(--text);
}
.select-chevron {
  position: absolute;
  right: 10px;
  width: 13px;
  height: 13px;
  color: var(--text-3);
  transform: rotate(90deg);
  pointer-events: none;
}

.grid-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-3);
}
.grid-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b99b52;
}
.grid-hint::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 11px;
}

.item-card {
  position: relative;
  display: flex;
  gap: 13px;
  overflow: hidden;
  padding: 12px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 24, 33, 0.88), rgba(12, 17, 24, 0.9));
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  animation: card-in 0.32s ease both;
}
.item-card:hover {
  transform: translateY(-2px);
  border-color: #334155;
  box-shadow: 0 18px 36px -26px rgba(0, 0, 0, 0.95);
}
.item-card.is-cooldown {
  border-color: rgba(251, 191, 36, 0.36);
  background: linear-gradient(180deg, rgba(38, 31, 16, 0.5), rgba(14, 18, 24, 0.92) 62%);
}
.item-card.is-cooldown:hover {
  border-color: rgba(251, 191, 36, 0.55);
}
.item-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--rarity, #7c8ba1), transparent 78%);
  opacity: 0.85;
}

.item-art {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 82px;
  width: 82px;
  height: 82px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.11);
  overflow: hidden;
  background:
    radial-gradient(130% 130% at 28% 8%, var(--rarity-soft, rgba(148, 163, 184, 0.16)), transparent 68%),
    linear-gradient(155deg, #161e2a, #0a0f16);
}
.item-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 45%);
}
.item-art-glyph {
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-4px);
  color: var(--rarity, #94a3b8);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  opacity: 0.9;
}
.item-art-type {
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: rgba(233, 238, 246, 0.5);
}
.item-art-shield {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 14px;
  height: 14px;
  color: rgba(233, 238, 246, 0.32);
}
.item-art-img {
  position: absolute;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.25s ease;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5));
}
.item-art.has-image .item-art-img {
  opacity: 1;
}
.item-art.has-image .item-art-glyph,
.item-art.has-image .item-art-type {
  opacity: 0;
}
.item-qty {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 1;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(4, 8, 13, 0.78);
  color: #dbe3ee;
  font-size: 9.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.item-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 1px 0;
}
.item-name {
  display: -webkit-box;
  overflow: hidden;
  max-height: 2.9em;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  color: #e9eef6;
  word-break: break-word;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 16px;
  font-size: 11px;
  color: var(--text-3);
}
.item-type {
  color: var(--text-3);
}
.item-rarity {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--rarity, #94a3b8);
}
.rarity-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rarity, #94a3b8);
  box-shadow: 0 0 6px var(--rarity-glow, rgba(148, 163, 184, 0.2));
}
.item-flag {
  padding: 0 4px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 4px;
  color: #94a3b8;
  font-size: 9.5px;
}
.item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.state-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.6;
}
.state-badge .icon {
  width: 11px;
  height: 11px;
}
.state-badge.is-owned {
  color: #86efac;
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(52, 211, 153, 0.08);
}
.state-badge.is-cooldown {
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.1);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}
.load-more-wrap .btn {
  max-width: 340px;
}

/* ============================ 10 骨架屏 / 空状态 / 错误态 ============================ */
.loading-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 138, 0, 0.18);
  background: rgba(255, 138, 0, 0.05);
  color: #ffc266;
  font-size: 13px;
}
.loading-bar .spinner {
  width: 16px;
  height: 16px;
  border-color: rgba(255, 138, 0, 0.22);
  border-top-color: var(--orange);
}
.link-button {
  margin-left: auto;
  color: var(--text-3);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-button:hover {
  color: #ffce8a;
}

.skeleton {
  border: 1px solid rgba(148, 163, 184, 0.06);
  border-radius: 12px;
  background: linear-gradient(100deg, #111823 30%, #182231 50%, #111823 70%);
  background-size: 220% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.skeleton-player {
  height: 100px;
  margin-bottom: 12px;
  border-radius: 16px;
}
.skeleton-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.skeleton-stat {
  height: 112px;
  border-radius: 15px;
}
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 11px;
}
.skeleton-item {
  height: 108px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 52px 20px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(11, 16, 24, 0.5);
  text-align: center;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  border-radius: 15px;
  border: 1px solid rgba(255, 138, 0, 0.16);
  background: rgba(255, 138, 0, 0.07);
  color: #ffb347;
}
.empty-icon .icon {
  width: 25px;
  height: 25px;
}
.empty-state h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
}
.empty-state p {
  max-width: 460px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-3);
}
.empty-state .btn {
  margin-top: 10px;
}

.state-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 560px;
  margin: 20px auto 8px;
  padding: 42px 28px;
  border-radius: 18px;
  border: 1px solid rgba(248, 113, 113, 0.22);
  background: linear-gradient(180deg, rgba(38, 20, 23, 0.5), rgba(12, 17, 24, 0.85));
  text-align: center;
}
.state-error .state-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  border: 1px solid rgba(248, 113, 113, 0.25);
  background: rgba(248, 113, 113, 0.1);
  color: var(--red);
}
.state-error .state-icon .icon {
  width: 26px;
  height: 26px;
}
.state-panel h3 {
  font-size: 17px;
  font-weight: 700;
}
.state-panel p {
  max-width: 440px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-2);
}
.state-panel .state-hint {
  font-size: 11.5px;
  color: var(--text-3);
}
.state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.result-body.is-revealed {
  animation: reveal 0.35s ease both;
}

/* ============================ 11 查询历史 ============================ */
.section-history {
  border-top: 1px solid rgba(148, 163, 184, 0.06);
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.35), transparent 70%);
}
.history-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.history-count {
  font-size: 12px;
  color: var(--text-3);
}
.history-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.history-item {
  position: relative;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 24, 33, 0.7), rgba(12, 17, 24, 0.8));
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.history-item:hover {
  border-color: rgba(255, 138, 0, 0.3);
  background: rgba(255, 138, 0, 0.04);
}
.history-main {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
  min-width: 0;
  min-height: 64px;
  padding: 12px 6px 12px 14px;
  color: inherit;
  text-align: left;
}
.history-avatar {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #0b111a;
  object-fit: cover;
}
.history-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.history-name {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.history-id {
  overflow: hidden;
  max-width: 190px;
  color: var(--text-3);
  font-size: 10.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.history-stats {
  display: flex;
  flex: none;
  gap: 6px;
}
.hist-chip {
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-2);
  font-size: 10.5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.hist-chip-cool {
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.08);
}
.history-time {
  flex: none;
  color: var(--text-3);
  font-size: 10.5px;
  white-space: nowrap;
}
.history-arrow {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--text-3);
  transition: transform 0.18s ease, color 0.18s ease;
}
.history-main:hover .history-arrow {
  color: #ffc266;
  transform: translateX(2px);
}
.history-remove {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  border-left: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--text-3);
  transition: color 0.18s ease, background-color 0.18s ease;
}
.history-remove .icon {
  width: 14px;
  height: 14px;
}
.history-remove:hover {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.08);
}
.history-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px 20px;
  border: 1px dashed rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  color: var(--text-3);
  font-size: 13px;
  text-align: left;
}
.history-empty-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(148, 163, 184, 0.06);
  color: var(--text-3);
}
.history-empty-icon .icon {
  width: 19px;
  height: 19px;
}
.history-empty p {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-weight: 600;
  color: var(--text-2);
}
.history-empty p span {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-3);
}

/* ============================ 12 使用说明与隐私 ============================ */
.section-guide {
  border-top: 1px solid rgba(148, 163, 184, 0.06);
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.28), transparent 70%);
}
.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 14px;
}
.panel {
  min-width: 0;
  padding: 26px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 24, 33, 0.8), rgba(12, 17, 24, 0.9));
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 16.5px;
  font-weight: 700;
  color: #eef3fa;
}
.panel-num {
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 138, 0, 0.22);
  background: rgba(255, 138, 0, 0.1);
  color: #ffc266;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
.steps li {
  display: flex;
  gap: 12px;
}
.steps li > div {
  min-width: 0;
}
.step-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  margin-top: 1px;
  border-radius: 50%;
  border: 1px solid rgba(255, 138, 0, 0.28);
  background: rgba(255, 138, 0, 0.1);
  color: #ffc266;
  font-size: 12px;
  font-weight: 700;
}
.steps strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13.5px;
  color: #e6ecf5;
}
.steps p {
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.65;
}
.format-block {
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}
.format-title {
  margin-bottom: 10px;
  color: var(--text-3);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}
.format-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin-bottom: 6px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(148, 163, 184, 0.03);
  text-align: left;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.format-item:hover {
  border-color: rgba(255, 138, 0, 0.3);
  background: rgba(255, 138, 0, 0.06);
}
.format-item code {
  min-width: 0;
  overflow: hidden;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.format-item span {
  flex: none;
  padding: 1px 6px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 4px;
  color: var(--text-3);
  font-size: 10px;
}
.privacy-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.privacy-list li {
  display: flex;
  gap: 10px;
}
.privacy-list li > div {
  min-width: 0;
}
.privacy-list .icon {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 3px;
  color: #5eead4;
}
.privacy-list strong {
  display: block;
  margin-bottom: 2px;
  color: #e6ecf5;
  font-size: 13px;
}
.privacy-list p {
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.65;
}
.panel-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.7;
}

/* ============================ 13 页脚 ============================ */
.site-footer {
  margin-top: 20px;
  padding: 46px 0 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  background: linear-gradient(180deg, rgba(7, 11, 18, 0.4), #05080d);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.4fr;
  gap: 32px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.07);
}
.footer-brand .brand {
  margin-bottom: 14px;
}
.footer-brand p {
  max-width: 360px;
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.75;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col h4 {
  margin-bottom: 4px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.footer-col a,
.footer-col p {
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.7;
}
.footer-col a:hover {
  color: #ffc266;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 20px;
  color: #5b6778;
  font-size: 11px;
}

/* ============================ 14 弹窗与 Toast ============================ */
.modal {
  width: min(440px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, #131a24, #0d121a);
  color: var(--text);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95);
}
.modal::backdrop {
  background: rgba(3, 6, 10, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal[open] {
  animation: modal-in 0.18s ease-out;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}
.modal-head h2 {
  font-size: 16px;
  font-weight: 700;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-3);
  transition: color 0.18s ease, background-color 0.18s ease;
}
.icon-button .icon {
  width: 16px;
  height: 16px;
}
.icon-button:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.1);
}
.modal-message {
  padding: 12px 20px 4px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px;
}

.toast-region {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  background: rgba(17, 21, 28, 0.97);
  color: var(--text);
  font-size: 13px;
  box-shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.9);
  pointer-events: auto;
  animation: toast-in 0.22s ease-out;
}
.toast .icon {
  width: 15px;
  height: 15px;
  color: var(--green);
}
.toast-error {
  border-color: rgba(248, 113, 113, 0.4);
}
.toast-error .icon {
  color: var(--red);
}
.toast.is-leaving {
  animation: toast-out 0.2s ease-in forwards;
}

/* ============================ 15 动画 ============================ */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}
@keyframes float-slow {
  0%, 100% { transform: rotate(-0.6deg) translateY(0); }
  50% { transform: rotate(-0.2deg) translateY(-8px); }
}
@keyframes float-chip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes shimmer {
  0% { background-position: 130% 0; }
  100% { background-position: -130% 0; }
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px); }
}

/* ============================ 16 响应式 ============================ */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .hero-visual {
    display: none;
  }
  .query-card {
    max-width: 700px;
  }
  .hero-lead {
    max-width: 640px;
  }
}

@media (max-width: 980px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .guide-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .history-list {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .nav-history {
    display: none;
  }
  .section {
    padding: 56px 0;
  }
  .hero {
    padding: 48px 0 56px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .skeleton-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .player-card {
    flex-wrap: wrap;
    gap: 14px;
    padding: 18px;
  }
  .player-side {
    width: 100%;
    margin-left: 0;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
  .updated-time {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 32px, var(--container));
  }
  .header-inner {
    gap: 12px;
    height: 62px;
  }
  .brand-logo {
    width: 32px;
    height: 32px;
  }
  .brand-text strong {
    font-size: 16px;
  }
  .brand-text span {
    font-size: 9.5px;
  }
  .site-nav a {
    padding: 7px 8px;
    font-size: 12.5px;
  }
  .gh-badge {
    display: none;
  }
  .hero h1 {
    margin: 16px 0 14px;
  }
  .query-card {
    margin-top: 22px;
    padding: 14px;
  }
  .query-row {
    flex-direction: column;
  }
  .query-submit {
    width: 100%;
    height: 50px;
  }
  .query-field input {
    height: 52px;
    font-size: 14px;
  }
  .query-examples {
    gap: 6px;
  }
  .demo-link {
    width: 100%;
    margin-left: 0;
    padding-top: 8px;
  }
  .hero-points {
    gap: 12px;
    font-size: 12px;
  }
  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .history-actions {
    width: 100%;
    justify-content: space-between;
  }
  .result-tools {
    width: 100%;
  }
  .result-tools .btn {
    flex: 1;
  }
  .toolbar {
    align-items: stretch;
  }
  .tabs {
    width: 100%;
  }
  .tab {
    flex: 1;
    justify-content: center;
    padding: 0 10px;
    font-size: 12.5px;
  }
  .toolbar-right {
    width: 100%;
  }
  .search-field {
    flex: 1;
  }
  .search-field input {
    width: 100%;
  }
  .select-wrap select {
    height: 38px;
  }
  .player-avatar {
    width: 56px;
    height: 56px;
  }
  .player-ids {
    gap: 10px;
  }
  .stats-grid {
    gap: 10px;
  }
  .stat-card {
    padding: 14px;
  }
  .items-grid,
  .skeleton-grid {
    grid-template-columns: 1fr;
  }
  .skeleton-stat {
    height: 100px;
  }
  .skeleton-item {
    height: 104px;
  }
  .history-stats {
    display: none;
  }
  .history-time {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-brand {
    grid-column: auto;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 6px;
  }
  .step-num {
    width: 24px;
    height: 24px;
  }
  .panel {
    padding: 20px;
  }
}

@media (max-width: 560px) {
  .brand-text span {
    display: none;
  }
  .site-nav {
    gap: 0;
  }
  .site-nav a {
    padding: 7px 7px;
  }
  .hero {
    padding: 40px 0 48px;
  }
  .hero h1 {
    font-size: clamp(1.92rem, 8.6vw, 2.4rem);
  }
  .hero-lead {
    font-size: 14px;
  }
  .hero .eyebrow {
    font-size: 10.5px;
    letter-spacing: 0.08em;
  }
  .query-examples .examples-label {
    display: none;
  }
  .example-chip {
    font-size: 11.5px;
    padding: 4px 9px;
  }
  .query-hint {
    font-size: 11px;
  }
  .section {
    padding: 46px 0;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .section-heading {
    margin-bottom: 24px;
  }
  .result-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .result-tools {
    width: 100%;
  }
  .notice {
    flex-wrap: wrap;
  }
  .notice > .btn {
    width: 100%;
  }
  .notice-body {
    flex: 1;
    min-width: 200px;
  }
  .player-title h3 {
    font-size: 17px;
  }
  .player-meta {
    gap: 10px;
    font-size: 11.5px;
  }
  .player-side {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .grid-meta {
    font-size: 11.5px;
  }
  .state-panel {
    padding: 32px 18px;
  }
  .state-actions .btn {
    flex: 1;
  }
  .history-empty {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .history-empty p {
    align-items: center;
  }
  .modal-actions .btn {
    flex: 1;
  }
  .toast-region {
    bottom: 16px;
  }
}

@media (max-width: 400px) {
  .container {
    width: min(100% - 24px, var(--container));
  }
  .query-card {
    padding: 12px;
    border-radius: 16px;
  }
  .query-field input {
    padding-left: 40px;
    padding-right: 40px;
    font-size: 13.5px;
  }
  .query-icon {
    left: 12px;
    width: 17px;
    height: 17px;
  }
  .input-clear {
    right: 7px;
  }
  .hero-points {
    gap: 10px;
    font-size: 11.5px;
  }
  .stat-value {
    font-size: 22px;
  }
  .stat-sub {
    font-size: 10.5px;
  }
  .item-art {
    flex-basis: 76px;
    width: 76px;
    height: 76px;
  }
  .item-name {
    font-size: 13px;
  }
  .tab {
    font-size: 12px;
    gap: 5px;
  }
  .tab-count {
    min-width: 19px;
    padding: 1px 5px;
    font-size: 10px;
  }
}

/* ============================ 17 减少动态效果 ============================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
