/* ============== 公共样式：HTML 工厂 ============== */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: #1f2329;
  background: #f7f8fa;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* 导航栏 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #f1f2f5;
}
.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-left { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 22px; font-weight: 700; color: #1f2329; text-decoration: none; }
.logo-text { color: #ff6b3d; }
.logo-tag {
  display: inline-block; padding: 2px 8px; font-size: 11px; font-weight: 500;
  color: #ff6b3d; background: #fff2ed; border: 1px solid #ffd5c4;
  border-radius: 4px; margin-left: 6px; vertical-align: middle;
}
.nav-menu { display: flex; align-items: center; gap: 36px; }
.nav-menu a { font-size: 15px; color: #4e5969; transition: color 0.2s; }
.nav-menu a.active { color: #1f2329; font-weight: 600; }
.nav-menu a:hover { color: #ff6b3d; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-icon-btn {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: #4e5969; cursor: pointer;
  border-radius: 6px; transition: background 0.2s;
}
.nav-icon-btn:hover { background: #f5f6f8; }
.nav-icon-btn svg { width: 18px; height: 18px; }
.btn-my-tips {
  display: inline-block; padding: 6px 14px; font-size: 14px; color: #1f2329; background: #ffffff;
  border: 1px solid #e5e6eb; border-radius: 6px; cursor: pointer; transition: all 0.2s;
  text-decoration: none; line-height: 1.4;
}
.btn-my-tips:hover { border-color: #ff6b3d; color: #ff6b3d; }
.btn-admin {
  padding: 6px 14px; font-size: 14px; color: #ffffff; background: #1f2329;
  border: none; border-radius: 6px; cursor: pointer; transition: background 0.2s;
}
.btn-admin:hover { background: #2d3540; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  cursor: pointer;
}
.nav-toggle {
  display: none; width: 36px; height: 36px; align-items: center; justify-content: center;
  background: transparent; border: none; color: #1f2329; cursor: pointer; border-radius: 6px;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-mobile-menu {
  display: none; flex-direction: column; padding: 0 48px 16px; gap: 4px;
  background: #ffffff; border-top: 1px solid #f1f2f5;
}
.nav-mobile-menu a { padding: 10px 0; font-size: 15px; color: #4e5969; border-bottom: 1px solid #f7f8fa; }
.nav-mobile-menu a.active { color: #ff6b3d; font-weight: 600; }
.nav-mobile-actions { display: flex; gap: 12px; margin-top: 12px; }
.nav-mobile-actions button { flex: 1; }

/* 页面容器 */
.page-wrap { max-width: 1280px; margin: 0 auto; padding: 24px 48px 48px; }

/* 页面标题（标题+搜索同一行） */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.page-header-left { flex-shrink: 0; }
.page-title { font-size: 26px; font-weight: 700; color: #1f2329; }
.page-subtitle { font-size: 14px; color: #86909c; margin-top: 4px; }
.page-header-search {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  height: 40px;
}
.page-header-search .filter-input {
  width: 280px;
  flex: none;
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  color: #1f2329;
  background: #ffffff;
  border: 1px solid #e5e6eb;
  border-right: none;
  border-radius: 8px 0 0 8px;
  outline: none;
  transition: border-color 0.2s;
}
.page-header-search .filter-input::placeholder { color: #c9cdd4; }
.page-header-search .filter-input:focus { border-color: #ff6b3d; }
.page-header-search .filter-input:focus + .btn-search {
  border-color: #ff6b3d;
}
.page-header-search .btn-search {
  height: 40px;
  padding: 0 20px;
  font-size: 14px;
  color: #ffffff;
  background: #ff6b3d;
  border: 1px solid #ff6b3d;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-header-search .btn-search:hover { background: #ff5722; border-color: #ff5722; }

/* 筛选栏 */
.filter-bar {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-label { font-size: 14px; color: #4e5969; white-space: nowrap; }
.filter-select, .filter-input {
  height: 36px; padding: 0 14px; font-size: 14px; color: #1f2329;
  background: #f7f8fa; border: 1px solid #e5e6eb; border-radius: 6px;
  outline: none; transition: border-color 0.2s;
}
.filter-select:focus, .filter-input:focus { border-color: #ff6b3d; }
.filter-input::placeholder { color: #c9cdd4; }
.filter-input { flex: 1; min-width: 200px; }
.btn-search {
  height: 36px; padding: 0 20px; font-size: 14px; color: #ffffff; background: #ff6b3d;
  border: 1px solid #ff6b3d; border-radius: 6px; cursor: pointer; transition: background 0.2s, border-color 0.2s; white-space: nowrap;
  display: flex; align-items: center; justify-content: center;
}
.btn-search:hover { background: #ff5722; }

/* 类型标签按钮 */
.type-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.type-tab {
  padding: 6px 16px; font-size: 13px; color: #4e5969; background: #f7f8fa;
  border: 1px solid #e5e6eb; border-radius: 999px; cursor: pointer; transition: all 0.2s;
}
.type-tab.active { color: #ffffff; background: #ff6b3d; border-color: #ff6b3d; }
.type-tab:hover:not(.active) { border-color: #ff6b3d; color: #ff6b3d; }

/* 卡片网格 */
.card-grid { display: grid; gap: 20px; }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

/* 通用卡片 */
.card {
  background: #ffffff; border: 1px solid #f1f2f5; border-radius: 10px;
  overflow: hidden; cursor: pointer; transition: all 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.card-thumb { width: 100%; height: 160px; position: relative; overflow: hidden; }
.card-body { padding: 14px 16px; }
.card-title { font-size: 15px; font-weight: 600; color: #1f2329; margin-bottom: 4px; }
.card-desc { font-size: 12px; color: #86909c; margin-bottom: 10px; line-height: 1.6; }
.card-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #c9cdd4; }
.card-avatar { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #667eea, #764ba2); }

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 32px; }
.page-btn {
  min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #4e5969; background: #ffffff; border: 1px solid #e5e6eb;
  border-radius: 6px; cursor: pointer; transition: all 0.2s;
}
.page-btn:hover { border-color: #ff6b3d; color: #ff6b3d; }
.page-btn.active { color: #ffffff; background: #ff6b3d; border-color: #ff6b3d; }
.page-btn.disabled { color: #c9cdd4; cursor: not-allowed; }
.page-btn.disabled:hover { border-color: #e5e6eb; color: #c9cdd4; }

/* 底部 */
.footer {
  max-width: 1280px; margin: 40px auto 0; padding: 40px 48px;
  text-align: center; color: #c9cdd4; font-size: 13px;
  border-top: 1px solid #f1f2f5;
}

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: #c9cdd4; }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 16px; }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .navbar-inner, .page-wrap, .footer { padding-left: 32px; padding-right: 32px; }
  .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .navbar-inner, .page-wrap, .footer { padding-left: 20px; padding-right: 20px; }
  .nav-menu { display: none; }
  .nav-right { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile-menu.open { display: flex; }
  .logo { font-size: 18px; }
  .logo-tag { display: none; }
  .page-header { flex-direction: column; align-items: stretch; gap: 16px; }
  .page-header-search .filter-input { width: 100%; flex: 1; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-group { width: 100%; }
  .filter-input, .filter-select { width: 100%; flex: 1; }
  .card-grid.cols-4, .card-grid.cols-3, .card-grid.cols-2 { grid-template-columns: 1fr; }
  .page-title { font-size: 20px; }
}
@media (max-width: 480px) {
  .navbar-inner, .page-wrap, .footer { padding-left: 16px; padding-right: 16px; }
  .type-tabs { flex-direction: column; }
  .type-tab { text-align: center; }
}
