/* ============ AI Tool Hub — 精修主题（浅色 + 暗色） ============ */
:root {
  --primary: #5961f9;
  --primary-2: #8a7cf8;
  --primary-dark: #4549d8;
  --primary-soft: rgba(89, 97, 249, .08);
  --primary-ring: rgba(89, 97, 249, .28);
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #23262b;
  --text-dim: #5f6673;
  --text-faint: #9aa1ae;
  --border: #e9ebf2;
  --border-strong: #dfe2ec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 26, 33, .04), 0 4px 14px rgba(23, 26, 33, .04);
  --shadow-hover: 0 14px 34px rgba(89, 97, 249, .18), 0 2px 8px rgba(23, 26, 33, .06);
  --topbar-bg: rgba(255, 255, 255, .82);
  --footer-bg: #23262f;
  --mark-bg: rgba(89, 97, 249, .16);
  --mesh:
    radial-gradient(640px 320px at 12% -2%, rgba(89, 97, 249, .20), transparent 68%),
    radial-gradient(720px 340px at 52% -4%, rgba(147, 112, 219, .16), transparent 68%),
    radial-gradient(620px 320px at 92% 0%, rgba(34, 193, 255, .14), transparent 66%);
}
html[data-theme="dark"] {
  --bg: #0f1116;
  --card: #171a21;
  --text: #e9ebf2;
  --text-dim: #a5adbd;
  --text-faint: #68707f;
  --border: #232733;
  --border-strong: #2c3140;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .28);
  --shadow-hover: 0 14px 34px rgba(0, 0, 0, .5), 0 0 0 1px rgba(89, 97, 249, .3);
  --topbar-bg: rgba(15, 17, 22, .82);
  --footer-bg: #0b0d11;
  --mark-bg: rgba(122, 129, 247, .3);
  --primary-soft: rgba(89, 97, 249, .14);
  --mesh:
    radial-gradient(640px 320px at 12% -2%, rgba(89, 97, 249, .26), transparent 68%),
    radial-gradient(720px 340px at 52% -4%, rgba(147, 112, 219, .18), transparent 68%),
    radial-gradient(620px 320px at 92% 0%, rgba(34, 193, 255, .12), transparent 66%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 140px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
/* 顶部氛围渐变 */
body::before {
  content: ''; position: fixed; top: 0; left: 0; right: 0; height: 520px; z-index: -1;
  background-image: var(--mesh);
  transition: background-image .3s;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.container { max-width: 1300px; margin: 0 auto; padding: 0 18px; }
::selection { background: var(--primary-ring); color: #fff; }

/* ---------- 滚动进度条 ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 300;
  background: linear-gradient(90deg, #5961f9, #9b6df7, #22c1ff);
  border-radius: 0 2px 2px 0; transition: width .1s linear;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--topbar-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s;
}
.topbar.scrolled { border-bottom-color: var(--border); box-shadow: 0 6px 24px rgba(15, 18, 25, .06); }
.topbar .container { display: flex; align-items: center; height: 60px; gap: 18px; }

.logo { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; flex: none; letter-spacing: .2px; }
.logo .mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #5961f9 0%, #9b6df7 60%, #22c1ff 130%);
  color: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 900;
  box-shadow: 0 4px 14px rgba(89, 97, 249, .4), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.logo .hl { background: linear-gradient(90deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.top-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.top-nav::-webkit-scrollbar { display: none; }
.top-nav a {
  position: relative; padding: 7px 13px; border-radius: 9px; color: var(--text-dim);
  white-space: nowrap; font-size: 13.5px; transition: color .18s, background .18s;
}
.top-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.top-nav a.active { color: #fff; background: linear-gradient(90deg, var(--primary), var(--primary-2)); font-weight: 600; box-shadow: 0 3px 10px rgba(89, 97, 249, .35); }

.search-mini {
  flex: none; display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  padding: 7px 15px; width: 210px; transition: width .25s, box-shadow .25s, border-color .25s;
}
.search-mini:focus-within { width: 270px; border-color: var(--primary-ring); box-shadow: 0 0 0 3px var(--primary-soft); }
.search-mini input { border: 0; background: none; outline: none; width: 100%; font-size: 13px; color: var(--text); }
.search-mini input::placeholder { color: var(--text-faint); }
.search-mini .kbd {
  flex: none; font-size: 11px; color: var(--text-faint); border: 1px solid var(--border-strong);
  border-radius: 5px; padding: 0 5px; line-height: 17px; background: var(--bg);
}

.theme-toggle {
  flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text-dim); font-size: 16px; cursor: pointer;
  display: grid; place-items: center; transition: transform .2s, border-color .2s, color .2s;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary-ring); transform: rotate(-12deg) scale(1.06); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 84px 0 56px; text-align: center; overflow: hidden; }
.hero .orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; pointer-events: none; animation: drift 14s ease-in-out infinite; }
.hero .orb-1 { width: 14px; height: 14px; background: linear-gradient(135deg, #5961f9, #9b6df7); top: 22%; left: 14%; }
.hero .orb-2 { width: 9px; height: 9px; background: linear-gradient(135deg, #22c1ff, #5961f9); top: 34%; right: 16%; animation-delay: -4s; }
.hero .orb-3 { width: 18px; height: 18px; background: linear-gradient(135deg, #f5576c, #f093fb); bottom: 22%; left: 24%; animation-delay: -8s; opacity: .35; }
.hero .orb-4 { width: 8px; height: 8px; background: linear-gradient(135deg, #0ba360, #3cba92); bottom: 30%; right: 24%; animation-delay: -6s; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(14px, -18px); } 66% { transform: translate(-10px, 12px); } }

.hero h1 { font-size: clamp(32px, 4.8vw, 50px); font-weight: 900; letter-spacing: 1px; line-height: 1.25; }
.hero h1 .hl {
  background: linear-gradient(90deg, #5961f9, #9b6df7, #22c1ff, #5961f9);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: 250% 0; } }
.hero p.sub { margin: 16px auto 0; max-width: 640px; color: var(--text-dim); font-size: 15px; }

.hero-search {
  margin: 36px auto 0; max-width: 600px; display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 30px; padding: 8px 8px 8px 24px;
  box-shadow: 0 10px 34px rgba(23, 26, 33, .12); border: 1px solid var(--border);
  transition: box-shadow .25s, border-color .25s;
}
.hero-search:focus-within { border-color: var(--primary-ring); box-shadow: 0 10px 34px rgba(89, 97, 249, .22), 0 0 0 4px var(--primary-soft); }
.hero-search > span { color: var(--text-faint); }
.hero-search input { flex: 1; border: 0; outline: none; font-size: 15px; background: none; color: var(--text); }
.hero-search input::placeholder { color: var(--text-faint); }
.hero-search button {
  flex: none; border: 0; background: linear-gradient(90deg, #5961f9, #7a6df7); color: #fff;
  border-radius: 22px; padding: 10px 30px; font-size: 14.5px; font-weight: 700; cursor: pointer;
  transition: transform .15s, box-shadow .2s, filter .2s; box-shadow: 0 4px 14px rgba(89, 97, 249, .4);
}
.hero-search button:hover { filter: brightness(1.06); box-shadow: 0 6px 20px rgba(89, 97, 249, .5); transform: translateY(-1px); }
.hero-search button:active { transform: scale(.97); }

.hero-tags { margin-top: 22px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.hero-tags button {
  border: 1px solid var(--border); background: var(--card); color: var(--text-dim);
  padding: 5px 16px; border-radius: 999px; font-size: 12.5px; cursor: pointer;
  transition: all .18s; box-shadow: var(--shadow);
}
.hero-tags button:hover { color: #fff; border-color: transparent; background: linear-gradient(90deg, var(--primary), var(--primary-2)); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(89, 97, 249, .35); }

.hero-stats { margin-top: 40px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.stat-pill {
  display: flex; align-items: baseline; gap: 8px; padding: 10px 24px;
  background: var(--card); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow);
}
.stat-pill .num { font-size: 21px; font-weight: 800; background: linear-gradient(90deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-pill .lbl { font-size: 12.5px; color: var(--text-faint); }

/* ---------- 侧边锚点导航（常驻展开，无伸缩） ---------- */
.side-rail {
  position: fixed; left: max(12px, calc((100vw - 1300px) / 2 - 218px)); top: 50%; transform: translateY(-50%);
  width: 202px; z-index: 90; display: none; flex-direction: column;
  background: var(--topbar-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: 18px; padding: 12px 8px;
  box-shadow: var(--shadow); overflow: hidden;
}
.side-rail .sr-title {
  flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: 3px; color: var(--text-faint);
  padding: 3px 12px 10px; white-space: nowrap;
}
.side-rail .sr-list {
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto; scrollbar-width: none;
  /* 尽量拉长：小屏也能尽量多地展示分类，超出才内部滚动 */
  max-height: calc(94vh - 60px);
}
.side-rail .sr-list::-webkit-scrollbar { display: none; }
.side-rail a {
  position: relative; display: flex; align-items: center; gap: 9px; flex: none;
  height: 38px; padding: 0 10px; border-radius: 12px;
  color: var(--text-dim); font-size: 13px; white-space: nowrap;
  transition: background .18s, color .18s;
}
.side-rail a .sr-ico {
  flex: none; width: 26px; text-align: center; font-size: 17px; line-height: 1;
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1);
}
.side-rail a .sr-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
.side-rail a .sr-num {
  flex: none; font-size: 11px; font-weight: 700; color: var(--text-faint);
  background: var(--bg); border: 1px solid var(--border);
  padding: 1px 7px; border-radius: 999px; transition: all .18s;
}
.side-rail a:hover { background: var(--primary-soft); color: var(--primary); }
.side-rail a:hover .sr-ico { transform: scale(1.18) rotate(-4deg); }
.side-rail a.active {
  color: #fff; background: linear-gradient(90deg, var(--primary), var(--primary-2));
  font-weight: 700; box-shadow: 0 4px 14px rgba(89, 97, 249, .4);
}
.side-rail a.active .sr-num { color: #fff; background: rgba(255, 255, 255, .22); border-color: transparent; }
.side-rail a.active::before {
  content: ''; position: absolute; left: -9px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  box-shadow: 2px 0 8px rgba(89, 97, 249, .5);
}
.side-rail a.active:hover { color: #fff; }
@media (min-width: 1440px) { .side-rail { display: flex; } }

/* ---------- 分类区块 ---------- */
.cat-section { margin-bottom: 52px; opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.cat-section.visible { opacity: 1; transform: none; }

.cat-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.cat-head .c-icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 21px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; flex: none;
  box-shadow: 0 6px 16px rgba(89, 97, 249, .35), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.cat-head .c-titles h2 { font-size: 19.5px; font-weight: 800; letter-spacing: .3px; line-height: 1.3; }
.cat-head .c-sub { font-size: 12px; color: var(--text-faint); }
.cat-head .c-sub b { color: var(--primary); font-weight: 700; }
.cat-head .c-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); margin-left: 6px; }

/* ---------- 工具卡片 ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.tool {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 15px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.tool::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(89, 97, 249, .07) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform .6s ease;
}
.tool:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-ring); }
.tool:hover::before { transform: translateX(100%); }
.tool .t-icon {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-size: 16.5px; font-weight: 800; color: #fff; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 3px 8px rgba(23, 26, 33, .18);
  transition: transform .25s ease;
}
.tool:hover .t-icon { transform: scale(1.1) rotate(-4deg); }
.tool .t-info { min-width: 0; flex: 1; }
.tool .t-name { display: block; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .18s; }
.tool:hover .t-name { color: var(--primary); }
.tool .t-desc { display: block; font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.tool .t-arrow {
  flex: none; font-size: 13px; color: var(--primary); opacity: 0;
  transform: translate(-4px, 4px); transition: all .2s ease;
}
.tool:hover .t-arrow { opacity: 1; transform: translate(0, 0); }

.tool mark, .t-name mark, .t-desc mark { background: var(--mark-bg); color: var(--primary); border-radius: 3px; padding: 0 1px; font-weight: 700; }

/* ---------- 搜索提示 / 无结果 ---------- */
.search-hint {
  display: none; align-items: center; gap: 10px; margin-bottom: 22px;
  background: var(--primary-soft); border: 1px solid var(--primary-ring);
  color: var(--primary); border-radius: var(--radius); padding: 11px 18px; font-size: 13.5px;
  animation: hintIn .3s ease;
}
@keyframes hintIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.search-hint b { font-weight: 800; }
.search-hint button { margin-left: auto; border: 0; background: none; color: var(--primary); cursor: pointer; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 6px; transition: background .15s; }
.search-hint button:hover { background: rgba(89, 97, 249, .14); }

.no-result { text-align: center; color: var(--text-faint); padding: 80px 0; display: none; }
.no-result .big { font-size: 48px; margin-bottom: 14px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--footer-bg); color: #a8adb9; margin-top: 72px; padding: 48px 0 0; transition: background .3s; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 36px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 15px; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { font-size: 13px; color: #a8adb9; transition: color .15s, padding-left .15s; }
.footer-grid a:hover { color: #fff; padding-left: 3px; }
.footer-brand p { font-size: 13px; margin-top: 12px; max-width: 300px; line-height: 1.7; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 17px 0; font-size: 12px; color: #7c8090; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed; right: 24px; bottom: 28px; width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border: 0;
  font-size: 17px; cursor: pointer; z-index: 200; display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: all .28s;
  box-shadow: 0 8px 22px rgba(89, 97, 249, .45);
}
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(89, 97, 249, .55); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%) translateY(16px);
  background: rgba(30, 32, 42, .95); color: #fff; padding: 11px 24px; border-radius: 12px;
  font-size: 13.5px; z-index: 400; opacity: 0; pointer-events: none; transition: all .28s;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3); backdrop-filter: blur(6px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) { .tools-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) {
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
  .search-mini { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 56px 0 40px; }
}
@media (max-width: 640px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool { padding: 11px 12px; gap: 9px; }
  .tool .t-icon { width: 34px; height: 34px; font-size: 14px; }
  .hero-stats { gap: 10px; }
  .stat-pill { padding: 8px 16px; }
  .logo .txt { display: none; }
  .cat-head .c-line { display: none; }
  .hero-search button { padding: 9px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .cat-section { opacity: 1; transform: none; }
}

/* ============ 详情页 ============ */
.breadcrumb { padding: 20px 0 0; font-size: 12.5px; color: var(--text-faint); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.breadcrumb a { color: var(--text-dim); transition: color .15s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { opacity: .5; }

.detail-head {
  margin-top: 18px; display: flex; gap: 26px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 30px 32px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.detail-head::before {
  content: ''; position: absolute; top: -60px; right: -60px; width: 240px; height: 240px;
  border-radius: 50%; background: radial-gradient(circle, rgba(89,97,249,.14), transparent 70%);
  pointer-events: none;
}
.dh-icon {
  flex: none; width: 104px; height: 104px; border-radius: 26px; display: grid; place-items: center;
  font-size: 42px; font-weight: 900; color: #fff; text-transform: uppercase;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.32), 0 12px 28px rgba(23,26,33,.22);
}
.dh-body { min-width: 0; flex: 1; }
.dh-cat {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); border: 1px solid var(--primary-ring);
  padding: 3px 12px; border-radius: 999px; transition: all .18s;
}
.dh-cat:hover { background: linear-gradient(90deg, var(--primary), var(--primary-2)); color: #fff; }
.dh-body h1 { font-size: 28px; font-weight: 900; margin: 10px 0 6px; letter-spacing: .3px; }
.dh-desc { color: var(--text-dim); font-size: 14.5px; max-width: 720px; }
.dh-meta { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.dh-meta .m-item {
  font-size: 12px; color: var(--text-dim); background: var(--bg);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px;
}
.dh-actions { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn-visit {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 28px; border-radius: 12px;
  background: linear-gradient(90deg, #5961f9, #7a6df7); color: #fff !important; font-weight: 700; font-size: 14.5px;
  box-shadow: 0 6px 18px rgba(89,97,249,.4); transition: transform .15s, box-shadow .2s, filter .2s; border: 0; cursor: pointer;
}
.btn-visit:hover { filter: brightness(1.07); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(89,97,249,.5); }
.btn-visit:active { transform: scale(.97); }
.btn-round {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); color: var(--text-dim); cursor: pointer; font-size: 17px;
  transition: all .18s; box-shadow: var(--shadow);
}
.btn-round small { font-size: 11px; font-weight: 700; }
.btn-round:hover { color: var(--primary); border-color: var(--primary-ring); transform: translateY(-2px); }
.btn-round.liked { color: #fff; background: linear-gradient(135deg, #f5576c, #f093fb); border-color: transparent; box-shadow: 0 6px 16px rgba(245,87,108,.4); }

.demo-note {
  margin-top: 16px; display: flex; gap: 10px; align-items: flex-start;
  background: rgba(247,151,30,.08); border: 1px solid rgba(247,151,30,.3);
  color: #b26a00; border-radius: 12px; padding: 12px 16px; font-size: 13px;
}
html[data-theme="dark"] .demo-note { color: #ffc65c; }
.demo-note code { background: rgba(0,0,0,.07); border-radius: 4px; padding: 1px 6px; font-size: 12px; }
html[data-theme="dark"] .demo-note code { background: rgba(255,255,255,.1); }

/* 主体两栏 */
.detail-layout { margin-top: 26px; display: grid; grid-template-columns: minmax(0,1fr) 220px; gap: 28px; align-items: start; }
.detail-article {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 34px 38px; box-shadow: var(--shadow); min-width: 0;
}
.detail-article > section { margin-bottom: 36px; scroll-margin-top: 140px; }
.detail-article > section:last-child { margin-bottom: 0; }
.detail-article h2 {
  font-size: 19px; font-weight: 800; margin-bottom: 14px; padding-left: 14px; position: relative; line-height: 1.4;
}
.detail-article h2::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px;
  border-radius: 3px; background: linear-gradient(180deg, var(--primary), var(--primary-2));
}
.detail-article p.body-text { color: var(--text-dim); font-size: 14.5px; line-height: 1.9; }

/* 普通列表 */
.list-plain { display: flex; flex-direction: column; gap: 10px; }
.list-plain li {
  position: relative; padding-left: 22px; color: var(--text-dim); font-size: 14px; line-height: 1.8;
}
.list-plain li::before {
  content: ''; position: absolute; left: 4px; top: 10px; width: 7px; height: 7px;
  border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
.list-plain li b { color: var(--text); font-weight: 700; }

/* 步骤列表 */
.list-steps { counter-reset: step; display: flex; flex-direction: column; gap: 12px; }
.list-steps li {
  counter-increment: step; position: relative; padding: 12px 16px 12px 52px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text-dim); font-size: 14px; line-height: 1.75; transition: border-color .2s, transform .2s;
}
.list-steps li:hover { border-color: var(--primary-ring); transform: translateX(3px); }
.list-steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff;
  font-size: 13px; font-weight: 800; box-shadow: 0 3px 8px rgba(89,97,249,.35);
}
.list-steps li b { color: var(--text); }

/* 键值信息 */
.list-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.list-kv .kv-item {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 11px 15px;
  font-size: 13.5px; color: var(--text-dim); line-height: 1.7;
}
.list-kv .kv-item b { color: var(--text); margin-right: 6px; font-weight: 700; }

/* 对比表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.cmp-table th, .cmp-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); line-height: 1.7; vertical-align: top; }
.cmp-table thead th {
  background: linear-gradient(90deg, rgba(89,97,249,.10), rgba(138,124,248,.07));
  color: var(--text); font-weight: 800; white-space: nowrap; position: sticky; top: 0;
}
.cmp-table thead th:first-child { border-radius: 13px 0 0 0; }
.cmp-table thead th:last-child { border-radius: 0 13px 0 0; }
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table tbody tr:hover td { background: var(--primary-soft); }
.cmp-table td:first-child { font-weight: 700; color: var(--text); white-space: nowrap; }
.cmp-table td:nth-child(2) { color: var(--primary); font-weight: 600; }

/* TOC 侧栏 */
.detail-toc {
  position: sticky; top: 84px; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 12px; box-shadow: var(--shadow);
  max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin;
}
.detail-toc .toc-title { font-size: 12px; font-weight: 800; color: var(--text-faint); padding: 0 10px 10px; letter-spacing: 1px; }
.detail-toc a {
  display: block; padding: 7px 10px; border-radius: 8px; font-size: 12.5px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: all .15s;
  border-left: 2px solid transparent;
}
.detail-toc a:hover { color: var(--primary); background: var(--primary-soft); }
.detail-toc a.active { color: var(--primary); background: var(--primary-soft); border-left-color: var(--primary); font-weight: 700; }

/* 相关工具 */
.similar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* 评论区 */
.comment-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.comment-form textarea {
  width: 100%; min-height: 88px; resize: vertical; padding: 13px 16px; font-size: 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; color: var(--text);
  outline: none; font-family: inherit; transition: border-color .2s, box-shadow .2s;
}
.comment-form textarea:focus { border-color: var(--primary-ring); box-shadow: 0 0 0 3px var(--primary-soft); }
.comment-form .cf-row { display: flex; justify-content: space-between; align-items: center; }
.comment-form .cf-tip { font-size: 12px; color: var(--text-faint); }
.btn-submit {
  border: 0; background: linear-gradient(90deg, var(--primary), var(--primary-2)); color: #fff;
  padding: 9px 26px; border-radius: 10px; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: filter .18s, transform .15s; box-shadow: 0 4px 14px rgba(89,97,249,.35);
}
.btn-submit:hover { filter: brightness(1.07); }
.btn-submit:active { transform: scale(.97); }

.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment {
  display: flex; gap: 13px; padding: 16px 18px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 14px; animation: hintIn .3s ease;
}
.comment .c-avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px;
}
.comment .c-body { min-width: 0; flex: 1; }
.comment .c-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.comment .c-user { font-size: 13.5px; font-weight: 700; }
.comment .c-date { font-size: 11.5px; color: var(--text-faint); }
.comment .c-text { margin-top: 5px; font-size: 13.5px; color: var(--text-dim); line-height: 1.75; }
.comment .c-like {
  margin-top: 8px; border: 0; background: none; color: var(--text-faint); font-size: 12px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; transition: all .15s;
}
.comment .c-like:hover { color: var(--primary); background: var(--primary-soft); }
.comment .c-like.liked { color: #f5576c; font-weight: 700; }

@media (max-width: 1000px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-toc { display: none; }
  .similar-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .detail-head { flex-direction: column; gap: 18px; padding: 24px 22px; }
  .dh-icon { width: 84px; height: 84px; font-size: 34px; border-radius: 22px; }
  .detail-article { padding: 24px 20px; }
  .list-kv { grid-template-columns: 1fr; }
  .similar-grid { grid-template-columns: 1fr; }
  .dh-body h1 { font-size: 23px; }
}

/* ============ 真实 logo 图标 ============ */
.t-icon, .dh-icon { position: relative; overflow: hidden; }
.t-icon img, .dh-icon img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit; display: block; background: #fff;
}

/* ---------- SEO 静态页补充样式（tools.html / tool/*.html / about / privacy） ---------- */
.plain-list { list-style: none; padding: 0; margin: 0 0 8px; columns: 2; column-gap: 28px; }
.plain-list li { padding: 7px 0; border-bottom: 1px dashed var(--line, #eee); font-size: 14px; color: #444; break-inside: avoid; }
.plain-list li a { color: var(--primary, #5961f9); text-decoration: none; font-weight: 600; }
.plain-list li a:hover { text-decoration: underline; }
@media (max-width: 760px) { .plain-list { columns: 1; } }

/* 静态详情页正文排版 */
main article > section { margin: 26px 0; }
main article h2 { font-size: 20px; margin: 0 0 12px; padding-left: 11px; border-left: 4px solid var(--primary, #5961f9); }
main article h3 { font-size: 16px; margin: 18px 0 6px; }
main article p { margin: 0 0 12px; color: #444; line-height: 1.85; }
main article ul, main article ol { padding-left: 22px; margin: 0 0 12px; }
main article li { margin: 6px 0; line-height: 1.8; color: #444; }
main article .btn-primary { background: var(--primary, #5961f9); color: #fff; }
main article .btn-primary:hover { opacity: .9; }
.breadcrumb a { color: var(--primary, #5961f9); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- 选型指南专题页 ---------- */
.pick-card { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px dashed var(--line, #eee); }
.pick-card:last-child { border-bottom: 0; }
.pick-rank { flex: 0 0 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg,#5961f9,#8a7cf8); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.pick-body { flex: 1; min-width: 0; }
.pick-body h3 { font-size: 16px; margin: 2px 0 6px; }
.pick-body h3 a { color: var(--primary, #5961f9); text-decoration: none; }
.pick-body h3 a:hover { text-decoration: underline; }
.pick-body p { margin: 0 0 6px; font-size: 14px; color: #555; line-height: 1.75; }
.pick-link { font-size: 13px; color: #888; text-decoration: none; }
.pick-link:hover { color: var(--primary, #5961f9); }

.faq-item { margin: 0 0 18px; }
.faq-item h3 { font-size: 15.5px; margin: 0 0 6px; color: #222; }
.faq-item p { margin: 0; font-size: 14px; color: #555; line-height: 1.8; }

.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 24px; }
.guide-card { display: block; padding: 20px; border: 1px solid var(--line, #e8e9f3); border-radius: 14px; background: #fff; text-decoration: none; transition: .2s; }
.guide-card:hover { border-color: var(--primary, #5961f9); box-shadow: 0 6px 20px rgba(89,97,249,.12); transform: translateY(-2px); }
.guide-card h3 { font-size: 16px; margin: 0 0 8px; color: #1a1a2e; line-height: 1.45; }
.guide-card p { font-size: 13px; color: #777; margin: 0 0 12px; line-height: 1.7; }
.guide-more { font-size: 12.5px; color: var(--primary, #5961f9); font-weight: 600; }
[data-theme="dark"] .guide-card { background: #1a1b26; border-color: #2a2c3d; }
[data-theme="dark"] .guide-card h3 { color: #e8e9f3; }
.guide-banner { margin: 28px 0 8px; padding: 22px; border-radius: 14px; background: linear-gradient(135deg, rgba(89,97,249,.08), rgba(138,124,248,.12)); border: 1px solid rgba(89,97,249,.18); }
.guide-banner h3 { margin: 0 0 10px; font-size: 17px; }
.guide-banner p { margin: 0 0 12px; font-size: 14px; color: #555; }
.guide-banner-links { display: flex; flex-wrap: wrap; gap: 10px; }
.guide-banner-links a { font-size: 13px; padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--primary, #5961f9); text-decoration: none; border: 1px solid rgba(89,97,249,.25); }
.guide-banner-links a:hover { background: var(--primary, #5961f9); color: #fff; }
