/* ============================================================
   AIGC 导航 · 样式表
   1. 变量与基础
   2. 通用组件（按钮 / 卡片 / 面板）
   3. 头部导航
   4. Hero
   5. 工具库（侧栏 / 卡片）
   6. 榜单
   7. 赛事 / 认证 / CTA
   8. 页脚 / 弹层 / 提示
   9. 响应式
   ============================================================ */

/* ---------- 1. 变量与基础 ---------- */
:root {
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-soft: rgba(124, 92, 255, .14);
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1280px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  --bg: #07080d;
  --bg-soft: #0a0c13;
  --bg-elev: #0e111a;
  --panel: rgba(255, 255, 255, .035);
  --panel-solid: #11141d;
  --panel-hover: rgba(255, 255, 255, .06);
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .18);
  --text: #e9ebf4;
  --text-dim: #b6bccd;
  --muted: #8b93a7;
  --shadow: 0 18px 50px -22px rgba(0, 0, 0, .9);
  --glow: 0 0 0 1px rgba(124, 92, 255, .35), 0 22px 60px -28px rgba(124, 92, 255, .55);
  --header-bg: rgba(7, 8, 13, .72);
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --bg-elev: #ffffff;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --panel-hover: #f1f3f9;
  --border: rgba(16, 24, 40, .09);
  --border-strong: rgba(16, 24, 40, .18);
  --text: #10142a;
  --text-dim: #3d4459;
  --muted: #697089;
  --shadow: 0 16px 40px -24px rgba(16, 24, 40, .28);
  --glow: 0 0 0 1px rgba(124, 92, 255, .25), 0 18px 40px -26px rgba(124, 92, 255, .5);
  --header-bg: rgba(246, 247, 251, .78);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

::selection { background: rgba(124, 92, 255, .35); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}
.search-box input:focus-visible,
.form input:focus-visible { outline: none; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
  border: 3px solid var(--bg);
}

/* ---------- 2. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel);
  transition: transform .18s var(--ease), background .18s, border-color .18s, box-shadow .18s;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5b8bff 55%, var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 26px -12px rgba(124, 92, 255, .9);
}
.btn-primary:hover { box-shadow: 0 14px 32px -12px rgba(124, 92, 255, 1); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: var(--panel-hover); border-color: var(--accent); }

.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 9px; }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  transition: background .18s, color .18s, border-color .18s;
}
.icon-btn:hover { background: var(--panel-hover); color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn svg path[d^="M12 20.3"] { fill: currentColor; stroke: none; }

.fav-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  transform: scale(0);
  transition: transform .2s var(--ease);
}
.fav-count.on { transform: scale(1); }

.section { padding: 78px 0; position: relative; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.section-head h2 { font-size: 30px; }
.section-desc { color: var(--muted); font-size: 14px; max-width: 420px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

/* ---------- 3. 头部导航 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.site-header.scrolled { border-bottom-color: var(--border); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 34px;
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), #4f7bff 50%, var(--accent-2));
  box-shadow: 0 8px 20px -8px rgba(124, 92, 255, .9);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 15px; letter-spacing: -.01em; }
.brand-text em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .16em;
  color: var(--muted);
}

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.main-nav a {
  position: relative;
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--text-dim);
  transition: color .18s, background .18s;
}
.main-nav a:hover { color: var(--text); background: var(--panel-hover); }
.main-nav a.active { color: var(--text); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }
.ico-sun { display: none; }
:root[data-theme="light"] .ico-moon { display: none; }
:root[data-theme="light"] .ico-sun { display: block; }

/* ---------- 4. Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 82px) 0 76px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
  animation: float 18s ease-in-out infinite;
}
.orb-1 { width: 460px; height: 460px; background: rgba(124, 92, 255, .55); top: -180px; left: -80px; }
.orb-2 { width: 400px; height: 400px; background: rgba(34, 211, 238, .32); top: -120px; right: 4%; animation-delay: -6s; }
.orb-3 { width: 360px; height: 360px; background: rgba(244, 114, 182, .28); bottom: -220px; left: 42%; animation-delay: -11s; }
:root[data-theme="light"] .orb { opacity: .3; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(24px, 28px, 0) scale(1.07); }
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  opacity: .55;
}

.hero-inner { max-width: 900px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 14px 6px 10px;
  margin-bottom: 24px;
}
.eyebrow b { color: var(--text); }
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, .18);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.hero h1 {
  font-size: clamp(34px, 5.2vw, 60px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.14;
}
.grad {
  background: linear-gradient(100deg, #a78bfa, var(--accent) 35%, #4f9bff 65%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin-top: 20px;
  font-size: 16px;
  color: var(--muted);
  max-width: 560px;
}

/* 搜索 */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  height: 62px;
  padding: 0 8px 0 18px;
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within {
  border-color: rgba(124, 92, 255, .7);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, .14), var(--shadow);
}
.search-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-box kbd {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 7px;
}

