/* ============================================================
   365Lab 工具库 - 设计系统 v1
   Aurora Toolbox · 亮/暗双主题 · 响应式
   ============================================================ */

/* ---------- 主题变量 ---------- */
:root {
  --bg: #f5f6fb;
  --bg-dot: #dfe3f5;
  --surface: #ffffff;
  --surface-2: #f0f2fa;
  --surface-3: #e8ebf6;
  --text: #1c2033;
  --text-2: #4b5169;
  --text-3: #8a90a8;
  --border: #e5e8f3;
  --border-2: #d6dae9;

  --brand-1: #4f46e5;   /* indigo */
  --brand-2: #7c3aed;   /* violet */
  --brand-3: #db2777;   /* pink */
  --brand-grad: linear-gradient(120deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
  --brand-soft: #eef0ff;

  --c-design: #db2777;
  --c-office: #4f46e5;
  --c-life: #0d9488;
  --c-study: #d97706;

  --shadow-sm: 0 1px 2px rgba(23, 25, 45, .05), 0 1px 3px rgba(23, 25, 45, .06);
  --shadow-md: 0 4px 14px rgba(23, 25, 45, .08), 0 2px 4px rgba(23, 25, 45, .04);
  --shadow-lg: 0 16px 40px rgba(23, 25, 45, .14);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0e1020;
  --bg-dot: #232742;
  --surface: #171a2e;
  --surface-2: #1e2240;
  --surface-3: #262b4d;
  --text: #eef0fb;
  --text-2: #c2c6dd;
  --text-3: #8b90ad;
  --border: #262b47;
  --border-2: #323858;
  --brand-soft: #262b4d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 46px rgba(0, 0, 0, .5);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  transition: background .3s ease, color .3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

main { flex: 1 0 auto; }

::selection { background: rgba(124, 58, 237, .25); }

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

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
::-webkit-scrollbar-track { background: transparent; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }

/* ---------- 头部 ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.header.scrolled { box-shadow: var(--shadow-sm); }

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

.logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: var(--brand-grad);
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(99, 60, 235, .35);
  transition: transform .25s ease;
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.logo-mark svg { width: 22px; height: 22px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-size: 17px; font-weight: 800; letter-spacing: .2px; }
.logo-sub { font-size: 10.5px; font-weight: 700; letter-spacing: 3.5px; color: var(--text-3); }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: all .2s ease;
}
.icon-btn:hover { color: var(--brand-2); border-color: var(--brand-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.icon-btn svg { width: 18px; height: 18px; }

.lang-btn {
  height: 38px; padding: 0 14px; border-radius: 11px;
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); transition: all .2s ease;
  display: flex; align-items: center; gap: 6px;
}
.lang-btn:hover { color: var(--brand-2); border-color: var(--brand-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 46px;
  overflow: hidden;
  text-align: center;
}
.hero::before { /* 点阵背景 */
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--bg-dot) 1.3px, transparent 1.3px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 20%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 20%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(70px);
  opacity: .5; pointer-events: none; animation: orbFloat 12s ease-in-out infinite;
}
.hero-orb.o1 { width: 380px; height: 380px; left: -120px; top: -120px; background: #4f46e5; }
.hero-orb.o2 { width: 320px; height: 320px; right: -100px; top: -60px; background: #db2777; animation-delay: -4s; }
.hero-orb.o3 { width: 280px; height: 280px; left: 42%; top: -140px; background: #0d9488; opacity: .3; animation-delay: -8s; }
@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(26px) scale(1.08); }
}

.hero-inner { position: relative; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 900; letter-spacing: -.5px;
  line-height: 1.15;
}
.hero-title .grad { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero-sub {
  max-width: 640px; margin: 18px auto 0;
  color: var(--text-2); font-size: clamp(14.5px, 1.8vw, 16.5px);
}

/* 搜索框 */
.hero-search {
  max-width: 620px; margin: 30px auto 0;
  position: relative;
}
.hero-search .search-icon {
  position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.hero-search .search-icon svg { width: 19px; height: 19px; }
.hero-search input {
  width: 100%; height: 56px; padding: 0 128px 0 52px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px; color: var(--text);
  box-shadow: var(--shadow-md);
  transition: all .25s ease;
  -webkit-appearance: none; appearance: none;
}
.hero-search input:focus {
  outline: none; border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .14), var(--shadow-md);
}
.hero-search input::placeholder { color: var(--text-3); }
.hero-search .clear-btn {
  position: absolute; right: 96px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-3); background: var(--surface-2);
  font-size: 15px; line-height: 1; opacity: 0; pointer-events: none;
  transition: all .2s ease;
}
.hero-search .clear-btn.show { opacity: 1; pointer-events: auto; }
.hero-search .clear-btn:hover { background: var(--surface-3); color: var(--text); }
.hero-search .search-go {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  height: 42px; padding: 0 22px; border-radius: 999px;
  background: var(--brand-grad); color: #fff;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(99, 60, 235, .35);
  transition: all .2s ease;
}
.hero-search .search-go:hover { transform: translateY(-50%) scale(1.04); filter: brightness(1.08); }

.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 20px rgba(99, 60, 235, .32); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(99, 60, 235, .42); filter: brightness(1.06); }
.btn-ghost { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { transform: translateY(-2px); color: var(--brand-2); border-color: var(--brand-2); box-shadow: var(--shadow-md); }

/* ---------- 主体：单栏 ---------- */
.layout {
  padding: 10px 0 70px;
}

/* 分类筛选栏（工具卡片上方） */
.cat-bar {
  display: flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.cat-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: all .18s ease;
}
.cat-item .cat-ico { font-size: 15px; line-height: 1; }
.cat-item .cat-name { flex: none; }
.cat-item .cat-num {
  font-size: 11px; font-weight: 700;
  min-width: 20px; height: 18px; padding: 0 6px;
  border-radius: 999px; background: var(--surface);
  color: var(--text-3);
  display: grid; place-items: center;
  transition: all .18s ease;
}
.cat-item:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.cat-item.active {
  background: var(--brand-grad); color: #fff; border-color: transparent;
  box-shadow: 0 5px 14px rgba(99, 60, 235, .3);
}
.cat-item.active .cat-num { background: rgba(255, 255, 255, .22); color: #fff; }
.cat-item[data-cat="design"]:not(.active):hover { color: var(--c-design); border-color: var(--c-design); }
.cat-item[data-cat="office"]:not(.active):hover { color: var(--c-office); border-color: var(--c-office); }
.cat-item[data-cat="life"]:not(.active):hover { color: var(--c-life); border-color: var(--c-life); }
.cat-item[data-cat="study"]:not(.active):hover { color: var(--c-study); border-color: var(--c-study); }

/* 工具卡片区 */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 18px;
}

/* 工具卡片 */
.tool-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  overflow: hidden;
}
.tool-card::before { /* hover 顶部渐变条 */
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--brand-grad);
  opacity: 0; transition: opacity .22s ease;
}
.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-2);
}
.tool-card:hover::before { opacity: 1; }

