/* ===== 懒人导航 - 前台通用样式 ===== */

/* Critical CSS - 防FOUC闪烁（必须先加载） */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f8f9fa;
  color: #333;
  line-height: 1.5;
  transition: opacity .2s ease;
  }
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  }
.ranking-panel:not(.active) {
  display: none;
  }
/* ===== 排行榜区域 ===== */
.ranking-section {
  margin: 20px 0;
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  }
.ranking-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  flex-wrap: wrap;
  }
.ranking-tab {
  padding: 8px 16px;
  border: none;
  background: var(--muted);
  color: var(--muted-foreground);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  }
.ranking-tab:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  }
.ranking-tab.active {
  background: var(--primary);
  color: var(--primary-foreground);
  }
.ranking-panel {
  display: none;
  }
.ranking-panel.active {
  display: block;
  }
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  }
.ranking-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  border: 1px solid #eef0f4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  outline: none;
  }
.ranking-card:hover,
.ranking-card:focus,
.ranking-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(107, 92, 231, 0.12);
  border-color: #d4d0f5;
  color: #667eea;
  font-weight: 600;
  }
.ranking-num {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--border);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  }
.ranking-num.top {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  }
.ranking-info {
  min-width: 0;
  flex: 1;
  }
.ranking-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  }
.ranking-url {
  font-size: 12px;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  }
.ranking-empty {
  text-align: center;
  padding: 40px;
  color: var(--muted-foreground);
  }
/* 全局变量 */
:root {
  --primary: #667eea;
  --primary-dark: #764ba2;
  --secondary: #009468;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #0099e6;
  --text: #333;
  --text-secondary: #666;
  --text-muted: #888;
  --border: #e5e5e5;
  --bg: #f8f9fa;
  --bg-secondary: #f5f5f5;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  /* 补充 footer.php 中使用的变量 */
  --card: #fff;
  --muted: #f5f5f7;
  --muted-foreground: #888;
  --primary-foreground: #fff;
  }
::selection {
  background: rgba(102, 126, 234, 0.25);
  color: inherit;
  }
/* 蓝色背景区域选中文字用白色 */
.ranking-tab.active ::selection,
.ranking-card ::selection,
.page-hero-header ::selection {
  background: rgba(255, 255, 255, 0.35);
  color: #fff;
  }
/* ===== Hero 区域 ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 24px 32px 20px;
  margin-bottom: 16px;
  color: white;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  }
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  transform: rotate(15deg);
  }
.hero-left {
  position: relative;
  z-index: 1;
  text-align: left;
  }
.hero-right {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  }
.hero-brand {
  margin-bottom: 8px;
  }
.hero-brand h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  }
.hero-brand p {
  font-size: 14px;
  opacity: 0.85;
  }
.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  }
.stat {
  text-align: center;
  }
.stat-num {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  }
.stat-label {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
  }
.stat-divider {
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,0.3);
  }
/* ===== 搜索栏 ===== */
.search-bar {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
.search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  }
.search-wrap i {
  color: var(--text-muted);
  font-size: 18px;
  }
.search-wrap input {
  flex: 1;
  border: none;
  background: none;
  font-size: 14px;
  outline: none;
  color: var(--text);
  }
.hot-tags {
  display: flex;
  gap: 6px;
  }
.hot-tag {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  }
.hot-tag:hover {
  background: var(--primary);
  color: white;
  }
/* ===== 按钮 ===== */
.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  }
.submit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  }
/* ===== 全局推荐区 ===== */
.global-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
.global-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  }
.global-header h2 {
  font-size: 18px;
  font-weight: 600;
  }
.global-header .badge {
  font-size: 11px;
  padding: 3px 10px;
  background: #fff5f5;
  color: #e53e3e;
  border-radius: var(--radius-full);
  font-weight: 500;
  }
.global-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  }
.global-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  }
.global-card:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  }
.g-info {
  flex: 1;
  min-width: 0;
  }
.g-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  }
.g-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  }
.g-name-row .g-name {
  margin-bottom: 0;
  }
.g-name-row .weight-badge {
  flex-shrink: 0;
  margin-top: 0;
  }
.g-url {
  font-size: 12px;
  color: var(--text-muted);
  }
/* ===== 站点图标 ===== */
.site-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
  }
.site-icon.lg {
  width: 56px;
  height: 56px;
  font-size: 22px;
  }
.site-icon.xl {
  width: 72px;
  height: 72px;
  font-size: 28px;
  }
/* ===== 查看更多 ===== */
.view-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 24px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s;
  }
.view-more-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  }
/* ===== 分类详情 Hero ===== */
.cat-hero {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 20px;
  }