.search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
  max-height: 320px;
  overflow: auto;
}
.suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14px;
}
.suggest-item:hover, .suggest-item.hl { background: var(--panel-hover); }
.suggest-item small { margin-left: auto; color: var(--muted); font-size: 12px; }

.hot-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }
.hot-tags .lbl { font-size: 12.5px; color: var(--muted); margin-right: 2px; }
.chip {
  height: 30px;
  padding: 0 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dim);
  font-size: 12.5px;
  transition: all .16s;
}
.chip:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.chip.active {
  background: var(--accent-soft);
  border-color: rgba(124, 92, 255, .55);
  color: var(--text);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 46px 0 0;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  max-width: 660px;
}
.hero-stats > div { background: var(--bg); padding: 16px 18px; }
.hero-stats dt { font-size: 12px; color: var(--muted); }
.hero-stats dd {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

/* 首屏右侧热度卡（桌面端） */
.hero-inner { max-width: 1240px; }
.hero-copy { max-width: 780px; }
.hero-visual { display: none; }

@media (min-width: 1280px) {
  .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 60px;
    align-items: center;
  }
  .hero-visual { display: block; position: relative; }
  .hv-card {
    background: var(--panel-solid);
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
  }
  .hv-main { padding: 16px 16px 12px; animation: hvFloat 9s ease-in-out infinite; }
  @keyframes hvFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
  }
  .hv-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-dim);
    font-family: var(--mono);
    letter-spacing: .08em;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
  .hv-head em {
    margin-left: auto;
    font-style: normal;
    font-size: 9px;
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, .3);
    background: rgba(52, 211, 153, .1);
    border-radius: 4px;
    padding: 1px 5px;
    letter-spacing: .1em;
  }
  .hv-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
  .hv-row { display: flex; align-items: center; gap: 9px; padding: 6px 4px; border-radius: 8px; }
  .hv-row:hover { background: var(--panel-hover); }
  .hv-no { width: 13px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-align: center; }
  .hv-row:nth-child(-n+3) .hv-no { color: var(--accent); font-weight: 700; }
  .hv-tile {
    width: 24px; height: 24px;
    border-radius: 7px;
    display: grid; place-items: center;
    font-size: 11px; font-weight: 700; color: #fff;
    flex: none;
  }
  .hv-name { font-size: 12.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hv-track { width: 44px; height: 3px; border-radius: 2px; background: var(--panel-hover); overflow: hidden; flex: none; }
  .hv-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
  .hv-foot { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--border); font-size: 10.5px; color: var(--muted); }
  .hv-chip {
    position: absolute;
    padding: 7px 12px;
    font-size: 11.5px;
    color: var(--text-dim);
    background: var(--panel-solid);
    border: 1px solid var(--border-strong);
    border-radius: 99px;
    box-shadow: var(--shadow);
    white-space: nowrap;
  }
  .hv-chip-a { top: -18px; left: -46px; transform: rotate(-3deg); animation: hvFloat 7s ease-in-out infinite reverse; }
  .hv-chip-b { bottom: -18px; right: -18px; transform: rotate(2deg); animation: hvFloat 8s ease-in-out infinite; }
}

