/* ============================================================
   中国资源网 v2 设计系统
   覆盖式重写：保留原有全部 class 名，替换 style.css 即可生效
   带 !important 的条目用于压制旧模板里的内联 style
   ============================================================ */

:root {
  --brand: #2c7be5;
  --brand-strong: #1a5fbe;
  --brand-soft: #eaf2fd;
  --accent: #16c79a;

  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-sunken: #eef0f3;
  --surface: #ffffff;
  --text: #16191f;
  --text-mute: #5f6672;
  --text-faint: #9299a5;
  --border: #e5e8ec;
  --border-strong: #d3d8de;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-hover: 0 6px 20px rgba(16, 24, 40, .09);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --max: 1200px;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  --brand: #5b9bf8;
  --brand-strong: #7db2fa;
  --brand-soft: #16233a;
  --accent: #2fd6ab;

  --bg: #0e1116;
  --bg-soft: #151922;
  --bg-sunken: #1c212c;
  --surface: #151922;
  --text: #e7eaf0;
  --text-mute: #98a1b0;
  --text-faint: #6b7484;
  --border: #232936;
  --border-strong: #2f3644;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, .45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #5b9bf8;
    --brand-strong: #7db2fa;
    --brand-soft: #16233a;
    --accent: #2fd6ab;
    --bg: #0e1116;
    --bg-soft: #151922;
    --bg-sunken: #1c212c;
    --surface: #151922;
    --text: #e7eaf0;
    --text-mute: #98a1b0;
    --text-faint: #6b7484;
    --border: #232936;
    --border-strong: #2f3644;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-hover: 0 6px 20px rgba(0, 0, 0, .45);
  }
}

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

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .2s ease, color .2s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button, input, textarea { font-family: inherit; font-size: inherit; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== 首页 Hero 轮播 ========== */
.hero-slider {
  position: relative;
  overflow: hidden;
  height: 240px;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  background: var(--bg-sunken);
}

.hero-track {
  display: flex;
  height: 100%;
  transition: transform .8s cubic-bezier(.77, 0, .18, 1);
}

.hero-slide {
  flex: 0 0 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10, 16, 28, .60) 0%,
    rgba(10, 16, 28, .28) 45%,
    rgba(10, 16, 28, .55) 100%);
  pointer-events: none;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}

.hero-content h1 {
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.4px;
  margin-bottom: 10px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .5);
}

.hero-content .hero-sub {
  color: rgba(255, 255, 255, .9);
  font-size: 15px;
  max-width: 640px;
  margin: 0 auto 20px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
}

.hero-search {
  display: flex;
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
}

.hero-search input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 14px 18px;
  font-size: 15px;
  color: #16191f;
  background: transparent;
}

.hero-search button {
  border: 0;
  background: var(--brand);
  color: #fff;
  padding: 0 30px;
  font-size: 15px;
  cursor: pointer;
}

.hero-search button:hover { background: var(--brand-strong); }

.hero-quick {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-quick a {
  color: #fff;
  font-size: 13px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(4px);
  transition: background .2s;
}

.hero-quick a:hover { background: rgba(255, 255, 255, .32); }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(0, 0, 0, .25);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: .55;
  transition: opacity .2s, background .2s;
}

.hero-arrow:hover { opacity: 1; background: rgba(0, 0, 0, .45); }
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }

.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-dots button {
  width: 9px;
  height: 9px;
  border-radius: 5px;
  border: 0;
  background: rgba(255, 255, 255, .45);
  cursor: pointer;
  padding: 0;
  transition: all .25s;
}

.hero-dots button.on { background: #fff; width: 24px; }

/* 顶部导航 logo 图标 */
.logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
  flex-shrink: 0;
}
.logo a { gap: 10px; }

/* ========== 顶部导航 ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.logo { flex-shrink: 0; }
.logo a { display: flex; align-items: center; gap: 10px; }

.logo-text {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.2px;
  color: var(--text);
}

.logo-text::before { content: none; }   /* 原模板渐变方块已由圆规 logo 替代 */

.main-nav { flex: 1; min-width: 0; }
.main-nav ul { display: flex; gap: 0; }

.main-nav a {
  display: inline-flex;
  align-items: center;
  padding: 7px 7px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-mute);
  white-space: nowrap;
  transition: color .15s, background .15s;
}

/* 导航小图标：固定宽度，保证各浏览器 emoji 渲染宽度差不会把导航撑变形 */
.nav-ico {
  display: inline-block;
  flex-shrink: 0;
  width: 12px;
  margin-right: 4px;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  font-style: normal;
}

.main-nav a:hover { color: var(--text); background: var(--bg-soft); }

.main-nav a.active {
  color: var(--brand);
  font-weight: 500;
  background: var(--brand-soft);
}

/* 搜索框 */
.search-box { flex-shrink: 0; }
.search-box form { display: flex; }

.search-box input {
  width: 140px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 999px 0 0 999px;
  background: var(--bg-soft);
  color: var(--text);
  outline: none;
  transition: width .2s, border-color .15s;
}