.cat-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  }
.cat-info {
  flex: 1;
  min-width: 0;
  }
.cat-info h1 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
  }
.cat-info p {
  font-size: 14px;
  color: var(--text-muted);
  }
.cat-count {
  text-align: center;
  flex-shrink: 0;
  }
.cat-count-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  }
.cat-count-label {
  font-size: 12px;
  color: #999;
  }
/* ===== 排序栏 ===== */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 0 4px;
  }
.sort-label {
  font-size: 13px;
  color: var(--text-muted);
  }
.sort-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: white;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  }
.sort-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  }
.sort-btn.active {
  border-color: var(--primary);
  background: #f8f9ff;
  color: var(--primary);
  font-weight: 500;
  }
/* ===== 站点详情页 ===== */
.site-detail-container {
  max-width: 1000px;
  }
.site-detail {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
  }
.site-detail::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  }
.site-detail-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  }
.site-detail-info {
  flex: 1;
  min-width: 200px;
  }
.site-detail-info h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  }
.site-detail-url {
  font-size: 14px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 6px;
  }
.site-detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  }
.weight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  }
.weight-cell {
  text-align: center;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  }
.weight-num {
  font-size: 22px;
  font-weight: 700;
  color: #ccc;
  }
.weight-num.active {
  color: var(--primary);
  }
.weight-label {
  font-size: 12px;
  color: var(--text-muted);
  }
.site-detail-info-block {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  }
.info-row {
  margin-bottom: 12px;
  }
.info-row:last-child {
  margin-bottom: 0;
  }
.info-label {
  font-weight: 600;
  font-size: 13px;
  color: #555;
  }
.info-value {
  font-size: 14px;
  color: #777;
  }
/* ===== 同类推荐 ===== */
.related-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }
.related-section h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  }
.related-section h2 i {
  color: var(--primary);
  }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
.related-card {
  padding: 16px;
  }
.related-card .card-title {
  font-size: 14px;
  }
.related-card-title {
  font-size: 14px;
  }
/* ===== 星标图标 ===== */
.star-icon {
  font-size: 11px;
  margin-right: 3px;
  }
.related-card .tag {
  font-size: 11px;
  padding: 2px 8px;
  }
/* ===== 必填标记 ===== */
.required {
  color: #ef4444;
  }
.btn-block {
  width: 100%;
  }
.btn-mt {
  margin-top: 8px;
  }
/* ===== 网格内空状态（跨列） ===== */
.empty-state-grid {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  }
.empty-state-grid i {
  font-size: 48px;
  color: #ccc;
  margin-bottom: 16px;
  display: block;
  }
.empty-state-grid p {
  font-size: 16px;
  color: #888;
  }
/* ===== JS 动态生成的小号站点图标 ===== */
.site-icon-sm {
  width: 36px;
  height: 36px;
  font-size: 14px;
  }
/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  }
.page-item {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: white;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s;
  }
.page-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  }
.page-item.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  }
.page-item.disabled {
  opacity: 0.4;
  pointer-events: none;
  }
.page-ellipsis {
  padding: 8px 12px;
  color: var(--text-secondary);
  font-size: 13px;
  user-select: none;
  }
/* ===== 权重色条 ===== */
.br-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
.br-1 {
  background: linear-gradient(90deg, #10b981, #059669);
  }
.br-2 {
  background: linear-gradient(90deg, #0ea5e9, #0284c7);
  }
.br-3 {
  background: linear-gradient(90deg, #8b5cf6, #7c3aed);
  }
.br-4 {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  }
.br-0 {
  background: #ddd;
  }
.br-1-br2 {
  background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
  }
.br-3-br4 {
  background: linear-gradient(90deg, #8b5cf6, #f59e0b);
  }
/* ===== 权重徽章 ===== */
.w-0 {
  background: #f3f4f6;
  color: #aaa;
  }
.w-1 {
  background: #d1fae5;
  color: #059669;
  }
.w-2 {
  background: #dbeafe;
  color: #2563eb;
  }
.w-3 {
  background: #ede9fe;
  color: #7c3aed;
  }
.w-4 {
  background: #fef3c7;
  color: #d97706;
  }
/* ===== Logo ===== */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  }
.logo i {
  color: var(--primary);
  font-size: 22px;
  }
/* ===== Hero 内 Logo 覆盖（白字） ===== */
.hero .logo {
  color: white;
  }
.hero .logo i {
  color: white;
  }
/* ===== 主布局 ===== */
.main-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  }
.main-content {
  flex: 1;
  min-width: 0;
  }
/* ===== 分隔线 ===== */
.divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
  }
/* ===== Sidebar 头部 ===== */
.sidebar-header {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 10px 10px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 6px;
  }
/* ===== Sidebar 导航项 ===== */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 2px;
  text-decoration: none;
  }
