/* SudoCG 分类页 V2 — 与首页统一的内容浏览布局
 * 2026-07-29
 */

.categories-page-body {
  background:#fff;
  color:#18191c;
}
.categories-page-v2.categories-page-v2 {
  width:calc(100% - 16px);
  max-width:none;
  margin:0 auto;
  padding:8px 0 40px;
  background:transparent;
}
.categories-page-v2 .feed-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 250px;
  gap:14px;
  align-items:start;
}
.categories-page-v2 .feed-main {
  min-width:0;
  padding:16px;
  border:1px solid #e3e5e7;
  border-radius:8px;
  background:#fff;
  box-shadow:none;
}

.categories-page-v2 .categories-page-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin:0 0 14px;
  padding:0 0 12px;
  border-bottom:1px solid #e3e5e7;
}
.categories-page-v2 .categories-page-kicker {
  display:block;
  margin-bottom:3px;
  color:#00a1d6;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.categories-page-v2 .categories-page-heading h1 {
  margin:0;
  color:#18191c;
  font-size:20px;
  line-height:1.3;
}
.categories-page-v2 .categories-page-heading p {
  margin:4px 0 0;
  color:#9499a0;
  font-size:12px;
  line-height:1.5;
}
.categories-page-v2 .categories-page-count {
  display:flex;
  flex:0 0 auto;
  align-items:baseline;
  gap:5px;
  color:#9499a0;
  font-size:11px;
}
.categories-page-v2 .categories-page-count strong {
  color:#00a1d6;
  font-size:20px;
}

