/* ============================================================
   站群营销主题 - main.css  (mobile-first, fully responsive)
   ============================================================ */

/* ── CSS 变量 ──────────────────────────────────────────────── */
:root {
  --primary:       #3b82f6;
  --primary-dark:  #2563eb;
  --primary-light: #eff6ff;
  --secondary:     #10b981;
  --accent:        #f59e0b;
  --text:          #1f2937;
  --text-muted:    #6b7280;
  --text-light:    #9ca3af;
  --bg:            #f9fafb;
  --surface:       #ffffff;
  --border:        #e5e7eb;
  --border-light:  #f3f4f6;
  --radius-sm:     4px;
  --radius:        8px;
  --radius-lg:     12px;
  --shadow-xs:     0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:     0 1px 6px rgba(0,0,0,.08);
  --shadow-md:     0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.12);
  --font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                   'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --transition:    0.18s ease;
  --container:     1280px;
  --sidebar-w:     300px;
  --header-h:      64px;
}

/* ── 重置 ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
button { font-family: inherit; }
table { border-collapse: collapse; }

/* ── 无障碍 ────────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100%; left: 0;
  background: var(--primary); color: #fff;
  padding: 8px 16px; border-radius: 0 0 4px 0; z-index: 9999;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ── 容器 ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px)  { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

/* ============================================================
   导航栏
   ============================================================ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
  box-shadow: var(--shadow-xs);
}

/* 关键修复：flex 加在 container 上，而非 .navbar */
.navbar { height: var(--header-h); }
.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; text-decoration: none;
}
.brand-text {
  font-size: 20px; font-weight: 800; white-space: nowrap;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-logo { height: 36px; width: auto; }

/* 汉堡按钮（默认隐藏，移动端显示） */
.navbar-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 8px; border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.navbar-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.navbar-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navbar-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 导航菜单 */
.navbar-menu {
  display: flex; align-items: center; gap: 8px;
  flex: 1; justify-content: flex-end;
}
.nav-links {
  display: flex; list-style: none; gap: 2px; align-items: center;
}
.nav-links a {
  display: block; padding: 6px 12px; border-radius: 6px;
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  transition: all var(--transition); white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--primary-light); color: var(--primary);
}

/* 搜索 */
.nav-search { display: flex; align-items: center; }
.nav-search form { display: flex; align-items: center; gap: 4px; }
.search-input {
  border: 1.5px solid var(--border); border-radius: 20px;
  padding: 6px 14px; font-size: 14px;
  width: 170px; transition: all var(--transition);
  background: var(--bg);
}
.search-input:focus {
  outline: none; border-color: var(--primary);
  width: 220px; box-shadow: 0 0 0 3px rgba(59,130,246,.12);
  background: var(--surface);
}
.search-btn {
  background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--text-muted);
  display: flex; align-items: center; border-radius: 6px;
  transition: color var(--transition);
}
.search-btn:hover { color: var(--primary); }

/* ── 移动端导航 ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar-toggle { display: flex; }

  .navbar-menu {
    display: none;
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--surface);
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--border);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    z-index: 199;
  }
  .navbar-menu.is-open { display: flex; }

  .nav-links { flex-direction: column; gap: 2px; width: 100%; }
  .nav-links a { padding: 10px 14px; width: 100%; font-size: 15px; }

  .nav-search { width: 100%; }
  .nav-search form { width: 100%; }
  .search-input { width: 100% !important; border-radius: var(--radius); }
  .search-btn { flex-shrink: 0; }
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark); border-color: var(--primary-dark); color: #fff;
  box-shadow: 0 4px 12px rgba(59,130,246,.35);
}
.btn-outline {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,.15); border-color: #fff; color: #fff;
}
.btn-sm { padding: 6px 16px; font-size: 13px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  color: #fff; padding: 60px 0; text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.hero-title {
  font-size: clamp(26px, 5vw, 52px);
  font-weight: 800; line-height: 1.2; margin-bottom: 16px; letter-spacing: -.02em;
}
.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  opacity: .85; margin-bottom: 28px; line-height: 1.6;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 480px) {
  .hero { padding: 40px 0; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   区块标题
   ============================================================ */