.sidebar-item:hover {
  background: #f8f9ff;
  color: #667eea;
  }
.sidebar-item.active {
  background: linear-gradient(135deg, rgba(102,126,234,0.08) 0%, rgba(118,75,162,0.08) 100%);
  color: #667eea;
  font-weight: 600;
  }
.sidebar-item i {
  font-size: 18px;
  width: 20px;
  text-align: center;
  }
.sidebar-item .count {
  margin-left: auto;
  font-size: 11px;
  color: #aaa;
  background: #eee;
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 24px;
  text-align: center;
  }
/* ===== 页面头部 ===== */
.page-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px 18px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
.page-header h2 {
  font-size: 18px;
  font-weight: 600;
  }
/* ===== 站点卡片网格 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  }
.card {
  background: #fff;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid #eef0f4;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 200px;
  }
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(107, 92, 231, 0.12);
  border-color: #d4d0f5;
  }
/* 卡片头部 */
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 8px;
  }
.card-header .site-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  }
.card-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  }
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  }
.card-br {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f0eeff;
  color: #6b5ce7;
  font-weight: 600;
  flex-shrink: 0;
  }
/* URL */
.card-url {
  font-size: 11px;
  color: #9ca3af;
  padding: 0 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  }
/* 描述 */
.card-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.6;
  padding: 8px 14px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  }
/* 底部区域 */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 12px;
  margin-top: auto;
  }
.card-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  flex: 1;
  }
.tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all 0.15s;
  }
.tag:hover {
  background: #6b5ce7;
  color: #fff;
  }
.card-views {
  font-size: 11px;
  color: #d1d5db;
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  }
.card-views i {
  font-size: 12px;
  }
.weight-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
  }
/* ===== 搜索框（search.php） ===== */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border-radius: var(--radius-full);
  padding: 10px 16px;
  margin-top: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  }
.search-box input {
  flex: 1;
  border: none;
  background: none;
  font-size: 15px;
  outline: none;
  color: var(--text);
  }
.search-box button {
  padding: 8px 20px;
  background: white;
  color: var(--primary);
  border: none;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  }
.search-box button:hover {
  background: rgba(255,255,255,0.9);
  }
.search-icon {
  color: var(--text-muted);
  font-size: 18px;
  }
/* Hero 区域内的搜索框适配（透明背景+白字） */
.hero .search-box {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  }
.hero .search-box input {
  color: white;
  }
.hero .search-box input::placeholder {
  color: rgba(255,255,255,0.6);
  }
.hero .search-box button {
  background: white;
  color: var(--primary);
  }
.hero .search-icon {
  color: rgba(255,255,255,0.7);
  }
/* ===== Sidebar ===== */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
/* ===== 结果计数 ===== */
.result-count {
  font-size: 13px;
  color: var(--text-muted);
  }
/* ===== 收录规则说明卡片 ===== */
.submit-rules {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }
.submit-rules h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  }
.submit-rules h3 i {
  color: var(--primary);
  }
.submit-rules ol {
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  }
.submit-rules ol li {
  margin-bottom: 4px;
  }
/* ===== site.php 详情页样式 ===== */
.breadcrumb {
  font-size: 14px;
  color: #888;
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  }
.breadcrumb a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  }
.breadcrumb a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
  }
.breadcrumb .separator {
  margin: 0 8px;
  color: #d0d0d0;
  font-size: 12px;
  }
.breadcrumb .current {
  color: #555;
  font-weight: 500;
  }
.site-header-left {
  display: flex;
  align-items: center;
  gap: 25px;
  flex: 1;
  }
.site-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  }
.header-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  }
.header-rating .rating-stars {
  display: flex;
  gap: 3px;
  }
.header-rating .star {
  font-size: 20px;
  color: #ddd;
  }
.header-rating .star.active {
  color: #fbbf24;
  }
.header-rating .rating-text {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  }
.header-rating .rating-text strong {
  font-size: 18px;
  color: white;
  }
.site-icon-large {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: bold;
  color: #667eea;
  flex-shrink: 0;
  }
.site-header-info {
  flex: 1;
  }
.site-header-info h1 {
  font-size: 32px;
  margin: 0 0 10px 0;
  font-weight: 700;
  }
.site-header-info .site-url {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 15px;
  }
.site-header-info .site-url a {
  color: white;
  text-decoration: none;
  }
