/* ============================================================
   Beelink Model Hub — 统一设计系统 v4
   Single shared design layer for index.php + detail.php
   - 品牌主色：青蓝（#0a84ff 系）+ zinc 中性灰
   - 客户端深色模式 [data-theme="dark"]（绝不服务端渲染主题）
   - iOS 风格：SystemGroupedBackground、SF 系统字体、轻投影
   - 完整 prefers-reduced-motion 降级
   ============================================================ */

/* ---------- 设计 Token ---------- */
/* ---------- 设计 Token（Apple iOS 风格） ---------- */
:root {
  /* 品牌主色 — iOS System Blue */
  --primary: #0071e3;   /* iOS 系统蓝 */
  --primary-600: #0066cc;
  --primary-500: #007aff;
  --primary-400: #0a84ff;
  --primary-300: #5ac8fa;
  --primary-200: #b0d5ff;
  --primary-100: #d6e9ff;
  --primary-50: #eaf3ff;

  /* 中性灰 — iOS System Gray */
  --neutral: #3c3c43;
  --neutral-600: #3c3c43;
  --neutral-500: #8e8e93;
  --neutral-400: #aeaeb2;
  --neutral-300: #c7c7cc;
  --neutral-200: #d1d1d6;
  --neutral-100: #e5e5ea;
  --neutral-50: #f2f2f7;
  --neutral-900: #1c1c1e;

  /* 语义色 — iOS 系统语义色 */
  --success: #34c759;
  --success-soft: #e8f9ef;
  --warning: #ff9500;
  --warning-soft: #fff3e0;
  --danger: #ff3b30;
  --danger-soft: #ffe9e8;

  /* 中性色 */
  --bg: #f2f2f7;          /* iOS SystemGroupedBackground */
  --bg-soft: #ebebf0;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --border: #e5e5ea;
  --border-soft: #f0f0f5;

  --text-strong: #000000;
  --text: #1d1d1f;
  --text-mid: #3c3c43;
  --text-light: #6e6e73;
  --text-soft: #6e6e73;
  --text-muted: #8e8e93;
  --text-faint: #aeaeb2;

  --nav-bg: rgba(255, 255, 255, 0.82);

  /* 阴影 — iOS 轻投影 */
  --ring: 0 0 0 3px rgba(0, 113, 227, 0.28);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 16px rgba(0, 113, 227, 0.2);
  --shadow-primary-lg: 0 8px 24px rgba(0, 113, 227, 0.26);

  /* 渐变 — iOS 蓝紫 */
  --gradient-primary: linear-gradient(180deg, #0077ed 0%, #0071e3 100%);
  --gradient-hero: linear-gradient(180deg, #f5f5f7 0%, #ffffff 100%);
  --gradient-text: linear-gradient(90deg, #0071e3, #5856d6);

  /* 圆角 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* 字体 — iOS 系统字体栈 */
  --font-ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Menlo', 'Cascadia Code', Consolas, monospace;

  /* 布局 */
  --container-max: 1280px;
  --header-h: 64px;

  /* 动效 */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s var(--ease-out);
  --transition-slow: 0.45s var(--ease-out);
}

/* ---------- 深色模式 Token ---------- */
[data-theme="dark"] {
  --bg: #000000;             /* iOS systemBackground */
  --bg-soft: #1c1c1e;
  --surface: #1c1c1e;
  --surface-2: #242426;
  --border: #3a3a3c;
  --border-soft: #2c2c2e;

  --text-strong: #ffffff;
  --text: #f5f5f7;
  --text-mid: #d1d1d6;
  --text-light: #aeaeb2;
  --text-soft: #aeaeb2;
  --text-muted: #8e8e93;
  --text-faint: #6e6e73;

  --nav-bg: rgba(0, 0, 0, 0.85);

  /* 品牌蓝 — 深色模式 iOS System Blue (dark) */
  --primary: #0a84ff;
  --primary-600: #409cff;
  --primary-500: #0a84ff;
  --primary-400: #64b5ff;
  --primary-300: #9cc9ff;
  --primary-200: #c7dfff;
  --primary-100: #14314f;
  --primary-50: #0f2540;
  --primary-900: #0a84ff;

  /* 中性灰 */
  --neutral: #aeaeb2;
  --neutral-600: #2c2c2e;
  --neutral-500: #3a3a3c;
  --neutral-400: #48484a;
  --neutral-300: #636366;
  --neutral-200: #8e8e93;
  --neutral-100: #aeaeb2;
  --neutral-50: #c7c7cc;
  --neutral-900: #1c1c1e;

  --gradient-text: linear-gradient(90deg, #0a84ff, #5e5ce6);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.6);
  --shadow-primary: 0 4px 16px rgba(10, 132, 255, 0.32);
  --shadow-primary-lg: 0 8px 24px rgba(10, 132, 255, 0.4);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: none;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  animation: pageIn 0.4s ease both;
}
[data-theme="dark"] body {
  background-image: none;
}
@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: rgba(0, 122, 255, 0.18); }

:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.page-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- 顶部导航（两页共用） ---------- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border-soft);
  transition: box-shadow 0.3s var(--ease-out), background 0.3s;
}
.top-nav.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.9);
}
[data-theme="dark"] .top-nav.scrolled { background: rgba(11, 11, 15, 0.88); }