.section-title {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700; color: var(--text);
  margin-bottom: 20px; position: relative; padding-bottom: 12px;
}
.section-title::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 36px; height: 3px; background: var(--primary); border-radius: 2px;
}

/* ============================================================
   布局 - 内容 + 侧边栏
   ============================================================ */
.content-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 24px 0 40px;
}
@media (min-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr var(--sidebar-w);
    gap: 32px;
    padding: 40px 0;
  }
}

.articles-section { padding: 16px 0 40px; }
@media (min-width: 640px) { .articles-section { padding: 24px 0 48px; } }

/* ============================================================
   文章网格 & 卡片
   ============================================================ */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 480px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (min-width: 900px) {
  .articles-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

.article-card {
  background: var(--surface); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.article-card:hover {
  box-shadow: var(--shadow-md); transform: translateY(-3px);
}
.card-image {
  display: block; overflow: hidden;
  aspect-ratio: 16 / 9; flex-shrink: 0;
}
.card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.article-card:hover .card-image img { transform: scale(1.04); }

.card-body { padding: 16px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.card-category {
  display: inline-block; padding: 3px 10px;
  background: var(--primary-light); color: var(--primary);
  border-radius: 12px; font-size: 11px; font-weight: 700;
  margin-bottom: 10px; text-transform: uppercase; letter-spacing: .04em;
  width: fit-content;
}
.card-title {
  font-size: 16px; font-weight: 700; line-height: 1.45;
  margin-bottom: 10px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--primary); }

.card-excerpt {
  font-size: 13px; color: var(--text-muted); line-height: 1.65;
  margin-bottom: 14px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  font-size: 12px; color: var(--text-light); align-items: center;
  margin-bottom: 10px;
}
.meta-date, .meta-author, .meta-reading, .meta-views {
  display: flex; align-items: center; gap: 4px;
}
.ai-badge {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff; padding: 2px 7px; border-radius: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  padding: 3px 9px; background: var(--border-light); color: var(--text-muted);
  border-radius: 10px; font-size: 11px; transition: var(--transition);
}
.tag:hover { background: var(--primary-light); color: var(--primary); }

/* ── 精选文章 ─────────────────────────────────────────────── */
.featured-section { background: #f0f9ff; padding: 40px 0; border-top: 1px solid #bae6fd; }
.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .featured-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .featured-grid { grid-template-columns: repeat(3, 1fr); } }

/* ============================================================
   文章详情页  ── 修复：main-col 包裹 article + related
   ============================================================ */
.article-main-col { min-width: 0; }  /* 防止 overflow */

.article-full {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
@media (min-width: 640px) { .article-full { padding: 32px; } }
@media (min-width: 1024px) { .article-full { padding: 40px; } }

.article-cover {
  margin-bottom: 28px; border-radius: var(--radius);
  overflow: hidden;
}
.article-cover img { width: 100%; max-height: 440px; object-fit: cover; }

.article-category {
  display: inline-block; padding: 4px 12px;
  background: var(--primary-light); color: var(--primary);
  border-radius: 12px; font-size: 12px; font-weight: 700;
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: .04em;
}
.article-title {
  font-size: clamp(22px, 3.5vw, 36px);
  font-weight: 800; line-height: 1.3; margin-bottom: 16px; color: var(--text);
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 12px 20px;
  color: var(--text-muted); font-size: 13px;
  margin-bottom: 20px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.article-excerpt {
  font-size: 16px; color: #374151; background: #f0f9ff;
  padding: 14px 18px; border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 28px; line-height: 1.7;
}
.article-footer {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid var(--border);
}
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.article-tags > span { color: var(--text-muted); font-size: 14px; }

/* 目录 */
.toc {
  background: #f8fafc; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 28px;
}
.toc-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--text); }
.toc ol, .toc ul { padding-left: 18px; }
.toc li { margin: 5px 0; font-size: 13px; }
.toc a { color: var(--text-muted); }
.toc a:hover { color: var(--primary); }

/* ── 文章正文排版 ─────────────────────────────────────────── */
.article-content { font-size: 16px; line-height: 1.9; color: #374151; }
.article-content h2 {
  font-size: clamp(18px, 2.5vw, 22px); font-weight: 700;
  margin: 36px 0 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--border); color: var(--text);
}
.article-content h3 {
  font-size: clamp(16px, 2vw, 19px); font-weight: 600;
  margin: 28px 0 12px; color: var(--text);
}
.article-content h4 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
.article-content p { margin-bottom: 20px; }
.article-content ul, .article-content ol { margin: 14px 0 20px 24px; }
.article-content li { margin-bottom: 7px; }
.article-content blockquote {
  border-left: 4px solid var(--primary); margin: 24px 0;
  padding: 14px 18px; background: #f0f9ff;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; color: #374151;
}
.article-content img { border-radius: var(--radius); margin: 24px auto; }
.article-content pre {
  background: #1e293b; color: #e2e8f0; padding: 18px 20px;
  border-radius: var(--radius); overflow-x: auto;
  font-size: 14px; line-height: 1.6; margin: 24px 0;
}
.article-content code {
  background: #f1f5f9; padding: 2px 6px;
  border-radius: 4px; font-size: .875em; color: #dc2626;
}
.article-content pre code { background: none; color: inherit; padding: 0; font-size: 14px; }
.article-content a { border-bottom: 1px solid rgba(59,130,246,.35); }
.article-content a:hover { border-bottom-color: var(--primary); }
.article-content table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-size: 14px; overflow-x: auto; display: block;
}
.article-content th, .article-content td {
  padding: 10px 14px; border: 1px solid var(--border); text-align: left;
}
.article-content th { background: #f8fafc; font-weight: 600; }
@media (max-width: 640px) {
  .article-content h2 { margin-top: 28px; }
  .article-content h3 { margin-top: 22px; }
}

/* ── 相关文章（在主列内，全宽） ─────────────────────────────── */
.related-articles {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px; margin-top: 24px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
@media (min-width: 640px) { .related-articles { padding: 28px 32px; } }
.related-articles h2 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }

/* ============================================================
   侧边栏
   ============================================================ */
.sidebar {
  display: flex; flex-direction: column; gap: 20px;
}
.widget {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 20px 22px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.widget-title {
  font-size: 15px; font-weight: 700; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 2px solid var(--primary); color: var(--text);
}
.category-list { list-style: none; }
.category-list li { padding: 7px 0; border-bottom: 1px solid var(--border-light); }
.category-list li:last-child { border-bottom: none; }
.category-list a {
  color: var(--text-muted); font-size: 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.category-list a:hover, .category-list a.active { color: var(--primary); }
.count {
  background: var(--primary-light); color: var(--primary);
  padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
}
.popular-list { list-style: decimal; padding-left: 18px; }
.popular-list li {
  padding: 7px 0; border-bottom: 1px solid var(--border-light);
  font-size: 13px; display: flex; flex-direction: column; gap: 2px;
}
.popular-list li:last-child { border-bottom: none; }
.popular-list a { color: var(--text); font-weight: 500; font-size: 13px; }
.popular-list a:hover { color: var(--primary); }
.view-count { font-size: 11px; color: var(--text-light); }
.rss-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: #f97316; font-weight: 600; font-size: 14px;
  padding: 8px 14px; background: #fff7ed;
  border-radius: var(--radius); border: 1px solid #fed7aa;
  transition: var(--transition);
}
.rss-link:hover { background: #ffedd5; color: #ea580c; }

/* ============================================================
   面包屑
   ============================================================ */
.breadcrumb { padding: 14px 0 8px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 6px; list-style: none; font-size: 13px; }
.breadcrumb li { display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.separator { color: #d1d5db; font-size: 14px; }

/* ============================================================
   分页
   ============================================================ */
.pagination { margin: 36px 0 16px; display: flex; justify-content: center; }
.pagination ul { display: flex; gap: 6px; list-style: none; flex-wrap: wrap; justify-content: center; }
.page-link {
  display: flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px;
  border: 1.5px solid var(--border); border-radius: 6px;
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  background: var(--surface); transition: var(--transition);
}
.page-link:hover, .page-link.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.page-ellipsis { display: flex; align-items: center; color: var(--text-light); font-size: 14px; }

/* ============================================================
   归档/分类页
   ============================================================ */
.archive-header { padding: 28px 0 16px; }
.archive-cover { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 20px; max-height: 260px; }
.archive-cover img { width: 100%; height: 100%; object-fit: cover; }
.archive-title { font-size: clamp(22px, 4vw, 32px); font-weight: 800; margin-bottom: 10px; }
.archive-desc { color: var(--text-muted); font-size: 15px; margin-bottom: 6px; }
.archive-count { color: var(--text-light); font-size: 13px; }

/* ============================================================
   搜索页
   ============================================================ */
.search-header { padding: 28px 0 16px; }
.search-box-large { margin: 20px 0 28px; display: flex; gap: 10px; max-width: 560px; }
.search-input-lg {
  flex: 1; padding: 12px 18px; border: 2px solid var(--border);
  border-radius: var(--radius); font-size: 15px; transition: var(--transition);
  background: var(--surface);
}
.search-input-lg:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}
@media (max-width: 480px) {
  .search-box-large { flex-direction: column; }
}

/* ============================================================
   独立页面
   ============================================================ */
.page-full {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border); margin-top: 16px;
}
@media (min-width: 640px) { .page-full { padding: 36px 40px; } }
.page-header { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.page-title { font-size: clamp(20px, 3vw, 28px); font-weight: 800; color: var(--text); }
.page-content { font-size: 16px; line-height: 1.85; }
.page-content h2 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; }
.page-content p { margin-bottom: 16px; }

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  background: #1e293b; color: #94a3b8;
  margin-top: 60px; padding: 40px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 28px; margin-bottom: 28px;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
}
.footer-brand { font-size: 18px; font-weight: 700; color: #f1f5f9; margin-bottom: 10px; }
.footer-about p { font-size: 14px; line-height: 1.7; margin-bottom: 6px; }
.footer-about a { color: #94a3b8; }
.footer-about a:hover { color: #e2e8f0; }
.social-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 14px; }
.footer-categories h4, .footer-pages h4 {
  font-size: 12px; font-weight: 700; color: #f1f5f9;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px;
}
.footer-categories ul, .footer-pages ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-categories a, .footer-pages a { font-size: 14px; color: #94a3b8; }
.footer-categories a:hover, .footer-pages a:hover { color: #e2e8f0; }
.footer-bottom {
  padding-top: 20px; border-top: 1px solid #334155;
  text-align: center; font-size: 13px;
}
.footer-bottom a { color: #64748b; }
.footer-bottom a:hover { color: #94a3b8; }

/* ============================================================
   空状态 / 提示
   ============================================================ */
.empty-state { text-align: center; padding: 56px 24px; color: var(--text-muted); }
.empty-state p { font-size: 15px; }

/* ============================================================
   暗色模式
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0f172a;
    --surface:     #1e293b;
    --text:        #f1f5f9;
    --text-muted:  #94a3b8;
    --text-light:  #64748b;
    --border:      #334155;
    --border-light:#1e293b;
    --primary-light:#1e3a5f;
  }
  .hero { background: linear-gradient(135deg, #0f172a, #1e3a5f); }
  .featured-section { background: #111827; border-top-color: #1e3a5f; }
  .toc, .widget { background: #1e293b; }
  .article-excerpt { background: #1e3a5f; }
  .card-category { background: #1e3a5f; }
  .article-content pre { background: #0f172a; }
  .article-content code { background: #1e293b; color: #f87171; }
  .search-input, .search-input-lg { background: #1e293b; color: var(--text); border-color: var(--border); }
  .toc { background: #1a2744; }
  .article-content th { background: #1a2744; }
}

/* ============================================================
   打印
   ============================================================ */
@media print {
  .site-header, .sidebar, .related-articles,
  .site-footer, .pagination, .nav-search { display: none !important; }
  .content-layout { grid-template-columns: 1fr !important; }
  .article-full { box-shadow: none; padding: 0; border: none; }
  a { color: var(--text); }
  .article-content pre { white-space: pre-wrap; }
}

/* GEO 响应式表格：宽对比表在容器内横向滚动，避免撑破页面（超过一屏） */
.article-body table,.article-content table,.post-content table,.entry-content table,.prose table,.markdown-body table,.content table,.content-area table,article table,.geo-table-wrap>table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