/* ---------- 5. 工具库 ---------- */
.toolbox { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 26px; align-items: start; }

.side { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.side-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
}
.side-title {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: .12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.cat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cat-list button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-dim);
  font-size: 13.5px;
  text-align: left;
  transition: background .16s, color .16s;
}
.cat-list button:hover { background: var(--panel-hover); color: var(--text); }
.cat-list button.active { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.cat-ico {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 7px;
  font-size: 13px;
  background: var(--panel-hover);
  flex: none;
}
.cat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-count { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-wrap .chip { height: 27px; padding: 0 10px; font-size: 12px; }

.promo { position: relative; overflow: hidden; background: linear-gradient(150deg, rgba(124, 92, 255, .16), rgba(34, 211, 238, .08)); }
.promo-badge {
  display: inline-block;
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: .1em;
  color: var(--accent-2);
  border: 1px solid rgba(34, 211, 238, .35);
  border-radius: 99px;
  padding: 1px 8px;
  margin-bottom: 10px;
}
.promo h3 { font-size: 15px; margin-bottom: 6px; }
.promo p { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }

.tool-main { min-width: 0; }
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.result-meta { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.result-meta strong { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.link-btn {
  border: 0; background: none; padding: 0;
  color: var(--accent); font-size: 12.5px; text-decoration: underline;
  text-underline-offset: 3px;
}

.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.seg-btn {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  transition: all .16s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--panel-hover); color: var(--text); font-weight: 600; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 14px;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 17px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .22s var(--ease), border-color .22s, box-shadow .22s, background .22s;
  animation: cardIn .34s var(--ease) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 92, 255, .45);
  box-shadow: var(--glow);
  background: var(--panel-solid);
}
:root[data-theme="light"] .tool-card:hover { background: #fff; }

.card-top { display: flex; align-items: flex-start; gap: 12px; }
.logo-tile {
  width: 46px; height: 46px;
  flex: none;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 8px 18px -10px rgba(0, 0, 0, .8);
  overflow: hidden;
}
.card-title-wrap { min-width: 0; flex: 1; }
.card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -.01em;
}
.card-title span.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 5px;
  letter-spacing: .02em;
}
.badge.hot { color: #ffb4c4; background: rgba(251, 113, 133, .16); }
.badge.new { color: #8ff0e0; background: rgba(45, 212, 191, .16); }
:root[data-theme="light"] .badge.hot { color: #b4233f; background: rgba(251, 113, 133, .16); }
:root[data-theme="light"] .badge.new { color: #0f766e; background: rgba(45, 212, 191, .18); }

.card-cat { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 41px;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-size: 11px;
  color: var(--text-dim);
  background: var(--panel-hover);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  margin-top: auto;
}
.go-link { font-size: 12.5px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 5px; }
.go-link svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tool-card:hover .go-link { color: var(--accent); }

.fav-toggle {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition: color .16s, background .16s, transform .16s;
}
.fav-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.fav-toggle:hover { background: var(--panel-hover); color: #fb7185; transform: scale(1.08); }
.fav-toggle.on { color: #fb7185; }
.fav-toggle.on svg { fill: currentColor; }

.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-ico { font-size: 34px; margin-bottom: 10px; opacity: .8; }
.empty h3 { color: var(--text); font-size: 17px; margin-bottom: 6px; }
.empty p { font-size: 13.5px; margin-bottom: 18px; }

.load-wrap { display: flex; justify-content: center; margin-top: 26px; }
.btn-load {
  height: 44px;
  padding: 0 26px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text-dim);
  font-size: 13.5px;
  transition: all .18s;
}
.btn-load:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.btn-load[hidden] { display: none; }

/* ---------- 6. 榜单 ---------- */
.rank-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 16px; align-items: start; }
.panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 16px;
}
.panel-title .bar {
  width: 3px; height: 14px;
  border-radius: 2px;
  background: linear-gradient(var(--accent), var(--accent-2));
}

.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; counter-reset: r; }
.rank-list li { counter-increment: r; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 8px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  text-align: left;
  transition: background .16s;
}
.rank-item:hover { background: var(--panel-hover); }
.rank-no {
  width: 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  flex: none;
}
.rank-list li:nth-child(-n+3) .rank-no {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #f97316, #fb7185);
  border-radius: 5px;
  height: 19px;
  line-height: 19px;
}
.rank-list li:nth-child(2) .rank-no { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #1a1f2e; }
.rank-list li:nth-child(3) .rank-no { background: linear-gradient(135deg, #b45309, #d97706); }
.rank-body { display: block; flex: 1; min-width: 0; }
.rank-name { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 550; }
.rank-track { display: block; height: 3px; border-radius: 2px; background: var(--panel-hover); margin-top: 5px; overflow: hidden; }
.rank-fill { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.rank-val { font-size: 11.5px; color: var(--muted); font-family: var(--mono); flex: none; }

.latest-list, .picks-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.latest-item, .pick-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .16s;
}
.latest-item:hover, .pick-item:hover { background: var(--panel-hover); }
.mini-tile {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex: none;
}
.latest-body, .pick-body { display: block; min-width: 0; }
.latest-name, .pick-name { display: block; font-size: 13.5px; font-weight: 550; }
.latest-desc, .pick-desc {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pick-item { align-items: center; }
.pick-quote { font-size: 11.5px; color: var(--muted); font-style: italic; }

/* ---------- 7. 赛事 / 认证 / CTA ---------- */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }

.event-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
  overflow: hidden;
}
.event-card:hover { transform: translateY(-3px); border-color: rgba(124, 92, 255, .4); box-shadow: var(--glow); }
.event-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--accent), var(--accent-2));
  opacity: .8;
}
.event-card.closed::before { background: var(--border-strong); }
.event-top { display: flex; align-items: center; gap: 8px; }
.status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid transparent;
}
.status.open { color: #6ee7b7; background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .3); }
.status.closed { color: var(--muted); background: var(--panel-hover); border-color: var(--border); }
:root[data-theme="light"] .status.open { color: #047857; }
.event-tag { font-size: 11px; color: var(--muted); }
.event-card h3 { font-size: 16px; line-height: 1.4; }
.event-org { font-size: 12px; color: var(--muted); }
.event-prize {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel-hover);
  border-radius: 9px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.event-prize span { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.event-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}
.countdown { font-family: var(--mono); font-size: 12px; color: var(--text-dim); display: flex; gap: 6px; align-items: center; }
.countdown b { color: var(--accent-2); font-weight: 600; }
.event-card.closed .countdown { color: var(--muted); }

.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cert-card {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, background .2s;
}
.cert-card:hover { border-color: rgba(124, 92, 255, .4); background: var(--panel-solid); }
.cert-ico {
  width: 42px; height: 42px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(124, 92, 255, .22), rgba(34, 211, 238, .14));
  font-size: 19px;
}
.cert-body h3 { font-size: 14.5px; margin-bottom: 4px; }
.cert-body p { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.cert-meta { display: flex; gap: 12px; margin-top: 9px; font-size: 11.5px; color: var(--muted); }
.cert-meta b { color: var(--text-dim); font-weight: 600; }

.cta-band { padding: 62px 0; border-top: 1px solid var(--border); background:
  radial-gradient(ellipse 60% 120% at 15% 0%, rgba(124, 92, 255, .18), transparent 70%),
  radial-gradient(ellipse 50% 120% at 90% 100%, rgba(34, 211, 238, .12), transparent 70%); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 34px; flex-wrap: wrap; }
.cta-inner h2 { font-size: 26px; }
.cta-inner p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.cta-form { display: flex; gap: 8px; }
.cta-form input {
  width: 280px;
  height: 44px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--panel-solid);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: 0;
}
.cta-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, .16); }