.top-nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
  color: var(--text);
  transition: color 0.2s;
}
.brand:hover { color: var(--primary); }
.brand img {
  height: 34px;
  width: auto;
  border-radius: 50%;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.85),
    inset 0 -2px 4px rgba(0, 0, 0, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.brand:hover img { transform: scale(1.05); box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.95),
    inset 0 -3px 5px rgba(0, 0, 0, 0.34),
    0 2px 6px rgba(0, 0, 0, 0.14); }

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
/* 导航胶囊（模型 / 推理框架 / 驱动，三个页面共用） */
.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.9rem;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-fast);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), inset 0 -1px 1px rgba(0, 0, 0, 0.05);
}
.nav-pill:hover { background: var(--primary-50); color: var(--primary); }
.nav-pill.active { background: var(--primary); color: #fff; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), inset 0 -1px 1px rgba(0, 0, 0, 0.05), var(--shadow-sm); }
[data-theme="dark"] .nav-pill.active { background: var(--primary-400); color: #0b1220; }

/* 语言切换 */
.lang-switcher {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg-soft);
  border-radius: var(--r-pill);
  border: 1px solid var(--border-soft);
}
.lang-btn {
  padding: 0.3rem 0.8rem;
  border-radius: var(--r-pill);
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
  transition: all var(--transition-fast);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), inset 0 -1px 1px rgba(0, 0, 0, 0.05);
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 95%, #000));
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), inset 0 -1px 1px rgba(0, 0, 0, 0.04), var(--shadow-sm);
}

/* 主题切换 */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 95%, #000));
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), inset 0 -1px 1px rgba(0, 0, 0, 0.04);
}
.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary-300);
  transform: rotate(15deg);
}

/* ---------- 面包屑 ---------- */
.breadcrumb-bar {
  max-width: var(--container-max);
  margin: 1.25rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-light);
  flex-wrap: wrap;
}
.breadcrumb-bar a {
  color: var(--text-mid);
  padding: 0.25rem 0.5rem;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all var(--transition-fast);
}
.breadcrumb-bar a:hover { background: var(--primary-50); color: var(--primary); }
.breadcrumb-bar .sep { color: var(--text-muted); }
.breadcrumb-bar .clear-all-link {
  color: var(--danger);
  margin-left: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--r-sm);
  font-weight: 500;
  background: rgba(225, 29, 72, 0.06);
}
.breadcrumb-bar .clear-all-link:hover { background: rgba(225, 29, 72, 0.12); }

