/* ========== 分类页 ========== */
.filter-rows {
  padding: 8px 0 4px;
  background: #fff;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.2s ease;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 6px var(--page-pad);
}

.filter-row[data-key="type"] {
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  scrollbar-width: none;
}
.filter-row[data-key="type"]::-webkit-scrollbar { display: none; }

.filter-row button {
  flex-shrink: 0;
  font-size: 12px;
  color: #666;
  padding: 5px 12px;
  border-radius: 20px;
  background: #f5f5f5;
  border: none;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.filter-row button.active {
  color: var(--c-primary);
  font-weight: bold;
  background: #e8f7ed;
}

.filter-row[data-key="type"] button {
  font-size: 15px;
  padding: 7px 16px;
}

/* ========== 分页按钮 ========== */
.category-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 18px var(--page-pad) 32px;
}

.pager-btn {
  flex: 0 0 auto;
  min-width: 100px;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--c-primary);
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.pager-btn:active { opacity: 0.8; }
.pager-btn:disabled {
  background: #d0d0d0;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.8;
}

.pager-info {
  font-size: 13px;
  color: #666;
  font-weight: bold;
  min-width: 80px;
  text-align: center;
}

/* ========== 🟢 暗黑模式（系统级 + 手动 .theme-dark 都生效） ========== */
@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .filter-rows {
    background: #1c1c1c;
    border-bottom-color: #2a2a2a;
  }
  html:not(.theme-light) .filter-row button {
    background: #2a2a2a;
    color: #ccc;
  }
  html:not(.theme-light) .filter-row button.active {
    background: #1f4a2c;
    color: #8bd45c;
  }
  html:not(.theme-light) .pager-btn:disabled {
    background: #333; color: #666;
  }
  html:not(.theme-light) .pager-info { color: #aaa; }
}

/* 手动切到暗黑（安卓微信不传递系统主题时的兜底） */
html.theme-dark .filter-rows {
  background: #1c1c1c;
  border-bottom-color: #2a2a2a;
}
html.theme-dark .filter-row button {
  background: #2a2a2a;
  color: #ccc;
}
html.theme-dark .filter-row button.active {
  background: #1f4a2c;
  color: #8bd45c;
}
html.theme-dark .pager-btn:disabled { background: #333; color: #666; }
html.theme-dark .pager-info { color: #aaa; }