.site-header-info .site-url a:hover {
  text-decoration: underline;
  }
.site-actions {
  display: flex;
  gap: 15px;
  }
.btn-visit {
  background: white;
  color: #667eea;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  }
.btn-visit:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  }
.btn-refresh {
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  }
.btn-refresh:hover {
  background: rgba(255,255,255,0.3);
  }
.btn-refresh:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  }
.spin {
  animation: spin 1s linear infinite;
  }
@keyframes spin {
  from {
  transform: rotate(0deg);
  }
to {
  transform: rotate(360deg);
  }

}
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 30px;
  }
.info-card {
  background: #fff;
  border-radius: 8px;
  padding: 18px 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  }
.info-card-value {
  font-size: 20px;
  font-weight: 700;
  color: #1a73e8;
  margin-bottom: 6px;
  }
.info-card-label {
  font-size: 12px;
  color: #666;
  }
.info-card-link {
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  }
.info-card-link:hover {
  background: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  }
.info-card-link:hover .info-card-value,
.info-card-link:hover .info-card-label {
  color: #fff;
  }
/* 首页/分类页大标题头 - 与详情页统一风格 */
.page-hero-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 0;
  margin-bottom: 20px;
  }
.page-hero-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  }
.page-hero-left {
  display: flex;
  align-items: center;
  gap: 25px;
  flex: 1;
  }
.page-hero-icon {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  flex-shrink: 0;
  }
.page-hero-icon i {
  color: #667eea;
  }
.page-hero-info {
  flex: 1;
  }
.page-hero-info h1 {
  font-size: 32px;
  margin: 0 0 10px 0;
  font-weight: 700;
  }
.page-hero-info .page-hero-desc {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 0;
  }
.page-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  }
.page-hero-stats {
  display: flex;
  gap: 30px;
  }
.hero-stat-item {
  text-align: center;
  }
.hero-stat-num {
  font-size: 28px;
  font-weight: 700;
  color: white;
  }
.hero-stat-label {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 4px;
  }
.hero-stat-divider {
  width: 1px;
  background: rgba(255,255,255,0.3);
  align-self: stretch;
  }
#trendChart {
  width: 100%;
  height: 200px;
  }
.info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  flex: 1;
  max-width: 600px;
  }
.stat-card {
  background: white;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }
.stat-card .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 5px;
  }
.stat-card .stat-label {
  font-size: 12px;
  color: #888;
  }
.site-details {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  }
.detail-row {
  display: flex;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
  }
.detail-row:last-child {
  border-bottom: none;
  }
.detail-label {
  width: 100px;
  font-weight: 600;
  color: #666;
  flex-shrink: 0;
  }
.detail-value {
  flex: 1;
  color: #333;
  line-height: 1.6;
  }
.detail-value .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  }
.detail-value .tag {
  background: #f0f0f0;
  color: #666;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 13px;
  }
/* 趋势图行：flex 布局替代 line-height hack */
.detail-row-chart {
  align-items: flex-start;
  }
.detail-row-chart .detail-label {
  line-height: 1.5;
  padding-top: 8px;
  }
.detail-value-chart {
  width: calc(100% - 100px);
  }
.detail-value-chart canvas {
  max-height: 200px;
  }
/* ===== 面包屑栏（全站通用） ===== */
.breadcrumb-bar {
  margin-bottom: 20px;
  }
.breadcrumb-bar .container {
  padding: 0 20px;
  }
.breadcrumb-bar .breadcrumb {
  margin: 0;
  padding: 12px 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  }
.feedback-btn {
  background: #f8f9fa;
  color: #666;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
  margin-top: 20px;
  }
.feedback-btn:hover {
  background: #e9ecef;
  color: #333;
  }
.related-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  }
.related-section h2 {
  font-size: 20px;
  margin: 0 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid #667eea;
  display: flex;
  align-items: center;
  gap: 10px;
  }
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  }
.related-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  border: 1px solid #e9ecef;
  }
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  border-color: #667eea;
  }
.related-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  }
.related-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  color: #667eea;
  flex-shrink: 0;
  }
.related-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
  }
.related-card-url {
  font-size: 13px;
  color: #888;
  margin: 0;
  }
.submit-rules .rules-link:hover {
  border-bottom-style: solid;
  }
.submit-rules .rules-tip {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  }
.submit-rules .rules-tip i {
  color: var(--warning);
  font-size: 15px;
  }
.submit-form {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }
.form-group {
  margin-bottom: 20px;
  }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
  }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: white;
  outline: none;
  transition: border-color 0.15s;
  }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  }
.form-group select {
  cursor: pointer;
  }