/* ---------- 8. 页脚 / 弹层 ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 56px 0 26px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 34px;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--border);
}
.footer-brand p { font-size: 13px; color: var(--muted); margin: 14px 0 14px; max-width: 340px; }
.social { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-dim); }
.social a:hover { color: var(--accent); }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col h4 { font-size: 12px; font-family: var(--mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin-bottom: 3px; }
.footer-col a { font-size: 13.5px; color: var(--text-dim); }
.footer-col a:hover { color: var(--accent); }
.footer-note { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 20px;
  font-size: 12px; color: var(--muted);
  font-family: var(--mono);
}

.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(3, 4, 8, .66); backdrop-filter: blur(6px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9);
  animation: pop .24s var(--ease);
}
.modal-sm { width: min(440px, 100%); }
@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border: 0; border-radius: 8px;
  background: var(--panel-hover);
  color: var(--muted);
  font-size: 13px;
}
.modal-close:hover { color: var(--text); }

.modal-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.modal-head .logo-tile { width: 56px; height: 56px; font-size: 23px; border-radius: 15px; }
.modal-head h3 { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.modal-head .card-cat { font-size: 12.5px; }
.modal-desc { font-size: 14px; color: var(--text-dim); line-height: 1.75; margin-bottom: 16px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.modal-sub { font-size: 13px; color: var(--muted); margin: 8px 0 18px; }

.similar { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.similar h4 { font-size: 12px; font-family: var(--mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.similar-list { display: flex; flex-wrap: wrap; gap: 8px; }
.similar-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 12.5px;
  background: var(--panel);
  cursor: pointer;
  transition: border-color .16s, background .16s;
}
.similar-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.similar-item .mini-tile { width: 20px; height: 20px; border-radius: 6px; font-size: 10px; }

.form { display: flex; flex-direction: column; gap: 13px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.form input, .form select {
  height: 42px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--panel-solid);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: 0;
}
.form input:focus, .form select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, .14); }
.form .btn { margin-top: 4px; }

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--panel-solid);
  color: var(--text-dim);
  font-size: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all .22s var(--ease);
}
.to-top.on { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { border-color: var(--accent); color: var(--text); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 200;
  transform: translate(-50%, 16px);
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 10px 18px;
  font-size: 13.5px;
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: all .24s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 9. 响应式 ---------- */
@media (max-width: 1120px) {
  .rank-grid { grid-template-columns: 1fr 1fr; }
  .rank-grid .panel:last-child { grid-column: span 2; }
  .picks-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
}