/* 聚焦只变化边框色、不再加宽：加宽会挤压主导航，窗口较窄时会顶出溢出 */
.search-box input:focus { border-color: var(--brand); }
.search-box input::placeholder { color: var(--text-faint); }

.search-box button {
  padding: 8px 16px;
  border: 1px solid var(--brand);
  border-radius: 0 999px 999px 0;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s;
}

.search-box button:hover { background: var(--brand-strong); }

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
}

/* 主题切换 */
.theme-toggle {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-mute);
  cursor: pointer;
  font-size: 15px;
  transition: color .15s, border-color .15s;
}

.theme-toggle:hover { color: var(--brand); border-color: var(--brand); }

/* ========== 主体 ========== */
.site-main { padding: 32px 0 56px; min-height: 60vh; }

/* 首页 Hero */
/* Hero：CAD 蓝图网格背景 */
.home-banner {
  position: relative !important;
  overflow: hidden !important;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 55%, transparent) 0%, transparent 120px),
    var(--bg-soft) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 48px 32px !important;
  margin-bottom: 32px !important;
  text-align: center !important;
  color: var(--text) !important;
}

/* 双层蓝图网格（细格 24px + 大格 120px），向下渐隐 */
.home-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-fine) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-fine) 1px, transparent 1px),
    linear-gradient(var(--grid-bold) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-bold) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  -webkit-mask-image: radial-gradient(90% 130% at 50% -10%, #000 45%, transparent 100%);
          mask-image: radial-gradient(90% 130% at 50% -10%, #000 45%, transparent 100%);
  pointer-events: none;
}

/* 标题后方的柔光 */
.home-banner::after {
  content: "";
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 680px;
  max-width: 90%;
  height: 300px;
  background: radial-gradient(closest-side, var(--grid-glow), transparent 75%);
  pointer-events: none;
}

/* 内容浮在装饰层之上 */
.home-banner > * { position: relative; z-index: 1; }

.home-banner h1 {
  font-size: 30px !important;
  font-weight: 600;
  letter-spacing: -.4px;
  margin-bottom: 10px !important;
  color: var(--text) !important;
}

.home-banner p {
  font-size: 15px !important;
  color: var(--text-mute) !important;
  opacity: 1 !important;
  max-width: 620px;
  margin: 0 auto 24px !important;
}

/* Hero 搜索 */
.home-search {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  box-shadow: var(--shadow-card);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.home-search input {
  flex: 1;
  padding: 13px 22px;
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
}

.home-search input::placeholder { color: var(--text-faint); }

.home-search button {
  padding: 13px 30px;
  border: none;
  background: var(--brand);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}

.home-search button:hover { background: var(--brand-strong); }

.home-quick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.home-quick a {
  padding: 5px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  color: var(--text-mute);
  transition: all .15s;
}

.home-quick a:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* ========== 布局 ========== */
.list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px !important;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-title h2 {
  font-size: 17px !important;
  font-weight: 600 !important;
  letter-spacing: -.2px;
  color: var(--text) !important;
}

.section-title a {
  font-size: 13px;
  color: var(--text-faint);
  transition: color .15s;
}

.section-title a:hover { color: var(--brand); }

/* 文章网格 */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}

.article-thumb {
  height: 140px !important;
  background: var(--bg-sunken);
  overflow: hidden;
  flex-shrink: 0;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.article-thumb .no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 34px;
  opacity: .45;
}

.article-card:hover .article-thumb img { transform: scale(1.04); }

.article-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }

.article-title {
  font-size: 15px !important;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 8px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card:hover .article-title { color: var(--brand); }

.article-summary {
  font-size: 13.5px;
  color: var(--text-mute);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px !important;
  color: var(--text-faint);
  margin-top: auto;
}

.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.tag {
  padding: 2px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  color: var(--text-mute);
  font-size: 12px;
  transition: all .15s;
}

.tag:hover { background: var(--brand-soft); color: var(--brand); }

/* ========== 侧边栏 ========== */
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 88px; }

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.sidebar-card h3 {
  font-size: 14.5px !important;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.hot-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.hot-item:first-of-type { padding-top: 0; }
.hot-item:last-child { border-bottom: none; padding-bottom: 0; }

.hot-thumb {
  position: relative;
  flex-shrink: 0;
  width: 84px;
  height: 63px;
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-sunken);
}

.hot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.hot-item:hover .hot-thumb img { transform: scale(1.06); }

.hot-thumb-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 11px;
  color: var(--text-faint);
}

.hot-rank {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm) 0 var(--radius-sm) 0;
  background: rgba(22, 25, 31, .6);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
}

.hot-item:nth-of-type(1) .hot-rank { background: var(--brand); }
.hot-item:nth-of-type(2) .hot-rank { background: color-mix(in srgb, var(--brand) 74%, #0b2b57); }
.hot-item:nth-of-type(3) .hot-rank { background: color-mix(in srgb, var(--brand) 48%, #0b2b57); }

.hot-info { flex: 1; min-width: 0; }

.hot-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-mute);
  transition: color .15s;
}

.hot-item:hover .hot-title { color: var(--brand); }

.hot-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-faint);
}