.form-group textarea {
  resize: vertical;
  font-family: inherit;
  }
/* ===== 表单提示 ===== */
.form-hint {
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  }
/* ===== 空状态 ===== */
.empty-state {
  background: white;
  border-radius: var(--radius-lg);
  padding: 60px 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }
.empty-state i {
  font-size: 48px;
  color: #ccc;
  margin-bottom: 16px;
  display: block;
  }
.empty-title {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 8px;
  }
.empty-desc {
  font-size: 13px;
  color: #aaa;
  }
/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  text-decoration: none;
  }
.btn-primary {
  background: var(--primary);
  color: white;
  }
.btn-primary:hover {
  background: var(--primary-dark);
  }
.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  }
.btn-secondary:hover {
  background: #e5e5e5;
  }
/* ===== 提示消息 ===== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  }
.alert-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  }
.alert-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  }
.alert-info {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  }
/* ===== 虫洞联盟入口 ===== */
.wormhole-entry {
  border-top: 1px solid #eee;
  margin-top: 10px;
  padding-top: 10px;
  }
.wormhole-link {
  background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.08));
  border: 1px dashed rgba(102,126,234,0.3);
  font-weight: 500;
  }
.wormhole-link i {
  font-size: 20px;
  }
.wormhole-link .wormhole-tag {
  font-size: 11px;
  color: #667eea;
  }
/* ===== 查看更多区域 ===== */
.view-more-area {
  text-align: center;
  padding: 20px;
  }
/* ===== 权重徽章上间距 ===== */
.weight-badge-mt {
  margin-top: 6px;
  }
/* ===== 关键词高亮 ===== */
.highlight {
  color: var(--primary);
  }
/* ===== 底部 ===== */
.site-footer {
  text-align: center;
  padding: 24px;
  margin-top: 20px;
  color: #888;
  font-size: 13px;
  border-top: 1px solid #eee;
  }
.footer-nav {
  margin-bottom: 10px;
  }
.footer-nav a {
  text-decoration: none;
  }
.footer-nav a.primary {
  color: #667eea;
  font-weight: 500;
  }
.footer-nav a.secondary {
  color: #888;
  }
.footer-nav .sep {
  margin: 0 8px;
  color: #ddd;
  }
.footer-copy {
  margin: 0;
  font-size: 12px;
  color: #aaa;
  }
/* ===== 自定义底部 ===== */
.custom-footer {
  margin-bottom: 10px;
  }
/* ===== 404 错误页 ===== */
.error-page {
  text-align: center;
  padding: 80px 20px;
  }
.error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.2;
  margin-bottom: -30px;
  }
.error-page i {
  font-size: 48px;
  color: #ccc;
  margin-bottom: 16px;
  display: block;
  }
.error-page h1 {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  }
.error-page p {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 24px;
  }
/* ===== 响应式 ===== */

/* 平板 (768px - 1024px) */
@media (max-width: 1024px) {
  .card-grid {
  grid-template-columns: repeat(2, 1fr);
  }
.global-grid {
  grid-template-columns: repeat(2, 1fr);
  }

}
/* 手机横屏和平板小屏 (640px - 768px) */
@media (max-width: 768px) {
  /* Hero 区域：恢复居中 + 增加内边距 */
  .hero {
  padding: 32px 20px 28px;
  text-align: center;
  flex-direction: column;
  gap: 20px;
  }
.hero-left {
  text-align: center;
  }
.hero-right {
  width: 100%;
  }
.hero-brand h1 {
  font-size: 22px;
  justify-content: center;
  }
.hero-brand p {
  font-size: 13px;
  }
.hero-stats {
  justify-content: center;
  gap: 24px;
  }
.stat-num {
  font-size: 24px;
  }
.stat-label {
  font-size: 13px;
  }
.stat-divider {
  height: 28px;
  }
/* 搜索栏 */
  .search-bar {
  flex-wrap: wrap;
  gap: 12px;
  }
.hot-tags {
  display: none;
  }
/* 布局 */
  .global-grid {
  grid-template-columns: 1fr;
  }
.cat-hero {
  flex-direction: column;
  text-align: center;
  }

}
/* 手机竖屏 (<640px) */
@media (max-width: 640px) {
  .container {
  padding: 0 12px;
  }
/* Hero 更紧凑 */
  .hero {
  padding: 24px 16px 20px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  }
.hero-brand h1 {
  font-size: 20px;
  }
.hero-brand p {
  font-size: 12px;
  }
.hero-stats {
  gap: 16px;
  }
.stat-num {
  font-size: 20px;
  }
.stat-label {
  font-size: 11px;
  }
.stat-divider {
  height: 20px;
  }
/* 搜索栏：输入框占满，提交按钮底部全宽 */
  .search-bar {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  }
.submit-btn {
  width: 100%;
  justify-content: center;
  padding: 10px;
  }
/* 热门推荐：手机端紧凑3列 */
  .global-section {
  padding: 14px;
  margin-bottom: 12px;
  }
.global-header {
  margin-bottom: 10px;
  }
.global-header h2 {
  font-size: 15px;
  }
.global-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  }
.global-card {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 6px;
  gap: 6px;
  }
