:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --accent: #06b6d4;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

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

[v-cloak] { display: none; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.logo-mark {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  padding: 4px 8px;
  border-radius: 8px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
}
.nav-links { display: flex; gap: 20px; flex: 1; }
.nav-links a { color: var(--muted); font-size: 15px; transition: color .2s; }
.nav-links a:hover { color: var(--primary); }
.nav-user { display: flex; align-items: center; gap: 12px; }
.user-name { font-size: 14px; color: var(--muted); }
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  padding: 10px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .2s, opacity .2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.mobile-nav { display: none; }
.mobile-nav-user {
  margin-left: auto;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 9px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: all .2s;
  font-family: inherit;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
}
.btn.primary:hover { opacity: .92; color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.active { background: #eef2ff; border-color: var(--primary); color: var(--primary); }

/* ---------- 页面容器 ---------- */
.page { max-width: 1160px; margin: 0 auto; padding: 32px 24px 80px; }

/* ---------- 首页 ---------- */
.hero { text-align: center; padding: 48px 0 32px; }
.hero h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub { color: var(--muted); margin-top: 12px; font-size: 16px; }

.search-box {
  max-width: 760px;
  margin: 32px auto 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.search-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.search-tabs button {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  font-family: inherit;
}
.search-tabs button.active { background: #eef2ff; color: var(--primary); font-weight: 600; }
.search-main { display: flex; gap: 10px; }
.search-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.search-input:focus { border-color: var(--primary); }
.search-main .btn { padding: 0 28px; font-size: 15px; }
.upload-label {
  flex: 1;
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}
.upload-label:hover { border-color: var(--primary); color: var(--primary); }

.search-hint {
  margin: 10px 4px 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  text-align: left;
}

.filter-panel {
  margin: 0 0 22px;
  padding: 4px 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  box-shadow: 0 18px 50px -28px rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(12px);
}
.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
}
.filter-row + .filter-row { border-top: 1px solid rgba(226, 232, 240, 0.8); }
.filter-label {
  flex: 0 0 44px;
  padding-top: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #94a3b8;
}
.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.fchip {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.45;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s, transform .18s;
}
.fchip:hover {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.fchip.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 8px 18px -8px rgba(79, 70, 229, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.filter-clear {
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
  padding: 6px 2px 6px 10px;
  border: none;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s;
}
.filter-clear::before { content: '×'; margin-right: 3px; font-size: 15px; line-height: 1; color: #cbd5e1; }
.filter-clear:hover { color: var(--primary); }
.filter-clear:hover::before { color: var(--primary); }

/* ---------- 列表 ---------- */
.list-section { margin-top: 40px; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.list-head h2 { font-size: 22px; }
.count { color: var(--muted); font-size: 14px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c7d2fe; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.lang-badge {
  display: inline-block;
  background: #eef2ff;
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.views { color: var(--muted); font-size: 13px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cat-badge {
  display: inline-block;
  background: #fef3c7;
  color: #b45309;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.badge-featured,
.badge-sponsored {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-featured { background: #fee2e2; color: #b91c1c; }
.badge-sponsored { background: #dcfce7; color: #15803d; }
.lang-switch {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 9px;
  line-height: 1.4;
}
.lang-switch:hover { color: var(--primary); border-color: var(--primary); }
.list-sub { color: var(--muted); font-size: 14px; margin: 6px 0 14px; }
.cat-filters { margin-top: 10px; }
.card-title { font-size: 17px; margin: 12px 0 8px; word-break: break-word; }
.card-desc {
  color: var(--muted);
  font-size: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.card-stats { display: flex; gap: 14px; color: var(--muted); font-size: 12px; margin-top: 10px; }
.tag {
  background: #f1f5f9;
  color: var(--muted);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
}
.card-foot {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.empty { text-align: center; color: var(--muted); padding: 60px 0; }
.muted { color: var(--muted); }

.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 32px; color: var(--muted); }
.load-more { padding: 28px 0 4px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- 详情 ---------- */
.detail-head { margin-bottom: 16px; }
.detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.detail-title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.detail-title-row h1 { font-size: 28px; }
.detail-desc { color: var(--muted); margin-top: 12px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.detail-meta { display: flex; gap: 20px; color: var(--muted); font-size: 14px; margin-top: 16px; flex-wrap: wrap; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.clone-box {
  margin-top: 20px;
  background: #0f172a;
  border-radius: 10px;
  padding: 14px 16px;
}
.clone-label { color: #cbd5e1; font-size: 13px; margin-bottom: 8px; }
.clone-row { display: flex; align-items: center; gap: 12px; }
.clone-row code {
  flex: 1;
  min-width: 0;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  overflow-x: auto;
  white-space: nowrap;
}
.clone-row .btn { flex-shrink: 0; background: #1e293b; border-color: #334155; color: #e2e8f0; }
.clone-row .btn:hover { color: #fff; border-color: #64748b; }
.correction-box { margin-top: 16px; }
.correction-box textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 8px;
  resize: vertical;
}

.readme { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.readme h2 { font-size: 20px; margin-bottom: 16px; }
.markdown { line-height: 1.8; }
.markdown h1, .markdown h2, .markdown h3 { margin: 20px 0 12px; }
.markdown h1 { font-size: 24px; }
.markdown h2 { font-size: 20px; }
.markdown h3 { font-size: 17px; }
.markdown p { margin: 10px 0; }
.markdown pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 14px 0;
  font-size: 13px;
}
.markdown code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.markdown pre code { background: transparent; padding: 0; }
.markdown img { max-width: 100%; border-radius: 8px; }
.markdown ul, .markdown ol { padding-left: 24px; margin: 10px 0; }
.markdown blockquote { border-left: 4px solid var(--primary); padding-left: 14px; color: var(--muted); margin: 12px 0; }
.markdown a { color: var(--primary); }

.comments { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.comments h2 { font-size: 20px; margin-bottom: 16px; }
.comment-editor textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 8px;
  resize: vertical;
}
.comment-list { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.comment { border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.comment-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 6px; }
.comment-head span { color: var(--muted); }
.comment p { font-size: 14px; }

/* ---------- 面板 / 表单 ---------- */
.panel {
  max-width: 560px;
  margin: 24px auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.panel h1 { font-size: 24px; margin-bottom: 10px; }
.panel .muted { font-size: 14px; margin-bottom: 20px; }
.form-item { margin-bottom: 18px; }
.form-item label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-item input, .form-item textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.form-item input:focus { border-color: var(--primary); }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }
.code-row .btn { white-space: nowrap; }
.dev-code { color: var(--primary); font-size: 13px; margin-top: 8px; }
.checkbox-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); margin-bottom: 20px; cursor: pointer; }
.checkbox-row input { width: 18px; height: 18px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 12px; }

/* ---------- 批量分享 ---------- */
.pub-tabs { max-width: 360px; margin-top: 6px; }
.pub-tabs button { flex: 1; background: #f1f5f9; }
.pub-tabs button.active { background: #eef2ff; }
.form-item textarea:focus { border-color: var(--primary); }
.batch-progress { margin-top: 26px; border-top: 1px solid var(--border); padding-top: 20px; }
.batch-summary { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.progress-bar { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); transition: width .3s; }
.batch-counts { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin: 12px 0; }
.batch-counts .ok { color: #16a34a; }
.batch-counts .fail { color: #dc2626; }
.batch-items { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.batch-item { display: flex; gap: 8px; align-items: baseline; padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--border); }
.batch-item:last-child { border-bottom: none; }
.batch-item a { color: var(--primary); text-decoration: none; word-break: break-all; }
.batch-item .it-url { color: var(--text); word-break: break-all; }
.batch-item .it-msg { margin-left: auto; color: var(--muted); white-space: nowrap; padding-left: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; flex: 0 0 auto; }
.dot.success { background: #16a34a; }
.dot.skipped { background: #f59e0b; }
.dot.failed { background: #dc2626; }

/* ---------- 登录 ---------- */
.auth-panel { max-width: 420px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 24px; background: #f1f5f9; padding: 4px; border-radius: 10px; }
.auth-tabs button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
}
.auth-tabs button.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.auth-panel .btn.primary { margin-top: 8px; padding: 12px; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  max-width: 80%;
  text-align: center;
}

.favorites .panel, .publish .panel { max-width: 900px; }

/* ---------- 详情目录 ---------- */
.user-link { cursor: pointer; }
.user-link:hover { color: var(--primary); }
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  align-items: start;
}
.readme-toc {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.toc-inner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.toc-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.toc-link {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  padding: 4px 0 4px 8px;
  border-left: 2px solid transparent;
  word-break: break-word;
}
.toc-link:hover { color: var(--primary); border-left-color: #c7d2fe; }
.toc-link.lvl-1 { font-weight: 600; }
.toc-link.lvl-2 { padding-left: 14px; }
.toc-link.lvl-3 { padding-left: 24px; font-size: 12.5px; }
.markdown h1, .markdown h2, .markdown h3 { scroll-margin-top: 84px; }

/* ---------- 用户中心 ---------- */
.account-panel { max-width: 900px; }
.account-tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0 24px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  flex-wrap: wrap;
}
.account-tabs button {
  flex: 1;
  min-width: 110px;
  border: none;
  background: transparent;
  padding: 9px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
}
.account-tabs button.active {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.share-list { display: flex; flex-direction: column; }
.share-item { border-bottom: 1px solid var(--border); padding: 14px 0; }
.share-item:first-child { padding-top: 0; }
.share-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.share-title { font-size: 16px; font-weight: 600; word-break: break-word; }
.share-title:hover { color: var(--primary); }
.share-meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  color: var(--muted); font-size: 12px; margin-top: 8px;
}
.share-status { color: #16a34a; }
.share-status.off { color: #dc2626; }
.share-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn.danger { color: #dc2626; border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; border-color: #dc2626; color: #dc2626; }
.edit-box {
  margin-top: 14px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.edit-box .form-item { margin-bottom: 12px; }
.edit-actions { display: flex; gap: 8px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-item { flex: 1; }
.form-item select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  outline: none;
}
.form-item select:focus { border-color: var(--primary); }
.my-comments { display: flex; flex-direction: column; gap: 14px; }
.my-comment {
  display: flex; gap: 12px; justify-content: space-between;
  align-items: flex-start; border-bottom: 1px solid var(--border); padding-bottom: 14px;
}
.my-comment-main p { font-size: 14px; word-break: break-word; }
.my-comment-meta {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  color: var(--muted); font-size: 12px; margin-top: 6px;
}
.my-comment-meta a { color: var(--primary); }
.pwd-box { max-width: 420px; }

@media (max-width: 1080px) {
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .readme-toc { display: none; }
}

@media (max-width: 1000px) {
  .nav-inner { padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
  .nav-links, .nav-user { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav {
    display: block;
    flex: 1 0 100%;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    margin-top: 2px;
    padding: 4px 0 8px;
    border-top: 1px solid var(--border);
  }
  .mobile-nav > a {
    display: block;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    color: var(--text);
    font-size: 15px;
  }
  .mobile-nav > a:active { background: #f8fafc; }
  .mobile-nav-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 8px 4px;
  }
}

@media (max-width: 640px) {
  .page { padding: 20px 16px 56px; }
  .hero { padding: 28px 0 20px; }
  .hero h1 { font-size: 26px; letter-spacing: -0.5px; }
  .hero-sub { font-size: 14px; margin-top: 8px; }
  .search-box { margin-top: 20px; padding: 12px; border-radius: 14px; }
  .search-tabs { gap: 4px; margin-bottom: 10px; }
  .search-tabs button { padding: 6px 10px; font-size: 13px; }
  .search-main { flex-direction: column; gap: 8px; }
  .search-main .btn { width: 100%; padding: 12px; }
  .search-input { padding: 12px 14px; font-size: 16px; }
  .upload-label { padding: 12px; }
  .filter-panel { padding: 2px 10px; margin-bottom: 16px; border-radius: 12px; }
  .filter-row { gap: 8px; padding: 10px 0; }
  .filter-label { flex-basis: 32px; padding-top: 6px; font-size: 10px; letter-spacing: 0.06em; }
  .filter-options { gap: 2px; }
  .fchip { padding: 5px 9px; font-size: 12px; }
  .filter-clear { flex-basis: 100%; margin-left: 0; text-align: right; padding: 0 2px 6px; }
  .list-section { margin-top: 24px; }
  .list-head { margin-bottom: 12px; }
  .list-head h2 { font-size: 19px; }
  .list-sub { font-size: 13px; margin: 4px 0 10px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 16px; }
  .card-title { font-size: 16px; }
  .card-desc { font-size: 13px; -webkit-line-clamp: 2; }
  .empty { padding: 40px 0; }
  .pager { flex-wrap: wrap; gap: 10px; margin-top: 24px; }
  .load-more { padding: 20px 0 0; }
  .detail-card { padding: 18px 16px; border-radius: 12px; }
  .detail-title-row { gap: 8px; }
  .detail-title-row h1 { font-size: 22px; }
  .detail-meta { gap: 10px 16px; font-size: 13px; }
  .detail-actions { gap: 8px; margin-top: 18px; }
  .detail-actions .btn { flex: 1 1 auto; }
  .clone-box { padding: 12px; }
  .clone-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .clone-row .btn { width: 100%; }
  .readme { margin-top: 24px; padding-top: 18px; }
  .markdown { font-size: 14px; }
  .markdown h1 { font-size: 21px; }
  .markdown h2 { font-size: 18px; }
  .markdown h3 { font-size: 16px; }
  .markdown pre { padding: 12px; font-size: 12px; }
  .markdown table { display: block; width: 100%; overflow-x: auto; }
  .comment-head { flex-wrap: wrap; gap: 4px; }
  .panel { margin: 12px auto; padding: 20px 16px; border-radius: 12px; }
  .panel h1 { font-size: 21px; }
  .form-row { flex-direction: column; gap: 0; }
  .form-item input, .form-item textarea, .form-item select { padding: 11px 12px; font-size: 16px; }
  .code-row { flex-direction: column; }
  .code-row .btn { width: 100%; }
  .account-tabs { gap: 6px; }
  .account-tabs button { flex: 1 1 calc(50% - 6px); min-width: 0; padding: 8px; font-size: 13px; }
  .share-row { flex-direction: column; gap: 8px; }
  .share-actions { width: 100%; }
  .share-actions .btn { flex: 1; }
  .my-comment { flex-direction: column; gap: 8px; }
  .my-comment .btn { align-self: flex-end; }
  .edit-box { padding: 12px; }
  .batch-counts { flex-wrap: wrap; gap: 8px 14px; }
  .batch-item { flex-wrap: wrap; }
  .batch-item .it-msg { width: 100%; margin-left: 16px; padding-left: 0; white-space: normal; }
  .auth-panel { padding: 20px 16px; }
  .toast { bottom: 20px; max-width: calc(100% - 32px); padding: 10px 16px; font-size: 13px; }
}

/* ---------- 站点页脚 ---------- */
.site-footer { background: #0f172a; color: #cbd5e1; }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 40px 24px 24px; }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-brand { max-width: 420px; }
.footer-brand .logo { color: #fff; }
.footer-brand-desc { color: #94a3b8; font-size: 14px; margin-top: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; align-content: flex-start; }
.footer-links a { color: #cbd5e1; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-note {
  color: #94a3b8; font-size: 12.5px; line-height: 1.75;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid #1e293b;
}
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
  margin-top: 16px; color: #94a3b8; font-size: 13px;
}
.footer-bottom a { color: #cbd5e1; }
.footer-bottom a:hover { color: #fff; }
.footer-report-email { margin-left: auto; }

/* ---------- 法律条款 ---------- */
.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.legal-nav {
  position: sticky; top: 88px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.legal-nav-title { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.legal-nav a { padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--muted); }
.legal-nav a:hover { background: #f1f5f9; color: var(--primary); }
.legal-nav a.active { background: #eef2ff; color: var(--primary); font-weight: 600; }
.legal-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 40px; box-shadow: var(--shadow);
}
.legal-card h1 { font-size: 26px; margin-bottom: 8px; }
.legal-updated { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.legal-summary {
  background: #f8fafc; border-left: 3px solid var(--primary);
  padding: 12px 16px; border-radius: 0 8px 8px 0;
  color: var(--muted); font-size: 14px; margin-bottom: 12px;
}
.legal-card section { margin-top: 24px; }
.legal-card h2 { font-size: 18px; margin-bottom: 10px; scroll-margin-top: 84px; }
.legal-card section p { font-size: 14.5px; color: #334155; margin: 8px 0; line-height: 1.85; }
.legal-actions {
  display: flex; gap: 10px; margin-top: 32px;
  padding-top: 20px; border-top: 1px solid var(--border);
}

/* ---------- 侵权举报 ---------- */
.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}
.report-main { max-width: none; margin: 0; }
.report-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.report-email-box { background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 10px; padding: 14px 16px; }
.report-email-box .label { font-size: 13px; color: var(--muted); }
.report-email-box a { color: var(--primary); font-weight: 700; font-size: 16px; }
.report-h2 { font-size: 18px; margin: 26px 0 16px; }
.report-main .btn.primary { padding: 12px 28px; }
.report-side { display: flex; flex-direction: column; gap: 16px; }
.side-card { max-width: none; margin: 0; padding: 20px; }
.side-card h2 { font-size: 15px; margin-bottom: 10px; }
.side-card ol { padding-left: 20px; color: var(--muted); font-size: 13.5px; line-height: 1.8; }
.side-card p { font-size: 13.5px; }
.report-success {
  background: #ecfdf5; border: 1px solid #a7f3d0;
  border-radius: 12px; padding: 24px; margin-top: 20px;
}
.report-success h2 { font-size: 18px; color: #047857; margin-bottom: 8px; }
.report-success p { font-size: 14px; }
.report-success .btn { margin-top: 16px; }

/* ---------- 浏览器插件下载 ---------- */
.ext-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 320px;
  gap: 32px;
  align-items: center;
  padding: 36px 32px;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 55%, #ecfeff 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
}
.ext-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #c7d2fe;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
}
.ext-hero h1 {
  margin: 14px 0 10px;
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: -.5px;
}
.ext-sub {
  color: #475569;
  font-size: 14.5px;
  line-height: 1.85;
  max-width: 620px;
}
.ext-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.ext-actions .btn { padding: 11px 22px; font-size: 14.5px; }
.ext-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed #cbd5e1;
  list-style: none;
  font-size: 13px;
  color: #334155;
}
.ext-meta li span { color: var(--muted); margin-right: 6px; }
.ext-meta li.wide { flex-basis: 100%; }

.ext-demo { text-align: center; }
.ext-card {
  width: 272px;
  margin: 0 auto;
  padding: 14px 16px 13px;
  text-align: left;
  background: #fff;
  border: 1px solid #e5e9f2;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(15, 32, 71, .14), 0 2px 6px rgba(15, 32, 71, .06);
}
.ext-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #7b869c;
}
.ext-card-logo {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.ext-card-close { margin-left: auto; color: #b3bbc9; font-size: 15px; }
.ext-card-title { margin-top: 8px; font-size: 14px; font-weight: 600; color: #14203a; }
.ext-card-repo { margin-top: 5px; font-size: 12px; color: #7b869c; }
.ext-card-actions { display: flex; gap: 8px; margin-top: 12px; }
.ext-demo-btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1;
  border: 1px solid transparent;
}
.ext-demo-btn.primary { flex: 1; background: #2563eb; color: #fff; text-align: center; }
.ext-demo-btn.ghost { background: #fff; border-color: #dfe4ee; color: #5b6478; }
.ext-demo-note { margin-top: 12px; font-size: 12px; color: var(--muted); }

.ext-account {
  margin-top: 20px;
  padding: 16px 20px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
}
.ext-account strong { display: block; font-size: 15px; color: #92400e; margin-bottom: 6px; }
.ext-account p { font-size: 13.5px; line-height: 1.85; color: #78350f; }

.ext-section {
  margin-top: 26px;
  padding: 28px 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ext-section h2 { font-size: 20px; margin-bottom: 14px; }
.ext-lead { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.ext-note {
  margin-top: 16px;
  padding: 12px 14px;
  background: #f8fafc;
  border-left: 3px solid #c7d2fe;
  border-radius: 6px;
  font-size: 13px;
  color: #475569;
  line-height: 1.8;
}

.ext-steps { list-style: none; display: grid; gap: 14px; }
.ext-steps li {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #eef2f8;
  border-radius: 10px;
}
.ext-step-no {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
}
.ext-step-body strong { display: block; font-size: 14.5px; margin-bottom: 3px; }
.ext-step-body p { color: var(--muted); font-size: 13.5px; line-height: 1.8; }

.ext-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.ext-usage {
  padding: 16px 16px 16px 18px;
  background: #f8fafc;
  border: 1px solid #eef2f8;
  border-radius: 10px;
}
.ext-usage-no {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}
.ext-usage strong { display: block; font-size: 14.5px; margin-bottom: 4px; }
.ext-usage p { color: var(--muted); font-size: 13.5px; line-height: 1.8; }

.ext-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ext-chips span {
  padding: 7px 14px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 13px;
  font-weight: 600;
}

.ext-faq { display: grid; gap: 10px; }
.ext-faq details {
  border: 1px solid #eef2f8;
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px 16px;
}
.ext-faq summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
}
.ext-faq summary::-webkit-details-marker { display: none; }
.ext-faq summary::before { content: "＋"; color: var(--primary); margin-right: 8px; font-weight: 700; }
.ext-faq details[open] summary::before { content: "－"; }
.ext-faq p { margin-top: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.85; }

.ext-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  padding: 24px 32px;
  background: linear-gradient(135deg, #1e293b, #312e81);
  border-radius: var(--radius);
  color: #fff;
}
.ext-cta strong { display: block; font-size: 17px; margin-bottom: 4px; }
.ext-cta p { color: #c7d2fe; font-size: 13.5px; }
.ext-cta .btn.primary { background: #fff; color: #312e81; border-color: #fff; }

@media (max-width: 1080px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); }
  .legal-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .legal-nav-title { width: 100%; margin-bottom: 4px; }
  .report-layout { grid-template-columns: minmax(0, 1fr); }
  .report-side { display: grid; grid-template-columns: 1fr 1fr; }
  .ext-hero { grid-template-columns: minmax(0, 1fr); }
  .ext-demo { order: -1; }
}

@media (max-width: 640px) {
  .footer-inner { padding: 28px 16px 20px; }
  .footer-top { flex-direction: column; gap: 20px; }
  .footer-brand { max-width: none; }
  .footer-links { gap: 10px 20px; }
  .footer-note { margin-top: 20px; padding-top: 16px; }
  .footer-bottom { gap: 8px 14px; font-size: 12.5px; }
  .footer-report-email { margin-left: 0; word-break: break-all; }
  .legal-card { padding: 22px 18px; }
  .legal-card h1 { font-size: 22px; }
  .legal-card section p { font-size: 14px; }
  .legal-actions { flex-wrap: wrap; gap: 8px; }
  .legal-actions .btn { flex: 1 1 auto; text-align: center; }
  .report-email-box a { font-size: 14px; word-break: break-all; }
  .report-main .btn.primary { width: 100%; }
  .report-side { grid-template-columns: 1fr; }
  .ext-hero { padding: 24px 18px; gap: 22px; }
  .ext-hero h1 { font-size: 24px; }
  .ext-sub { font-size: 14px; }
  .ext-actions { flex-direction: column; gap: 10px; }
  .ext-actions .btn { width: 100%; text-align: center; }
  .ext-meta { gap: 6px 16px; font-size: 12.5px; }
  .ext-card { width: 100%; max-width: 300px; }
  .ext-section { margin-top: 18px; padding: 20px 16px; }
  .ext-section h2 { font-size: 18px; }
  .ext-steps li { gap: 10px; padding: 12px 12px; }
  .ext-grid { grid-template-columns: minmax(0, 1fr); }
  .ext-cta { flex-direction: column; align-items: flex-start; padding: 22px 18px; }
  .ext-cta .btn { width: 100%; text-align: center; }
}