/* ---------- 首页 Hero 带 ---------- */
.hero-band {
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
  color: var(--text);
  padding: 3.2rem 0 2.8rem;
  border-bottom: 1px solid var(--border-soft);
}
.hero-band::before,
.hero-band::after {
  display: none;
}
@keyframes orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 22px) scale(1.12); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  position: relative;
  z-index: 1;
}
.hero-subtitle {
  font-size: 1.02rem;
  opacity: 0.88;
  max-width: 600px;
  margin: 0 0 1.2rem;
  position: relative;
  z-index: 1;
}
.hero-stats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: var(--r-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
}

/* ---------- 布局 ---------- */
.main-container {
  display: flex;
  gap: 1.75rem;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

/* ---------- 侧边筛选 ---------- */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: flex-start;
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 2px;
}
.sidebar::-webkit-scrollbar { width: 4px; }

.filter-section {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.85rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.filter-section:hover { box-shadow: var(--shadow-md); }

.filter-section summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  user-select: none;
}
.filter-section summary::-webkit-details-marker { display: none; }
.filter-section summary i { color: var(--primary); font-size: 0.9rem; }
.filter-section summary .count-pill {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.05rem 0.5rem;
  border-radius: var(--r-pill);
}
.filter-section summary .chev {
  margin-left: 0.35rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.25s var(--ease-out);
}
.filter-section[open] summary .chev { transform: rotate(180deg); }

.filter-items { padding: 0 0.5rem 0.6rem; }

.filter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-mid);
  border-left: 2.5px solid transparent;
  transition: all var(--transition-fast);
}
.filter-item:hover { background: var(--bg); color: var(--text-strong); padding-left: 0.75rem; }
.filter-item:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-300);
}
.filter-item:focus-visible { outline: 2px solid var(--primary-400); outline-offset: 1px; }
.filter-item.active {
  background: linear-gradient(90deg, var(--primary-50), transparent);
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), inset 0 -1px 1px rgba(0, 0, 0, 0.05);
  animation: barIn 0.25s var(--ease-out);
}
@keyframes barIn {
  from { transform: translateX(-4px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.filter-item .count {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.05rem 0.45rem;
  border-radius: var(--r-pill);
  font-weight: 500;
}
.filter-item.active .count { background: var(--primary-100); color: var(--primary); }

/* Show-all 展开器（无 JS，checkbox 兄弟选择器） */
.show-all-toggle { display: none; }
.filter-items-full { display: none; }
.show-all-toggle:checked ~ .filter-items-full { display: block; }
.show-all-toggle:checked ~ .show-all-wrap { display: none; }
.show-all-collapse { display: none; }
.show-all-toggle:checked ~ .show-all-collapse { display: flex; }
.show-all-wrap,
.show-all-collapse {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  border-radius: 8px;
  transition: background var(--transition-fast);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), inset 0 -1px 1px rgba(0, 0, 0, 0.05);
}
.show-all-wrap:hover,
.show-all-collapse:hover { background: var(--primary-50); }

/* ---------- 主内容 ---------- */
.content { flex-grow: 1; min-width: 0; }

/* 工具栏 / 搜索 */
.toolbar {
  position: sticky;
  top: calc(var(--header-h) + 10px);
  z-index: 30;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-soft);
  display: flex;
  gap: 0.75rem;
  align-items: center;
  box-shadow: var(--shadow-sm);
}
.search-wrap { flex-grow: 1; position: relative; }
.search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}
.toolbar .form-control {
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.6rem 3rem 0.6rem 2.5rem;
  font-size: 0.92rem;
  background: var(--bg);
  color: var(--text);
  width: 100%;
  transition: all var(--transition-base);
}
.toolbar .form-control::placeholder { color: var(--text-muted); }
.toolbar .form-control:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.16);
  outline: none;
}
.search-clear {
  position: absolute;
  right: 2.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  color: var(--text-muted);
  font-size: 0.7rem;
  transition: all var(--transition-fast);
}
.search-clear:hover { color: var(--danger); background: rgba(225, 29, 72, 0.08); }
.search-submit {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--r-md);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), inset 0 -1px 1px rgba(0, 0, 0, 0.07), var(--shadow-primary);
}
.search-submit:hover { filter: brightness(1.08); }