.global-card .site-icon {
  width: 36px;
  height: 36px;
  font-size: 14px;
  }
.g-info {
  flex: none;
  width: 100%;
  min-width: 0;
  }
.g-name {
  font-size: 12px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  }
.g-name-row {
  justify-content: center;
  gap: 4px;
  }
.g-name-row .g-name {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
  }
.g-name-row .weight-badge {
  font-size: 10px;
  padding: 1px 6px;
  flex-shrink: 0;
  }
.g-url {
  display: none;
  }
/* 分类侧边栏：手机端改为横向滚动 */
  .sidebar {
  width: 100% !important;
  position: static !important;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  display: block;
  overflow: hidden;
  }
.sidebar-header {
  display: none;
  }
.sidebar > .sidebar-item,
  .sidebar > a.sidebar-item {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: white;
  font-size: 13px;
  gap: 6px;
  margin-bottom: 0;
  margin-right: 6px;
  white-space: nowrap;
  }
.sidebar-item i {
  font-size: 16px;
  width: auto;
  }
.sidebar-item .count {
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 10px;
  min-width: auto;
  }
.sidebar > a.sidebar-item.active,
  .sidebar-item.active {
  background: var(--primary);
  color: white;
  border-color: transparent;
  }
.sidebar > a.sidebar-item.active .count,
  .sidebar-item.active .count {
  background: rgba(255,255,255,0.2);
  color: white;
  }
/* sidebar 内容横向滚动 */
  .sidebar {
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  }
.sidebar::-webkit-scrollbar {
  display: none;
  }
.wormhole-entry {
  display: inline-flex;
  border-top: none;
  margin-top: 0;
  padding-top: 0;
  flex-shrink: 0;
  }
.wormhole-entry .wormhole-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px dashed rgba(102,126,234,0.3);
  background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.08));
  font-size: 13px;
  gap: 6px;
  white-space: nowrap;
  }
.wormhole-link i {
  font-size: 16px;
  }
.wormhole-link .wormhole-tag {
  font-size: 10px;
  color: #667eea;
  }
/* 侧边栏已在上方统一设为横向滚动 */
  .main-layout {
  flex-direction: column;
  gap: 12px;
  }
/* 搜索页/提交页移动端隐藏侧边栏 */
  .search-page .sidebar,
  .submit-page .sidebar {
  display: none;
  }
.search-page .main-content,
  .submit-page .main-content {
  width: 100%;
  }
/* 提交页移动端隐藏"提交站点"标题 */
  .submit-page .page-header {
  display: none;
  }
/* 分类标题：修复卡片被截断 */
  .page-header {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  flex-wrap: wrap;
  gap: 6px;
  }
.page-header h2 {
  font-size: 15px;
  word-break: break-all;
  }
/* 卡片网格 */
  .card-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  }
.card {
  height: 180px;
  border-radius: 10px;
  }
.card-header {
  padding: 10px 10px 6px;
  gap: 8px;
  }
.card-header .site-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 13px;
  }
.card-title {
  font-size: 13px;
  }
.card-br {
  font-size: 10px;
  padding: 1px 5px;
  }
.card-url {
  font-size: 11px;
  padding: 0 10px;
  }
.card-desc {
  font-size: 12px;
  padding: 6px 10px 0;
  -webkit-line-clamp: 2;
  }
.card-footer {
  padding: 8px 10px 10px;
  }
.card-tags {
  gap: 4px;
  }
.card-tags .tag {
  font-size: 10px;
  padding: 2px 6px;
  }
.card-views {
  font-size: 10px;
  }
.card-views i {
  font-size: 11px;
  }
.weight-badge {
  font-size: 10px;
  padding: 1px 5px;
  }
.site-icon-sm {
  width: 32px;
  height: 32px;
  font-size: 13px;
  }
/* 分类 Hero */
  .cat-hero {
  padding: 18px 20px;
  gap: 14px;
  }
.cat-icon {
  width: 48px;
  height: 48px;
  font-size: 24px;
  }
.cat-info h1 {
  font-size: 18px;
  }