@media (max-width: 980px) {
  .toolbox { grid-template-columns: 1fr; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; }
  .side-card { flex: 1 1 240px; }
  .side-card.promo { display: none; }
  .cat-list { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .cat-list button { width: auto; }
  .cat-count { margin-left: 2px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 16px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 11px 12px; }
  .main-nav a.active::after { display: none; }
  .menu-btn { display: inline-flex; }
  .header-actions .btn-primary { display: none; }
  .hero { padding-top: calc(var(--header-h) + 54px); }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .rank-grid { grid-template-columns: 1fr; }
  .rank-grid .panel:last-child { grid-column: auto; }
  .picks-list { grid-template-columns: 1fr; }
  .cta-form { width: 100%; }
  .cta-form input { flex: 1; width: auto; min-width: 0; }
}

@media (max-width: 620px) {
  .container { padding: 0 18px; }
  .section { padding: 56px 0; }
  .section-head h2 { font-size: 24px; }
  .section-desc { font-size: 13px; }
  /* 分类改为横向滚动，避免占满首屏 */
  .cat-list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .cat-list::-webkit-scrollbar { display: none; }
  .cat-list button { flex: none; width: auto; }
  .side-card { padding: 14px; }
  .search-box { height: 56px; padding-left: 14px; gap: 8px; flex-wrap: nowrap; }
  .search-box kbd { display: none; }
  .search-box .btn { padding: 0 16px; }
  .search-box input { font-size: 14px; }
  .hero-sub { font-size: 14.5px; }
  .tool-grid { grid-template-columns: 1fr; }
  .event-grid, .cert-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .toolbar { gap: 10px; }
  .modal-card { padding: 22px 18px; }
  .to-top { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   10. 站内 AI 问答助手
   ============================================================ */
.to-top { bottom: 92px; }

.as-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 52px;
  padding: 0 18px 0 8px;
  border: 0;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--accent), #4f7bff 55%, var(--accent-2));
  color: #fff;
  box-shadow: 0 16px 36px -14px rgba(124, 92, 255, .95);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.as-launcher:hover { transform: translateY(-2px); box-shadow: 0 20px 42px -14px rgba(124, 92, 255, 1); }
.as-launcher:active { transform: scale(.98); }
.as-launcher-ico {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  flex: none;
}
.as-launcher-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.as-launcher-txt { font-size: 13.5px; font-weight: 600; letter-spacing: .01em; }
.as-launcher-badge {
  position: absolute;
  top: -3px; right: 2px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 99px;
  background: #fb7185;
  border: 2px solid var(--bg);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}
.as-launcher-badge[hidden] { display: none; }

.as-hint {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 94;
  width: 252px;
  padding: 12px 30px 12px 14px;
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  animation: asIn .3s var(--ease) both;
}
.as-hint b { display: block; font-size: 13px; margin-bottom: 3px; }
.as-hint span { font-size: 12px; color: var(--muted); line-height: 1.5; display: block; }
.as-hint-close {
  position: absolute;
  top: 7px; right: 7px;
  width: 20px; height: 20px;
  border: 0; border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}
.as-hint-close:hover { background: var(--panel-hover); color: var(--text); }
.as-hint[hidden] { display: none; }

.assistant {
  position: fixed;
  right: 22px;
  bottom: 86px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: 382px;
  height: min(640px, calc(100vh - 118px));
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: 0 34px 80px -26px rgba(0, 0, 0, .85);
  overflow: hidden;
  animation: asIn .26s var(--ease) both;
}
.assistant[hidden] { display: none; }
@keyframes asIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
}

.as-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 140% at 0% 0%, rgba(124, 92, 255, .16), transparent 70%),
    var(--bg-elev);
  flex: none;
}
.as-avatar {
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}
.as-id { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.as-id strong { font-size: 13.5px; }
.as-status { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.as-status b { color: var(--text-dim); font-weight: 600; }
.as-status .dot { width: 5px; height: 5px; }
.as-icon {
  width: 30px; height: 30px;
  flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition: background .16s, color .16s;
}
.as-icon:hover { background: var(--panel-hover); color: var(--text); }
.as-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.as-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  background-image: radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0);
  background-size: 22px 22px;
}