/* 搜索建议 */
.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  overflow: hidden;
  animation: dropIn 0.18s var(--ease-out);
  transform-origin: top;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.suggestion-item {
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-mid);
  transition: background var(--transition-fast);
}
.suggestion-item:hover { background: var(--primary-50); color: var(--primary); }
.suggestion-item i { color: var(--primary); font-size: 0.85rem; }
.suggestion-item .name-en { color: var(--text-strong); font-weight: 500; }
.suggestion-item .name-cn { color: var(--text-light); font-size: 0.78rem; }

.toolbar .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.55rem 2rem 0.55rem 0.8rem;
  font-size: 0.88rem;
  max-width: 168px;
  background-color: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}
.toolbar .form-select:hover { border-color: var(--primary-300); }
.toolbar .form-select:focus { border-color: var(--primary); outline: none; }

/* 活跃筛选标签 */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  align-items: center;
}
.active-filter-tag {
  background: linear-gradient(90deg, var(--primary-50), var(--primary-100));
  color: var(--primary);
  padding: 0.32rem 0.7rem;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  border: 1px solid rgba(0, 122, 255, 0.2);
  animation: tagIn 0.25s var(--ease-out);
}
@keyframes tagIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.active-filter-tag a { opacity: 0.55; font-size: 1rem; line-height: 1; transition: opacity 0.15s; }
.active-filter-tag a:hover { opacity: 1; }

/* 结果统计（吸顶） */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.55rem 0.9rem;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.results-header .count { color: var(--text-light); font-size: 0.85rem; }
.results-header .count strong { color: var(--primary); font-weight: 700; }
.results-header .stat-pill {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  padding: 0.3rem 0.9rem;
  border-radius: var(--r-pill);
  font-size: 0.8rem;
  color: var(--text-light);
  box-shadow: var(--shadow-sm);
}

/* ---------- 模型卡片网格 ---------- */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.25rem;
}
.model-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 1.3rem;
  box-shadow: var(--shadow-sm);
  animation: cardIn 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
  animation-delay: var(--d, 0ms);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.model-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-400), var(--primary-300));
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: all 0.35s var(--ease-out);
}
.model-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-primary-lg);
  border-color: transparent;
}
.model-card:hover::before { opacity: 1; transform: scaleX(1); }
.model-card:active { transform: scale(0.985); }

.vendor-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  align-self: flex-start;
  background: linear-gradient(90deg, var(--primary-100), var(--primary-50));
  color: var(--primary-600);
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-sm);
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  letter-spacing: 0.01em;
}
.vendor-tag i { font-size: 0.72rem; }

.model-card .name { margin: 0 0 0.25rem; }
.model-card .name a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.01em;
  line-height: 1.35;
  transition: color 0.2s;
}
.model-card .name a:hover { color: var(--primary); }
.model-card .name a::after {
  content: '\F138'; /* bi-box-arrow-up-right */
  font-family: 'bootstrap-icons';
  font-size: 0.72rem;
  opacity: 0;
  transform: translate(-4px, 0);
  transition: all 0.25s var(--ease-out);
}
.model-card .name a:hover::after { opacity: 0.7; transform: none; }

.model-card .model-id {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-light);
  margin: 0 0 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-card .badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.8rem; }
.badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--r-sm);
  background: var(--bg-soft);
  color: var(--text-mid);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.badge i { font-size: 0.7rem; }