.cat-info p {
  font-size: 13px;
  }
.cat-count-num {
  font-size: 20px;
  }
/* 排序栏 */
  .sort-bar {
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  }
.sort-bar::-webkit-scrollbar {
  display: none;
  }
.sort-btn {
  padding: 6px 14px;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  }
/* 站点详情 */
  .site-detail-container {
  padding: 0 12px;
  }
.site-detail {
  padding: 16px;
  border-radius: var(--radius-md);
  }
.site-detail-top {
  gap: 14px;
  }
.site-detail-info h1 {
  font-size: 20px;
  }
.weight-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  }
/* 详情页 info-grid 移动端2列 */
  .info-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
  }
.info-card {
  padding: 12px 8px;
  }
.info-card-value {
  font-size: 16px;
  }
.info-card-label {
  font-size: 11px;
  }
/* 趋势图行移动端 */
  .detail-row-chart {
  flex-direction: column;
  gap: 8px;
  }
.detail-row-chart .detail-label {
  padding-top: 0;
  }
.detail-value-chart {
  width: 100%;
  }
.detail-value-chart canvas {
  max-height: 180px;
  }
/* 详情页 site-details */
  .site-details {
  padding: 16px;
  border-radius: var(--radius-md);
  }
.detail-row {
  padding: 12px 0;
  }
.detail-label {
  width: 80px;
  font-size: 13px;
  }
.detail-value {
  font-size: 13px;
  }
/* 同类推荐 */
  .related-section {
  padding: 16px;
  border-radius: var(--radius-md);
  }
.related-section h2 {
  font-size: 16px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  }
.related-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  }
.related-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  }
.related-card-header {
  align-items: flex-start;
  gap: 6px;
  }
.related-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 14px;
  }
.related-card-title {
  font-size: 13px;
  }
.related-card-url {
  font-size: 11px;
  }
.related-card-tags {
  gap: 4px;
  }
.related-card-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  }
/* 表单 */
  .submit-form {
  padding: 16px;
  border-radius: var(--radius-md);
  }
.form-group {
  margin-bottom: 16px;
  }
.form-group label {
  font-size: 13px;
  margin-bottom: 8px;
  }
.form-group input,
  .form-group select,
  .form-group textarea {
  padding: 12px 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  }
/* 自动获取按钮全宽 */
  #fetchBtn {
  width: 100%;
  margin-top: 10px;
  }
/* 分页 */
  .pagination {
  gap: 4px;
  }
.pagination a, .pagination span {
  padding: 8px 14px;
  font-size: 13px;
  }
/* 搜索框在 hero 内 */
  .hero .search-box {
  max-width: 100%;
  padding: 8px 12px;
  }
/* 搜索页搜索框 */
  .search-page-form {
  margin-bottom: 16px;
  }
/* Footer */
  .site-footer {
  padding: 16px;
  font-size: 12px;
  }

}
/* ===== 搜索框（header内的样式） ===== */
.header-search-box {
  flex: 1;
  max-width: 480px;
  margin: 0 24px;
  }
.header-search-form {
  display: flex;
  background: white;
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }
.header-search-form input {
  flex: 1;
  padding: 10px 18px;
  border: none;
  font-size: 14px;
  background: transparent;
  }
.header-search-form input:focus {
  outline: none;
  }
.header-search-form button {
  padding: 10px 18px;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  }
.header-search-form button:hover {
  background: var(--primary-dark);
  }
/* ===== 搜索表单（内联式） ===== */
.search-hero-form {
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin: 16px 0 0;
  }
.search-form-inline {
  display: flex;
  gap: 10px;
  }
.search-form-inline input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: rgba(255,255,255,0.9);
  color: #333;
  }
.search-form-inline input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  }
.search-form-inline button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: white;
  color: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  }
.search-form-inline button:hover {
  background: var(--primary);
  color: white;
  }
/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
  /* 统一顶部高度 */
  .page-hero {
  padding: 24px 0;
  }
.page-hero-content {
  flex-direction: column;
  text-align: center;
  gap: 12px;
  }
.page-hero-icon {
  width: 56px;
  height: 56px;
  }
.page-hero-icon svg {
  width: 28px;
  height: 28px;
  }
.page-hero-info h1 {
  font-size: 20px;
  }
.page-hero-info p {
  font-size: 13px;
  }
.page-hero-stats {
  justify-content: center;
  }
.stat-item {
  padding: 8px 16px;
  }
.stat-value {
  font-size: 20px;
  }
.stat-label {
  font-size: 11px;
  }