.as-msg {
  max-width: 90%;
  font-size: 13.5px;
  line-height: 1.72;
  padding: 10px 13px;
  border-radius: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  animation: asMsg .24s var(--ease) both;
}
@keyframes asMsg {
  from { opacity: 0; transform: translateY(6px); }
}
.as-msg.bot {
  align-self: flex-start;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-top-left-radius: 5px;
  color: var(--text-dim);
}
.as-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), #5b8bff);
  color: #fff;
  border-top-right-radius: 5px;
}
.as-msg.bot strong { color: var(--text); }

.as-tools { display: flex; flex-direction: column; gap: 6px; margin-top: -2px; white-space: normal; align-self: stretch; }
.as-tool {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg-elev);
  cursor: pointer;
  transition: border-color .16s, background .16s;
  text-align: left;
  width: 100%;
  color: inherit;
  font-family: inherit;
  white-space: normal;
  line-height: 1.4;
}
.as-tool:hover { border-color: rgba(124, 92, 255, .5); background: var(--panel-hover); }
.as-tool .mini-tile { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }
.as-tool-main { min-width: 0; flex: 1; }
.as-tool-name { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); }
.as-tool-desc {
  display: block;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.as-tool-go { font-size: 11px; color: var(--accent); flex: none; }

.as-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1px; white-space: normal; align-self: flex-start; }
.as-chip {
  height: 28px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  transition: all .16s;
}
.as-chip:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }

.as-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.as-typing i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: asBlink 1.2s infinite;
}
.as-typing i:nth-child(2) { animation-delay: .18s; }
.as-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes asBlink {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.as-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px 6px;
  border-top: 1px solid var(--border);
  flex: none;
}
.as-input textarea {
  flex: 1;
  min-height: 38px;
  max-height: 96px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--panel-solid);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.45;
  resize: none;
  outline: 0;
  transition: border-color .18s, box-shadow .18s;
}
.as-input textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, .14); }
.as-input textarea::placeholder { color: var(--muted); }
.as-send {
  width: 38px; height: 38px;
  flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #5b8bff);
  color: #fff;
  transition: opacity .16s, transform .16s;
}
.as-send:hover { transform: translateY(-1px); }
.as-send:disabled { opacity: .45; transform: none; cursor: default; }
.as-send svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.as-note {
  flex: none;
  padding: 0 12px 9px;
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 620px) {
  .to-top { right: 14px; bottom: 84px; }
  .as-launcher { right: 14px; bottom: 16px; height: 50px; padding: 0; width: 50px; justify-content: center; }
  .as-launcher-txt { display: none; }
  .as-launcher-ico { width: 34px; height: 34px; background: transparent; }
  .as-hint { display: none !important; }
  .assistant {
    inset: 0;
    width: auto;
    height: auto;
    border-radius: 0;
    border: 0;
    z-index: 130;
  }
  .as-body { padding: 14px 12px 8px; }
  .as-msg { max-width: 92%; }
}

/* ---------- 11. 模型接入设置 ---------- */
.modal-md { width: min(560px, 100%); }

.llm-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.llm-mode {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .16s, background .16s;
}
.llm-mode:hover { border-color: var(--border-strong); }
.llm-mode input { accent-color: var(--accent); margin: 2px 0 0; flex: none; }
.llm-mode b { display: block; font-size: 13px; font-weight: 600; }
.llm-mode em {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 2px;
}
.llm-mode:has(input:checked) {
  border-color: rgba(124, 92, 255, .6);
  background: var(--accent-soft);
}

.llm-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.llm-preset {
  height: 28px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  transition: all .16s;
}
.llm-preset:hover { border-color: var(--accent); color: var(--text); }
.llm-preset.active { border-color: rgba(124, 92, 255, .6); background: var(--accent-soft); color: var(--text); }
.llm-preset i {
  font-style: normal;
  font-size: 9.5px;
  color: var(--accent-2);
  margin-left: 4px;
}

#llmForm .form { gap: 10px; }
.llm-hint { margin-top: 8px; font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.llm-hint a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.llm-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.llm-status { font-size: 12px; color: var(--muted); }
.llm-status.ok { color: #34d399; }
.llm-status.err { color: #fb7185; }
:root[data-theme="light"] .llm-status.ok { color: #047857; }
:root[data-theme="light"] .llm-status.err { color: #be123c; }

.llm-warn {
  margin-top: 14px;
  padding: 8px 11px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  background: var(--panel-hover);
  border-left: 2px solid var(--border-strong);
  border-radius: 0 8px 8px 0;
}
.llm-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }

#llmForm[hidden] { display: none; }

@media (max-width: 620px) {
  .llm-modes { grid-template-columns: 1fr; }
}