.badge.framework { background: rgba(52, 199, 89, 0.1); color: #34c759; }
[data-theme="dark"] .badge.framework { color: #30d158; }
.badge.format { background: rgba(255, 149, 0, 0.12); color: #c93400; }
[data-theme="dark"] .badge.format { color: #ff9f0a; }
.badge.target { background: rgba(0, 122, 255, 0.1); color: #007aff; }
[data-theme="dark"] .badge.target { color: #64b5ff; }
.badge.context { background: rgba(0, 122, 255, 0.1); color: #007aff; }
[data-theme="dark"] .badge.context { color: #409cff; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 0.74rem;
  color: var(--text-light);
  margin-bottom: 0.7rem;
}
.meta-item { display: inline-flex; align-items: center; gap: 0.3rem; }
.meta-item i { color: var(--text-muted); font-size: 0.8rem; }

.model-card .desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-mid);
  font-size: 0.84rem;
  line-height: 1.6;
  margin: 0.4rem 0 0;
  flex-grow: 1;
}

.actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}
.btn-action {
  flex: 1;
  padding: 0.5rem 0.65rem;
  border-radius: var(--r-md);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1.5px solid var(--border);
  color: var(--text-mid);
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 95%, #000));
  transition: all var(--transition-fast);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), inset 0 -1px 1px rgba(0, 0, 0, 0.04);
}
.btn-action:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
  transform: translateY(-1px);
}
.btn-action:active { transform: translateY(0); }
.btn-action.primary {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), inset 0 -1px 1px rgba(0, 0, 0, 0.07), var(--shadow-primary);
}
.btn-action.primary:hover {
  filter: brightness(1.08);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), inset 0 -1px 1px rgba(0, 0, 0, 0.07), var(--shadow-primary-lg);
  color: #fff;
}
/* ---------- 统一按钮（dlx-btn，全站共用） ---------- */
.dlx-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.83rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 95%, #000));
  color: var(--text-mid);
  transition: all 0.15s ease;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), inset 0 -1px 1px rgba(0, 0, 0, 0.04);
  cursor: pointer;
}
.dlx-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.dlx-btn.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 92%, #fff) 0%, var(--primary) 100%);
  border-color: var(--primary);
  color: #fff;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), inset 0 -1px 1px rgba(0, 0, 0, 0.07);
}
.dlx-btn.primary:hover {
  opacity: 0.88;
  color: #fff;
  border-color: var(--primary);
}
.dlx-btn.lg {
  padding: 11px 24px;
  font-size: 0.9rem;
  border-radius: 12px;
}
.dlx-btn.primary.lg {
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), inset 0 -1px 1px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 113, 227, 0.28);
}

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  margin-top: 2rem;
}
.pagination a,
.pagination span {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.65rem;
  border-radius: var(--r-md);
  color: var(--text-mid);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}
.pagination a { background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 95%, #000)); border: 1px solid var(--border); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), inset 0 -1px 1px rgba(0, 0, 0, 0.04); }
.pagination a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), inset 0 -1px 1px rgba(0, 0, 0, 0.07), var(--shadow-primary);
}
[data-theme="dark"] .pagination a:hover {
  background: var(--primary-600);
  border-color: var(--primary-600);
}
.pagination .current {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), inset 0 -1px 1px rgba(0, 0, 0, 0.07), var(--shadow-primary);
}
.pagination .disabled { color: var(--text-muted); background: var(--bg-soft); cursor: not-allowed; }

/* ---------- 空状态 ---------- */
.empty {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-light);
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1.5px dashed var(--border);
  box-shadow: var(--shadow-sm);
}
.empty i {
  font-size: 3.5rem;
  opacity: 0.18;
  display: block;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.empty h3 { font-size: 1.15rem; margin-bottom: 0.5rem; color: var(--text-strong); font-weight: 700; }

/* ---------- 页脚 ---------- */
.site-footer {
  text-align: center;
  color: var(--text-light);
  padding: 2.5rem 1rem;
  font-size: 0.82rem;
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
}
.site-footer a { color: var(--primary); text-decoration: none; font-weight: 500; }
.site-footer a:hover { text-decoration: underline; }

/* ============================================================
   详情页
   ============================================================ */

/* 返回链接 */
.back-link {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--r-md);
  transition: all var(--transition-fast);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), inset 0 -1px 1px rgba(0, 0, 0, 0.05);
}
.back-link:hover { color: var(--primary); background: var(--primary-50); }