.tc-top { display: flex; align-items: center; gap: 13px; }
.tc-icon {
  width: 56px; height: 56px; border-radius: 15px; flex: none;
  background: var(--surface-2);
  display: grid; place-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border);
  transition: transform .25s ease;
}
.tool-card:hover .tc-icon { transform: scale(1.08) rotate(-3deg); }
.tc-icon img { width: 100%; height: 100%; object-fit: cover; }
.tc-name { font-size: 16.5px; font-weight: 800; line-height: 1.3; }
.tc-cat {
  display: inline-block; margin-top: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  padding: 2.5px 9px; border-radius: 999px;
  color: var(--text-3); background: var(--surface-2);
}
.tc-cat.cat-design { color: var(--c-design); background: color-mix(in srgb, var(--c-design) 12%, transparent); }
.tc-cat.cat-office { color: var(--c-office); background: color-mix(in srgb, var(--c-office) 12%, transparent); }
.tc-cat.cat-life { color: var(--c-life); background: color-mix(in srgb, var(--c-life) 12%, transparent); }
.tc-cat.cat-study { color: var(--c-study); background: color-mix(in srgb, var(--c-study) 12%, transparent); }

.tc-desc {
  font-size: 13.5px; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 44px;
}

.tc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-tag {
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-3);
}