.hot-meta em { font-style: normal; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }

.tag-cloud a {
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-mute);
  transition: all .15s;
}

.tag-cloud a:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

.active-tag {
  background: var(--brand) !important;
  color: #fff !important;
  border-color: var(--brand) !important;
}

/* ========== 专题 ========== */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.topic-card {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}

.topic-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
}

.topic-cover {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-size: 22px;
  overflow: hidden;
}

.topic-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.topic-body h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.topic-body p { font-size: 13px; color: var(--text-mute); line-height: 1.5; }
.topic-stat { font-size: 12px; color: var(--text-faint); margin-top: 6px; }

/* ========== 面包屑 ========== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.breadcrumb a { color: var(--text-mute); transition: color .15s; }
.breadcrumb a:hover { color: var(--brand); }

/* ========== 文章详情 ========== */
.article-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
}

.article-detail h1 {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -.4px;
  line-height: 1.4;
  margin-bottom: 14px;
}

.article-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-faint);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.article-content {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text);
  margin-top: 22px;
}

.article-content p { margin-bottom: 16px; }

.article-content h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 30px 0 14px;
  padding-left: 11px;
  border-left: 3px solid var(--brand);
}

.article-content h3 { font-size: 16.5px; font-weight: 600; margin: 24px 0 12px; }

.article-content ul, .article-content ol { margin: 0 0 16px 22px; }
.article-content li { margin-bottom: 7px; }

.article-content img {
  border-radius: var(--radius);
  margin: 18px 0;
  border: 1px solid var(--border);
}

.article-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

.article-content blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-mute);
}

.article-content table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  font-size: 14px;
}

.article-content th, .article-content td {
  padding: 9px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.article-content th { background: var(--bg-soft); font-weight: 600; }

.article-content code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-sunken);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 13.5px;
}

.article-content pre {
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-sunken);
  overflow-x: auto;
}

.article-content pre code { background: none; padding: 0; }

/* ========== 评论 ========== */
.comment-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.comment-form input[type="text"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}

.comment-form input:focus, .comment-form textarea:focus { border-color: var(--brand); }
.comment-form textarea { min-height: 88px; resize: vertical; }

.comment-form button {
  padding: 9px 22px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}

.comment-form button:hover { background: var(--brand-strong); }

/* ========== 空状态 ========== */
.empty-state {
  padding: 56px 20px;
  text-align: center;
  color: var(--text-faint);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.empty-state .icon { font-size: 34px; margin-bottom: 10px; opacity: .5; }

/* ========== 分页 ========== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }

.pagination a, .pagination span {
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-mute);
  transition: all .15s;
}

.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ========== 页脚 ========== */
.site-footer {
  margin-top: 24px;
  padding: 40px 0 24px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
}

.footer-col h4 { font-size: 14.5px; font-weight: 600; margin-bottom: 12px; }
.footer-col p { font-size: 13.5px; color: var(--text-mute); line-height: 1.7; }
.footer-col ul { display: flex; flex-direction: column; gap: 7px; }
.footer-col li a { font-size: 13.5px; color: var(--text-mute); transition: color .15s; }
.footer-col li a:hover { color: var(--brand); }

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
}

.footer-bottom p { margin-bottom: 4px; }

/* ========== 响应式 ========== */
/* 窄屏（≤1200）导航紧凑档：缩字号与内边距，让 8 项+图标仍能单行排下
   紧凑档实测总宽约 586px，导航可用宽 = 视口 - 482 → 1069px 起够用 */
@media (max-width: 1200px) {
  .main-nav a { padding: 7px 5px; font-size: 12px; }
  .nav-ico { width: 10px; margin-right: 3px; font-size: 11px; }
}

/* 1080：桌面导航确实放不下时收起为汉堡，防止末项被搜索框遮挡
   （紧凑档需 1069px，取 1080 留 12px 余量应对不同系统字体差异） */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }

  .main-nav.show {
    display: block;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    padding: 12px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-hover);
  }

  .main-nav.show ul { flex-direction: column; gap: 2px; }
  /* 移动端菜单改为块级 flex，让每项撑满宽度、点击热区不缩水 */
  .main-nav.show a { display: flex; padding: 10px 12px; }

  .list-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar-card { flex: 1; min-width: 260px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header-inner { gap: 12px; height: 58px; }
  .search-box { display: none; }
  .logo-text { font-size: 16px; }
  .site-main { padding: 20px 0 36px; }

  .hero-slider { height: 260px; }
  .hero-content h1 { font-size: 22px; }
  .hero-content .hero-sub { display: none; }
  .hero-search { flex-direction: column; border-radius: 12px; }
  .hero-search input { border-radius: 12px 12px 0 0; padding: 12px 16px; }
  .hero-search button { border-radius: 0 0 12px 12px; padding: 12px; }
  .hero-quick { gap: 8px; max-width: 92%; }
  .hero-quick a { padding: 6px 12px; font-size: 13px; }
  .hero-arrow { display: none; }

  .article-grid { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: 1fr; }
  .article-detail { padding: 22px 18px; }
  .article-detail h1 { font-size: 22px; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
}