/* 详情粘性子导航 TOC */
.detail-subnav {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  backdrop-filter: blur(10px) saturate(1.3);
  border-bottom: 1px solid var(--border-soft);
  padding: 0.55rem 0;
  margin-bottom: 1.25rem;
}
.detail-subnav-inner {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.detail-subnav-inner::-webkit-scrollbar { display: none; }
.detail-subnav a {
  flex-shrink: 0;
  padding: 0.3rem 0.85rem;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 95%, #000));
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), inset 0 -1px 1px rgba(0, 0, 0, 0.04);
}
.detail-subnav a:hover {
  color: var(--primary);
  border-color: var(--primary-300);
  background: var(--primary-50);
}

/* 详情 Hero */
.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
  color: var(--text);
  padding: 2.8rem 2.4rem;
  border-radius: var(--r-xl);
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.detail-hero::before,
.detail-hero::after {
  display: none;
}
.detail-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 0.4rem;
  position: relative;
  z-index: 1;
  word-break: break-word;
}
.detail-hero .subtitle {
  opacity: 0.9;
  font-size: 1rem;
  margin-bottom: 0.7rem;
  position: relative;
  z-index: 1;
}
.detail-hero .model-id-code {
  display: inline-block;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  margin-bottom: 0.9rem;
  position: relative;
  z-index: 1;
}
.detail-hero .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  position: relative;
  z-index: 1;
}
.badge-pill {
  background: var(--bg-soft);
  color: var(--text-light);
  padding: 0.38rem 0.95rem;
  border-radius: var(--r-pill);
  font-size: 0.82rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* 下载条（#download 锚点目标） */
#download { scroll-margin-top: 130px; }
.download-bar {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.06), rgba(0, 113, 227, 0.02));
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: var(--r-lg);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.6rem;
  box-shadow: var(--shadow-sm);
}
.download-bar .label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-strong);
  margin-bottom: 0.6rem;
}
.download-bar .label i { color: var(--success); }
.download-bar .url-display {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 0.65rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-strong);
  word-break: break-all;
  margin-bottom: 0.85rem;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}
.download-bar .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.68rem 1.4rem;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all var(--transition-fast);
}
.download-bar .btn-primary {
  background: linear-gradient(180deg, #0077ed 0%, #0071e3 100%);
  color: #fff;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), inset 0 -1px 1px rgba(0, 0, 0, 0.07), 0 4px 12px rgba(0, 113, 227, 0.22);
}
.download-bar .btn-primary:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), inset 0 -1px 1px rgba(0, 0, 0, 0.07), 0 8px 20px rgba(0, 113, 227, 0.3);
}
.download-bar .btn-copy {
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 95%, #000));
  color: var(--success);
  border-color: rgba(0, 113, 227, 0.35);
  margin-left: 0.5rem;
  cursor: pointer;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), inset 0 -1px 1px rgba(0, 0, 0, 0.04);
}
.download-bar .btn-copy:hover {
  background: rgba(0, 113, 227, 0.05);
  border-color: var(--success);
  transform: translateY(-1px);
}
.download-bar .btn-copy[data-copied-active] { color: var(--primary); border-color: var(--primary-300); }
.download-bar .meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(0, 113, 227, 0.12);
}
.download-bar .meta-item {
  font-size: 0.84rem;
  color: var(--text-mid);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.download-bar .meta-item i { color: var(--success); }
.download-bar .meta-item strong { color: var(--text-strong); font-family: var(--font-mono); font-size: 0.8rem; }

/* 快捷统计 */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.6rem;
}
.quick-stats .stat {
  background: var(--surface);
  padding: 1.1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  text-align: center;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.quick-stats .stat::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2.5px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.25s;
}
.quick-stats .stat:hover {
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-primary);
}
.quick-stats .stat:hover::after { opacity: 1; }
.quick-stats .stat .value {
  font-size: 1.35rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.3;
  letter-spacing: -0.01em;
  word-break: break-word;
}
.quick-stats .stat .label {
  font-size: 0.74rem;
  color: var(--text-light);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* 描述预览 */
.desc-preview {
  background: linear-gradient(135deg, var(--primary-50), rgba(0, 122, 255, 0.06));
  border-left: 4px solid var(--primary);
  padding: 1.1rem 1.3rem;
  border-radius: var(--r-md);
  line-height: 1.7;
  color: var(--text);
  font-size: 0.92rem;
}

/* 字段分组（≥992px 两列，span2 全宽） */
.field-groups { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
@media (min-width: 992px) {
  .field-groups { grid-template-columns: 1fr 1fr; align-items: start; }
  .field-group.span2 { grid-column: 1 / -1; }
}
.field-group {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 138px;
  transition: box-shadow 0.25s;
}
.field-group:hover { box-shadow: var(--shadow-md); }
.field-group h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0 0 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--border-soft);
  color: var(--text-strong);
}
.field-group h3 i {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 0.95rem;
}