.tc-actions { display: flex; gap: 10px; margin-top: auto; }
.tc-actions .btn {
  height: 40px; border-radius: 12px;
  font-size: 13.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .2s ease;
}
.tc-visit {
  flex: 1; background: var(--brand-grad); color: #fff;
  box-shadow: 0 5px 14px rgba(99, 60, 235, .28);
}
.tc-visit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.tc-detail {
  width: 88px; background: var(--surface); color: var(--text-2);
  border: 1px solid var(--border);
}
.tc-detail:hover { color: var(--brand-2); border-color: var(--brand-2); }
.tc-actions .btn svg { width: 15px; height: 15px; }

/* 空结果 */
.empty-box {
  grid-column: 1 / -1;
  text-align: center; padding: 60px 20px;
  color: var(--text-3);
  border: 1.5px dashed var(--border-2);
  border-radius: var(--radius);
  background: var(--surface);
}
.empty-box .eb-ico { font-size: 40px; margin-bottom: 12px; }

/* 卡片入场动画 */
.fade-in { animation: fadeUp .5s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 详情页 ---------- */
.crumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-3);
  padding: 26px 0 4px;
  flex-wrap: wrap;
}
.crumb a { color: var(--text-3); transition: color .18s; }
.crumb a:hover { color: var(--brand-2); }
.crumb svg { width: 13px; height: 13px; }
.crumb .cur { color: var(--text-2); font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.detail-hero {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 38px 40px;
  margin-top: 16px;
  box-shadow: var(--shadow-md);
  display: flex; gap: 30px; align-items: center;
}
.detail-hero::before {
  content: ""; position: absolute; top: -90px; right: -90px;
  width: 260px; height: 260px; border-radius: 50%;
  background: var(--brand-grad); opacity: .1; filter: blur(30px);
  pointer-events: none;
}
.dh-icon {
  width: 108px; height: 108px; border-radius: 26px; flex: none;
  box-shadow: var(--shadow-lg);
  overflow: hidden; background: var(--surface-2);
  display: grid; place-items: center;
}
.dh-icon img { width: 100%; height: 100%; object-fit: cover; }
.dh-body { flex: 1; min-width: 0; }
.dh-title { font-size: clamp(24px, 3.4vw, 32px); font-weight: 900; letter-spacing: -.4px; line-height: 1.2; }
.dh-tagline {
  margin-top: 6px; font-size: 15.5px; font-weight: 600;
  color: var(--brand-2);
}
.dh-desc { margin-top: 12px; font-size: 14.5px; color: var(--text-2); max-width: 760px; }
.dh-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dh-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.dh-actions .btn { height: 46px; padding: 0 24px; border-radius: 14px; font-size: 14.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; transition: all .22s ease; }
.dh-actions .btn svg { width: 17px; height: 17px; }

/* 区块 */
.section-block { margin-top: 34px; }
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.sec-head .sec-no {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--brand-grad); color: #fff;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(99, 60, 235, .3);
}
.sec-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.2px; }
.sec-head p { font-size: 13px; color: var(--text-3); margin-left: 4px; }

.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all .2s ease;
}
.feat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-2); }
.feat-ico {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  font-size: 19px;
  background: var(--brand-soft);
  margin-bottom: 12px;
}
.feat-card h3 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.feat-card p { font-size: 13.5px; color: var(--text-2); }

.steps { display: grid; gap: 14px; counter-reset: step; }
.step-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: all .2s ease;
}
.step-item:hover { transform: translateX(5px); box-shadow: var(--shadow-md); border-color: var(--border-2); }
.step-num {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--brand-grad); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 10px rgba(99, 60, 235, .28);
}
.step-item h3 { font-size: 15px; font-weight: 800; margin-bottom: 3px; }
.step-item p { font-size: 13.5px; color: var(--text-2); }