/* 搜索表单 */
  .search-hero-form {
  padding: 12px;
  margin: 0 0 16px;
  border-radius: var(--radius-md);
  }
.search-form-inline {
  display: flex;
  flex-direction: row;
  height: 42px;
  background: #fff;
  border-radius: 21px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  max-width: 480px;
  margin: 0 auto;
  }
.search-form-inline input {
  flex: 7;
  border: none;
  outline: none;
  padding: 0 16px;
  font-size: 14px;
  background: transparent;
  min-width: 0;
  }
.search-form-inline button {
  flex: 3;
  height: 42px;
  border: none;
  background: var(--primary, #6366f1);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  }
/* 详情页顶部 */
  .site-breadcrumb {
  font-size: 12px;
  margin-bottom: 4px;
  }
.site-header-left {
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  }
.site-header-right {
  align-items: center;
  }
.site-icon-large {
  width: 56px;
  height: 56px;
  font-size: 24px;
  border-radius: 12px;
  flex-shrink: 0;
  }
.site-header-info h1 {
  font-size: 18px;
  }
.site-header-info .site-url {
  font-size: 13px;
  margin-bottom: 8px;
  }
.site-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  }
.btn-visit, .btn-refresh {
  padding: 7px 14px;
  font-size: 12px;
  border-radius: 6px;
  }
.btn-visit svg, .btn-refresh svg {
  width: 14px;
  height: 14px;
  }
.header-rating {
  gap: 8px;
  }
.header-rating .star {
  font-size: 16px;
  }
.header-rating .rating-text strong {
  font-size: 15px;
  }
/* 首页顶部移动端适配 */
  .page-hero-header .container {
  flex-direction: column;
  align-items: center;
  gap: 12px;
  }
.page-hero-left {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  width: 100%;
  }
.page-hero-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  }
.page-hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  }
.page-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  font-size: 26px;
  flex-shrink: 0;
  }
.page-hero-info h1 {
  font-size: 18px;
  }
.page-hero-info .page-hero-desc {
  font-size: 13px;
  -webkit-line-clamp: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  }
.hero-stat-num {
  font-size: 18px;
  }
/* 面包屑栏移动端优化 */
  .breadcrumb-bar {
  margin-bottom: 12px;
  }
.breadcrumb-bar .container {
  padding: 0 12px;
  }
.breadcrumb .separator {
  margin: 0 4px;
  }
.ranking-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
  }
.ranking-tab {
  padding: 10px 4px;
  text-align: center;
  font-size: 12px;
  border-radius: 8px;
  background: #f5f5f7;
  color: #555;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  }
.ranking-tab.active {
  background: var(--primary, #6366f1);
  color: #fff;
  }
/* 排行榜卡片网格 */
  .ranking-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  }
.ranking-card {
  padding: 12px 10px;
  gap: 8px;
  }
.ranking-num {
  width: 22px;
  height: 22px;
  font-size: 11px;
  }
.ranking-name {
  font-size: 13px;
  }
/* 隐藏侧边栏（768px 断点，仅搜索页） */
  .search-page .sidebar {
  display: none;
  }
.main-content {
  width: 100%;
  }

}
/* ===== 问题反馈弹窗 ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.25s;
  }
.modal.hidden {
  display: none;
  opacity: 0;
  }
.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  }
.modal-dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: modalIn 0.3s ease;
  }
@keyframes modalIn {
  from {
  transform: scale(0.92);
  opacity: 0;
  }
to {
  transform: scale(1);
  opacity: 1;
  }

}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  }
.modal-title {
  font-size: 17px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  }
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: 0.15s;
  }
.modal-close:hover {
  background: #f3f4f6;
  color: #374151;
  }
.modal-body {
  padding: 20px;
  }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid #e5e7eb;
  }
.fb-type-group .fb-type-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #4b5563;
  transition: 0.15s;
  background: #fff;
  }
.fb-type-group .fb-type-item:hover {
  border-color: #6366f1;
  color: #6366f1;
  }
.fb-type-group .fb-type-item.active {
  border-color: #6366f1;
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 500;
  }
.modal-body .form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
  }
.modal-body .form-group input,
.modal-body .form-group textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: 0.15s;
  width: 100%;
  resize: vertical;
  }
.modal-body .form-group input:focus,
.modal-body .form-group textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
  }
@media (max-width: 640px) {
  .modal-dialog {
  width: 95%;
  border-radius: 10px;
  }
.modal-body {
  padding: 16px;
  }
.modal-footer {
  padding: 10px 16px 14px;
  }
.fb-type-group .fb-type-item {
  padding: 5px 10px;
  font-size: 12px;
  }

}