.field-table { width: 100%; border-collapse: collapse; }
.field-table tr { border-bottom: 1px solid var(--border-soft); transition: background 0.12s; }
.field-table tr:last-child { border-bottom: none; }
.field-table tr:hover { background: var(--bg); }
.field-table td { padding: 0.72rem 0.5rem; vertical-align: top; }
.field-table td.label { font-weight: 600; color: var(--text-light); width: 30%; font-size: 0.86rem; }
.field-table td.value { color: var(--text-strong); font-size: 0.9rem; word-break: break-word; }
.field-table td.value code {
  background: var(--bg-soft);
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  font-size: 0.83rem;
  color: var(--primary);
  font-family: var(--font-mono);
}
.field-table td.value .code-block {
  display: block;
  background: var(--bg-soft);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  overflow-x: auto;
  margin: 0.2rem 0;
  word-break: break-all;
  font-family: var(--font-mono);
}
.array-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--primary-50);
  color: var(--primary-600);
  padding: 0.22rem 0.6rem;
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  margin: 0.15rem 0.25rem 0.15rem 0;
  border: 1px solid rgba(0, 122, 255, 0.18);
}
.array-tag .tag-key { font-weight: 700; opacity: 0.75; }
.array-tag .tag-val { font-family: var(--font-mono); }
.bool-true { color: var(--success); font-weight: 700; }
.bool-false { color: var(--danger); font-weight: 700; }
.link-url { color: var(--primary); text-decoration: none; word-break: break-all; font-family: var(--font-mono); font-size: 0.82rem; }
.link-url:hover { text-decoration: underline; }
.empty-val { color: var(--text-muted); }