/* 相关工具 */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.related-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 15px;
  transition: all .2s ease;
}
.related-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-2); }
.ri-icon { width: 42px; height: 42px; border-radius: 11px; flex: none; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.ri-icon img { width: 100%; height: 100%; object-fit: cover; }
.ri-name { font-size: 14px; font-weight: 700; line-height: 1.3; }
.ri-cat { font-size: 11.5px; color: var(--text-3); }

/* CTA */
.cta-banner {
  position: relative; overflow: hidden;
  margin: 46px 0 10px;
  border-radius: 24px;
  background: var(--brand-grad);
  color: #fff;
  padding: 44px 36px;
  text-align: center;
  box-shadow: 0 18px 44px rgba(99, 60, 235, .35);
}
.cta-banner::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .18) 1.4px, transparent 1.4px);
  background-size: 22px 22px;
  opacity: .5;
}
.cta-banner h2 { position: relative; font-size: clamp(21px, 3vw, 28px); font-weight: 900; }
.cta-banner p { position: relative; margin-top: 10px; font-size: 14.5px; opacity: .92; }
.cta-banner .btn {
  position: relative; margin-top: 22px;
  height: 46px; padding: 0 30px; border-radius: 999px;
  background: #fff; color: var(--brand-2);
  font-size: 15px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
  transition: all .22s ease;
}
.cta-banner .btn:hover { transform: translateY(-2px) scale(1.03); }
.cta-banner .btn svg { width: 17px; height: 17px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 90px 0 110px; }
.notfound-code {
  font-size: clamp(90px, 18vw, 150px); font-weight: 900; line-height: 1;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: 4px;
}
.notfound h1 { font-size: clamp(22px, 3.4vw, 30px); font-weight: 800; margin-top: 14px; }
.notfound p { color: var(--text-2); margin-top: 10px; font-size: 15px; }
.notfound .btn { margin-top: 28px; height: 46px; padding: 0 28px; border-radius: 14px; font-size: 14.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.notfound .btn svg { width: 17px; height: 17px; }

/* ---------- 页脚 ---------- */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 34px;
  padding: 44px 0 34px;
}
.footer h3 { font-size: 14px; font-weight: 800; margin-bottom: 14px; letter-spacing: .3px; }
.footer-about p { font-size: 13px; color: var(--text-2); line-height: 1.75; max-width: 360px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links a { font-size: 13.5px; color: var(--text-2); transition: all .18s; display: inline-flex; align-items: center; gap: 7px; }
.footer-links a::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--border-2); transition: all .18s; }
.footer-links a:hover { color: var(--brand-2); transform: translateX(3px); }
.footer-links a:hover::before { background: var(--brand-2); }
.footer-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-tags a {
  font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border);
  transition: all .18s;
}
.footer-tags a:hover { color: #fff; background: var(--brand-grad); border-color: transparent; transform: translateY(-1px); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-3);
}
.footer-bottom .fb-right { display: flex; gap: 18px; }
.footer-bottom a { transition: color .18s; }
.footer-bottom a:hover { color: var(--brand-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg);
  padding: 12px 22px; border-radius: 12px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: all .3s ease;
  z-index: 999;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .layout { padding: 4px 0 60px; }
  .cat-bar { padding: 8px 10px; border-radius: 14px; }
  .cat-item { padding: 7px 12px; font-size: 13px; }
  .cat-item .cat-num { display: none; }
  .detail-hero { flex-direction: column; text-align: center; padding: 30px 22px; }
  .dh-actions, .dh-meta { justify-content: center; }
  .footer-inner { grid-template-columns: 1fr; gap: 26px; }
  .hero { padding: 54px 0 36px; }
}

@media (max-width: 520px) {
  .container { width: calc(100% - 28px); }
  .logo-sub { display: none; }
  .hero-search input { padding: 0 96px 0 48px; }
  .hero-search .search-go { padding: 0 16px; font-size: 13px; }
  .hero-search .clear-btn { right: 74px; }
  .tool-grid { grid-template-columns: 1fr; }
  .header-inner { gap: 10px; }
  .lang-btn { padding: 0 11px; }
}

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