/* 顶部分类与排序：改成与首页相同的紧凑工具栏 */
.categories-page-v2 .feed-toolbar.feed-toolbar--stack {
  display:grid;
  gap:8px;
  margin:0 0 14px;
  padding:0 0 12px;
  border:0;
  border-bottom:1px solid #e3e5e7;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.categories-page-v2 .feed-toolbar-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
.categories-page-v2 .feed-tabs {
  display:flex;
  align-items:center;
  gap:4px;
  min-width:0;
}
.categories-page-v2 .feed-tabs--category {
  width:100%;
  padding-bottom:2px;
  overflow-x:auto;
  overflow-y:hidden;
  flex-wrap:nowrap;
  scrollbar-width:thin;
}
.categories-page-v2 .feed-tabs--category::-webkit-scrollbar { height:4px; }
.categories-page-v2 .feed-tabs--category::-webkit-scrollbar-thumb { background:#d4d7dc; border-radius:999px; }
.categories-page-v2 .feed-tab.feed-tab {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:auto;
  min-width:0;
  min-height:30px;
  height:30px;
  padding:0 11px;
  border:0;
  border-radius:4px;
  background:transparent;
  color:#61666d;
  box-shadow:none;
  text-decoration:none;
  font-size:12px;
  font-weight:600;
  transform:none;
  transition:color .15s ease,background .15s ease;
}
.categories-page-v2 .feed-tab.feed-tab:hover {
  border:0;
  background:#e8f4fa;
  color:#00a1d6;
  box-shadow:none;
  transform:none;
}
.categories-page-v2 .feed-tab.feed-tab.is-active {
  border:0;
  background:#00a1d6;
  color:#fff;
  box-shadow:none;
}
.categories-page-v2 .feed-tab-main {
  display:inline-flex;
  align-items:center;
  gap:5px;
  white-space:nowrap;
}
.categories-page-v2 .feed-tab-main > span:first-child {
  display:inline-flex;
  width:16px;
  height:16px;
  align-items:center;
  justify-content:center;
}
.categories-page-v2 .feed-tab-main img,
.categories-page-v2 .feed-tab-main svg { width:16px!important; height:16px!important; }
.categories-page-v2 .feed-tab-meta { display:none; }
.categories-page-v2 .feed-tabs--sort { flex-wrap:wrap; }
.categories-page-v2 .feed-month-filter {
  display:flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
}
.categories-page-v2 .feed-month-label { color:#9499a0; font-size:11px; white-space:nowrap; }
.categories-page-v2 .feed-month-input {
  width:135px;
  height:30px;
  padding:0 7px;
  border:1px solid #e3e5e7;
  border-radius:4px;
  background:#fff;
  color:#61666d;
  font:inherit;
  font-size:11px;
}

/* 广告也使用首页的轻量边框视觉 */
.categories-page-v2 .feed-ad-banner {
  margin:0 0 14px;
  overflow:hidden;
  border:1px solid #e3e5e7;
  border-radius:8px;
  box-shadow:none;
}
.categories-page-v2 .feed-ad-banner-media,
.categories-page-v2 .feed-ad-banner-placeholder { border-radius:0; }

/* 卡片区已由 post-cards.css 统一，这里只处理与页面的间距 */
.categories-page-v2 .site-post-grid.site-post-grid {
  margin:0;
  padding:0;
}
.categories-page-v2 .feed-jump-form {
  display:flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  max-width:100%;
  margin:18px auto 0;
  padding:6px 8px;
  gap:7px;
  border:1px solid #e3e5e7;
  border-radius:6px;
  background:#fff;
  box-shadow:none;
  color:#9499a0;
  font-size:11px;
}
.categories-page-v2 .feed-jump-form input {
  width:58px;
  height:28px;
  border:1px solid #e3e5e7;
  border-radius:4px;
}
.categories-page-v2 .feed-jump-form button {
  height:28px;
  padding:0 10px;
  border:0;
  border-radius:4px;
  background:#00a1d6;
  color:#fff;
  font-size:11px;
}
.categories-page-v2 .pagination { margin-top:12px; }
.categories-page-v2 .feed-empty {
  padding:56px 20px;
  border:1px dashed #d9dce1;
  border-radius:8px;
  background:#fafafa;
  color:#9499a0;
}

/* 右侧栏改成首页相同的轻量面板 */
.categories-page-v2 .feed-sidebar {
  display:grid;
  gap:12px;
  position:sticky;
  top:72px;
  min-width:0;
}
.categories-page-v2 .sidebar-card {
  margin:0;
  padding:12px;
  overflow:hidden;
  border:1px solid #e3e5e7;
  border-radius:8px;
  background:#fff;
  box-shadow:none;
}
.categories-page-v2 .sidebar-card h4 {
  margin:0 0 10px;
  padding:0;
  border:0;
  color:#18191c;
  font-size:14px;
}
.categories-page-v2 .sidebar-item,
.categories-page-v2 .sidebar-user-item {
  padding:7px 0;
  border:0;
  border-bottom:1px solid #f0f1f3;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.categories-page-v2 .sidebar-item:last-child,
.categories-page-v2 .sidebar-user-item:last-child { border-bottom:0; }
.categories-page-v2 .sidebar-item:hover,
.categories-page-v2 .sidebar-user-item:hover { background:#f6f7f8; transform:none; }
.categories-page-v2 .sidebar-item-title { color:#18191c; font-size:12px; }
.categories-page-v2 .sidebar-item-meta,
.categories-page-v2 .sidebar-user-level { color:#9499a0; font-size:10px; }
.categories-page-v2 .sidebar-user-name { color:#18191c; font-size:12px; }
.categories-page-v2 .sidebar-user-avatar { width:30px; height:30px; }

/* 黑夜模式 */
html.theme-dark .categories-page-body { background:#0b1220; }
html.theme-dark .categories-page-v2 .feed-main,
html.theme-dark .categories-page-v2 .sidebar-card,
html.theme-dark .categories-page-v2 .feed-month-input,
html.theme-dark .categories-page-v2 .feed-jump-form {
  border-color:#263044;
  background:#111827;
}
html.theme-dark .categories-page-v2 .categories-page-heading,
html.theme-dark .categories-page-v2 .feed-toolbar.feed-toolbar--stack { border-color:#263044; }
html.theme-dark .categories-page-v2 .categories-page-heading h1,
html.theme-dark .categories-page-v2 .sidebar-card h4,
html.theme-dark .categories-page-v2 .sidebar-item-title,
html.theme-dark .categories-page-v2 .sidebar-user-name { color:#e7eefb; }
html.theme-dark .categories-page-v2 .categories-page-heading p,
html.theme-dark .categories-page-v2 .categories-page-count,
html.theme-dark .categories-page-v2 .feed-month-label,
html.theme-dark .categories-page-v2 .feed-month-input { color:#9ca3af; }
html.theme-dark .categories-page-v2 .feed-tab.feed-tab { color:#9ca3af; }
html.theme-dark .categories-page-v2 .feed-tab.feed-tab:hover { background:#1a2a45; color:#4dd0e1; }
html.theme-dark .categories-page-v2 .feed-tab.feed-tab.is-active { background:#00a1d6; color:#fff; }
html.theme-dark .categories-page-v2 .sidebar-item,
html.theme-dark .categories-page-v2 .sidebar-user-item { border-color:#202b3d; }
html.theme-dark .categories-page-v2 .sidebar-item:hover,
html.theme-dark .categories-page-v2 .sidebar-user-item:hover { background:#1a2333; }
html.theme-dark .categories-page-v2 .feed-empty { border-color:#263044; background:#111827; }

@media (max-width:1024px) {
  .categories-page-v2 .feed-layout { grid-template-columns:1fr; }
  .categories-page-v2 .feed-sidebar {
    position:static;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:768px) {
  .categories-page-v2.categories-page-v2 { width:calc(100% - 24px); padding-top:8px; }
  .categories-page-v2 .feed-main { padding:12px; }
  .categories-page-v2 .categories-page-heading { align-items:flex-start; }
  .categories-page-v2 .categories-page-heading h1 { font-size:18px; }
  .categories-page-v2 .categories-page-heading p { max-width:26em; }
  .categories-page-v2 .feed-toolbar-row--controls { align-items:flex-start; flex-direction:column; }
  .categories-page-v2 .feed-tabs--sort { width:100%; flex-wrap:nowrap; overflow-x:auto; }
  .categories-page-v2 .feed-month-filter { width:100%; justify-content:flex-start; }
  .categories-page-v2 .feed-sidebar { grid-template-columns:1fr; }
}
@media (max-width:480px) {
  .categories-page-v2 .categories-page-count { display:none; }
  .categories-page-v2 .feed-tab.feed-tab { padding:0 9px; }
  .categories-page-v2 .feed-month-input { width:128px; }
}