/* JSON 查看器 */
.json-viewer {
  background: #1c1c1e;
  color: #f5f5f7;
  padding: 1.3rem;
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  overflow-x: auto;
  max-height: 520px;
  overflow-y: auto;
  line-height: 1.7;
  border: 1px solid rgba(142, 142, 147, 0.15);
}
[data-theme="dark"] .json-viewer { background: #1c1c1e; }
.json-viewer .key { color: #5ac8fa; }
.json-viewer .str { color: #30d158; }
.json-viewer .num { color: #ff9f0a; }
.json-viewer .bool { color: #ff2d55; }
.json-viewer .null { color: #8e8e93; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .model-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}
@media (max-width: 900px) {
  .main-container { flex-direction: column; }
  .sidebar {
    width: 100%;
    position: static;
    max-height: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .filter-section { margin-bottom: 0; }
  .detail-hero { padding: 2rem 1.5rem; }
  .detail-hero h1 { font-size: 1.7rem; }
}
@media (max-width: 640px) {
  .sidebar { grid-template-columns: 1fr; }
  .model-grid { grid-template-columns: 1fr; }
  .top-nav-inner { padding: 0 1rem; }
  .brand span { display: none; }
  .brand img { height: 30px; }
  .page-container { padding: 0 1rem; }
  .hero-band { padding: 2.4rem 0 2rem; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .form-select { max-width: 100%; }
  .results-header { position: static; }
  .download-bar .btn-copy { margin-left: 0; margin-top: 0.5rem; }
  .quick-stats { grid-template-columns: 1fr 1fr; }
  .field-table td.label { width: 42%; }
  .download-bar .meta { flex-direction: column; gap: 0.5rem; }
}

/* ---------- 动效偏好：全面降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

[data-theme="dark"] .hero-band,
[data-theme="dark"] .detail-hero {
  background: #161617;
}

/* ---------- 多端适配增强（平板 / 手机） ---------- */
@media (max-width: 1100px) {
  .nav-pill { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
  .nav-right { gap: 0.6rem; }
}

@media (max-width: 768px) {
  .top-nav-inner { gap: 0.6rem; }
  .nav-right { gap: 0.45rem; }
  .nav-pill { padding: 0.36rem 0.7rem; font-size: 0.82rem; }
  .lang-btn { padding: 0.28rem 0.65rem; font-size: 0.76rem; }
  .theme-toggle { width: 32px; height: 32px; }
  .brand { font-size: 1.02rem; }
  .hero-band { padding: 2.6rem 0 2.2rem; }
  .toolbar { top: calc(var(--header-h) + 6px); padding: 0.7rem 0.8rem; }
  .results-header { flex-wrap: wrap; gap: 0.5rem; }
  .main-container { gap: 1rem; }
  .detail-hero { padding: 2rem 1.5rem; }
  .detail-hero h1 { font-size: clamp(1.5rem, 5vw, 2.2rem); }
  .detail-hero .model-id-code { word-break: break-all; }
  .download-bar { padding: 1.1rem 1.2rem; }
  .download-bar .btn { flex: 1 1 auto; justify-content: center; }
  .download-bar .url-display { font-size: 0.72rem; }
  .dlx-page { padding-top: 1.5rem; }
}

@media (max-width: 480px) {
  .top-nav { height: auto; min-height: var(--header-h); }
  .top-nav-inner { height: auto; flex-wrap: wrap; padding: 0.5rem 0.75rem; gap: 0.5rem; row-gap: 0.4rem; }
  .nav-right { flex-wrap: wrap; justify-content: flex-end; }
  .nav-right { gap: 0.35rem; }
  .nav-pill { padding: 0.32rem 0.6rem; font-size: 0.76rem; }
  .lang-btn { padding: 0.25rem 0.55rem; font-size: 0.72rem; }
  .lang-switcher { padding: 2px; }
  .theme-toggle { width: 30px; height: 30px; font-size: 0.85rem; }
  .brand img { height: 28px; }
  .hero-band { padding: 2.1rem 0 1.7rem; }
  .hero-title { font-size: clamp(1.45rem, 7vw, 2rem); }
  .hero-subtitle { font-size: 0.92rem; }
  .toolbar { padding: 0.6rem 0.7rem; }
  .results-header { padding: 0.45rem 0.7rem; }
  .filter-item { font-size: 0.82rem; }
  .detail-hero { padding: 1.6rem 1.1rem; border-radius: var(--r-lg); }
  .detail-hero .subtitle { font-size: 0.92rem; }
  .field-table td.label { display: block; width: 100%; padding-bottom: 0.05rem; }
  .field-table td.value { display: block; width: 100%; padding-top: 0.05rem; }
  .download-bar { padding: 0.9rem; }
  .download-bar .btn { padding: 0.6rem 1rem; font-size: 0.85rem; }
  .json-viewer { font-size: 0.72rem; padding: 0.9rem; }
  .site-footer { padding: 14px 10px; font-size: 0.74rem; }
  .breadcrumb-bar { padding: 0 0.75rem; font-size: 0.78rem; }
  .pagination a, .pagination span { min-width: 32px; padding: 0.3rem 0.55rem; font-size: 0.8rem; }
}

/* 详情页驱动版本兼容说明 */
.build-note { display: flex; align-items: flex-start; gap: 0.45rem; margin-top: 0.85rem;
    padding: 0.6rem 0.85rem; border-radius: var(--r-md); background: var(--primary-50);
    border: 1px solid var(--border); color: var(--text-mid); font-size: 0.82rem; line-height: 1.55; }
.build-note i { color: var(--primary); margin-top: 2px; }
[data-theme="dark"] .build-note { background: rgba(10, 132, 255, 0.12); }

/* 详情页排版细节 */
.field-table td.value { word-break: break-word; }
.detail-hero .badges { row-gap: 0.5rem; }
