/* ===================================================================
   知识集 · 全站共用样式
   包含：首页 / 列表页 / 文章详情页
   ===================================================================

   第三方资源与授权声明
   --------------------
   本站界面图标使用 Font Awesome Free 6.x（https://fontawesome.com）
     · 图标（Icons）：CC BY 4.0  —— 需署名，见页脚「图标来自 Font Awesome Free」
     · 字体（Fonts）：SIL OFL 1.1
     · 代码（CSS/JS）：MIT License
   引用方式：<link rel="stylesheet" href="/css/font-awesome/all.min.css">
   如需替换为其它图标库（MIT/Apache 授权、无署名义务），改上述引用并替换
   模板里的 fa-* 类名即可，样式本身不依赖图标库。

   =================================================================== */

/* ===== 变量与重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --primary: #1a3a4a;
  --primary-light: #2b5568;
  --accent: #e67e22;
  --accent-soft: #fdf0e5;
  --text-main: #1a2933;
  --text-soft: #6b7f8c;
  --text-mute: #9aacb8;
  --border: #e8edf1;
  --border-soft: #f0f4f7;
  --shadow-sm: 0 2px 10px rgba(20, 40, 60, 0.04);
  --shadow-md: 0 10px 30px -12px rgba(20, 40, 60, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --sidebar-w: 260px;
}

body {
  font-family: 'Inter', -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ===================================================================
   顶部导航
   =================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}

.topbar-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.top-nav { display: flex; gap: 4px; flex-shrink: 0; }

.top-nav a {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.18s;
}

.top-nav a:hover { color: var(--primary); background: var(--border-soft); }
.top-nav a.active { color: var(--primary); background: var(--border-soft); font-weight: 600; }

.top-search {
  flex: 1;
  max-width: 460px;
  margin: 0 auto;
  position: relative;
}

.top-search input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.18s;
  font-family: inherit;
}

.top-search input::placeholder { color: var(--text-mute); }
.top-search input:focus {
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 3px rgba(43, 85, 104, 0.08);
}

.top-search i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-mute);
  font-size: 0.85rem;
}

.top-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.btn-write {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0 18px;
  height: 40px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  text-decoration: none;
}

.btn-write:hover { background: var(--primary-light); transform: translateY(-1px); }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
}

.icon-btn:hover { color: var(--primary); border-color: var(--border); background: var(--bg); }

.icon-btn .dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  border: 1.5px solid white;
}

/* 原头像（隐藏保留） */
.top-avatar {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f3d9bd, #e0b58a);
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: #4a3520;
  cursor: pointer;
  flex-shrink: 0;
}

/* 登录按钮 */
.btn-login {
  display: flex;
  align-items: center;
  gap: 7px;
  background: white;
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 0 18px;
  height: 40px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  text-decoration: none;
}

.btn-login:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ===================================================================
   主布局
   =================================================================== */
.layout {
  max-width: 1500px;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 36px;
  align-items: start;
}

/* 单栏布局（文章页用） */
.layout-single {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 36px;
  align-items: start;
}

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

.side-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
}

.side-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 14px;
}

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

.tag-cloud a {
  text-decoration: none;
  font-size: 0.8rem;
  color: var(--text-soft);
  background: var(--bg);
  border: 1px solid var(--border-soft);
  padding: 5px 12px;
  border-radius: 20px;
  transition: all 0.18s;
}

.tag-cloud a:hover { background: var(--primary); color: white; border-color: var(--primary); }
.tag-cloud a.hot { background: var(--accent-soft); color: #b85e1a; border-color: #f5d9c2; }

/* 热榜 */
.rank-list { display: flex; flex-direction: column; gap: 2px; }

.rank-item {
  display: flex;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.18s;
  align-items: flex-start;
}

.rank-item:hover { background: var(--bg); }

.rank-num {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--border-soft);
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.rank-item:nth-child(1) .rank-num { background: var(--accent); color: white; }
.rank-item:nth-child(2) .rank-num { background: #f5b041; color: white; }
.rank-item:nth-child(3) .rank-num { background: #f8c471; color: white; }

.rank-title { font-size: 0.85rem; color: var(--text-main); line-height: 1.4; font-weight: 500; }
.rank-meta { font-size: 0.72rem; color: var(--text-mute); margin-top: 3px; }

/* 分类导航 */
.cat-nav { display: flex; flex-direction: column; gap: 2px; }

.cat-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.18s;
  color: var(--text-main);
}

.cat-nav-item:hover { background: var(--bg); }
.cat-nav-item.active { background: var(--accent-soft); }

.cat-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.cat-info { flex: 1; min-width: 0; }
.cat-name { font-size: 0.88rem; font-weight: 500; color: var(--text-main); }
.cat-count { font-size: 0.72rem; color: var(--text-mute); margin-top: 1px; }

/* 站点统计卡 */
.stat-card {
  background: linear-gradient(150deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
}

.stat-card .side-card-title { color: rgba(255,255,255,0.55); }

.stat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

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

.stat-row i { width: 20px; text-align: center; color: var(--accent); font-size: 0.9rem; }
.stat-row .label { font-size: 0.82rem; color: rgba(255,255,255,0.75); flex: 1; }
.stat-row .value { font-size: 0.95rem; font-weight: 700; color: white; }

/* ===================================================================
   主内容区
   =================================================================== */
.main { min-width: 0; display: flex; flex-direction: column; gap: 32px; }

/* 区块标题 */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-head h2 .bar {
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

.section-head .more {
  font-size: 0.85rem;
  color: var(--text-soft);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.18s;
}

.section-head .more:hover { color: var(--accent); }

/* ===================================================================
   横向滑动条
   =================================================================== */
.hscroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.hscroll::-webkit-scrollbar { height: 6px; }
.hscroll::-webkit-scrollbar-track { background: transparent; }
.hscroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.hscroll::-webkit-scrollbar-thumb:hover { background: var(--text-mute); }

.hscroll-item {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: all 0.22s;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.hscroll-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border); }

.hscroll-item .cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.hscroll-item h4 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--primary);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.hscroll-item p {
  font-size: 0.83rem;
  color: var(--text-soft);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hscroll-item .meta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-mute);
}

/* ===================================================================
   杂志化文章网格（首页）
   =================================================================== */
.magazine-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 20px;
}

.post {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.post:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border); }

.post-cat {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--primary);
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}

.post-excerpt {
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.78rem;
  color: var(--text-mute);
}

.post-author { display: flex; align-items: center; gap: 8px; }

.post-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8eef2, #d3dee6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.post-time { display: flex; align-items: center; gap: 5px; }

.post.large {
  grid-column: span 2;
  grid-row: span 2;
  padding: 36px;
  background: linear-gradient(155deg, #ffffff, #f4f9fc);
  border-left: 4px solid var(--accent);
}

.post.large .post-title { font-size: 1.9rem; line-height: 1.25; margin-bottom: 16px; }
.post.large .post-excerpt { font-size: 1rem; -webkit-line-clamp: 4; max-width: 90%; }

.post.large::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230,126,34,0.06), transparent 70%);
  pointer-events: none;
}

.post.tall { grid-row: span 2; }

.post.accent {
  background: linear-gradient(150deg, #1a3a4a, #2b5568);
  color: white;
  border: none;
}

.post.accent .post-cat { color: var(--accent); }
.post.accent .post-title { color: white; }
.post.accent .post-excerpt { color: rgba(255,255,255,0.75); }
.post.accent .post-meta { border-color: rgba(255,255,255,0.12); color: rgba(255,255,255,0.6); }
.post.accent .post-avatar { background: rgba(255,255,255,0.15); color: white; }

/* ===================================================================
   列表页专用
   =================================================================== */

/* 页面顶部条 */
.page-hero {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230,126,34,0.08), transparent 70%);
  pointer-events: none;
}

.page-hero .breadcrumb {
  font-size: 0.82rem;
  color: var(--text-mute);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-hero .breadcrumb a { text-decoration: none; color: var(--text-soft); }
.page-hero .breadcrumb a:hover { color: var(--accent); }
.page-hero .breadcrumb i { font-size: 0.65rem; color: var(--text-mute); }

.page-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.page-hero .desc {
  font-size: 0.95rem;
  color: var(--text-soft);
  max-width: 640px;
  position: relative;
  z-index: 1;
}

.page-hero .page-meta {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  position: relative;
  z-index: 1;
}

.page-hero .page-meta span {
  font-size: 0.82rem;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 7px;
}

.page-hero .page-meta i { color: var(--accent); }

/* 搜索大框（列表页顶部） */
.search-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-panel .search-box {
  flex: 1;
  min-width: 260px;
  position: relative;
}

.search-panel .search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-mute);
  font-size: 0.9rem;
}

.search-panel .search-box input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 46px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.18s;
  font-family: inherit;
  color: var(--text-main);
}

.search-panel .search-box input::placeholder { color: var(--text-mute); }
.search-panel .search-box input:focus {
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 3px rgba(43, 85, 104, 0.08);
}

.search-panel .search-btn {
  height: 48px;
  padding: 0 28px;
  border-radius: 12px;
  border: none;
  background: var(--primary);
  color: white;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-panel .search-btn:hover { background: var(--primary-light); }

/* 筛选栏 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.filter-bar .filter-label {
  font-size: 0.85rem;
  color: var(--text-mute);
  font-weight: 500;
}

.filter-chip {
  font-size: 0.82rem;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.18s;
  cursor: pointer;
}

.filter-chip:hover { border-color: var(--primary-light); color: var(--primary); }
.filter-chip.active { background: var(--primary); color: white; border-color: var(--primary); }

/* 工具条（结果数 + 排序） */
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.list-toolbar .result-count {
  font-size: 0.85rem;
  color: var(--text-soft);
}

.list-toolbar .result-count b { color: var(--primary); }

.sort-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 4px;
}

.sort-tabs a {
  font-size: 0.82rem;
  color: var(--text-soft);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 7px;
  transition: all 0.18s;
}

.sort-tabs a:hover { color: var(--primary); }
.sort-tabs a.active { background: var(--primary); color: white; }

/* 列表行（横向卡片） */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-row {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 28px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 28px;
  text-decoration: none;
  color: inherit;
  transition: all 0.22s;
  position: relative;
  overflow: hidden;
}

.post-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border); }

.post-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.22s;
}

.post-row:hover::before { opacity: 1; }

.post-row-main { min-width: 0; display: flex; flex-direction: column; }

.post-row .post-cat {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-row .post-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--primary);
  letter-spacing: -0.015em;
  margin-bottom: 10px;
  transition: color 0.18s;
}

.post-row:hover .post-title { color: var(--primary-light); }

.post-row .post-excerpt {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

.post-row .post-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: auto;
  padding-top: 0;
  border-top: none;
  font-size: 0.78rem;
  color: var(--text-mute);
}

.post-row .post-meta span { display: flex; align-items: center; gap: 5px; }

/* 行右侧缩略图占位 */
.post-row-thumb {
  width: 180px;
  height: 120px;
  border-radius: var(--radius-sm);
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  flex-shrink: 0;
}

/* 空状态 */
.empty-state {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 60px 32px;
  text-align: center;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
}

.empty-state i {
  font-size: 3rem;
  color: var(--border);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.88rem;
  color: var(--text-soft);
}

/* ===================================================================
   文章详情页
   =================================================================== */

/* 文章头部 */
.article-header {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 44px 48px 36px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.article-header::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230,126,34,0.07), transparent 70%);
  pointer-events: none;
}

.article-header .breadcrumb {
  font-size: 0.82rem;
  color: var(--text-mute);
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.article-header .breadcrumb a { text-decoration: none; color: var(--text-soft); }
.article-header .breadcrumb a:hover { color: var(--accent); }
.article-header .breadcrumb i { font-size: 0.6rem; }

.article-header .post-cat {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.article-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--primary);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.article-header .article-lead {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.7;
  max-width: 760px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.article-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  position: relative;
  z-index: 1;
}

.article-info-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.article-info-left .author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-info-left .author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8eef2, #d3dee6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.article-info-left .author-name { font-weight: 600; color: var(--text-main); }
.article-info-left .meta-dot { width: 3px; height: 3px; background: var(--text-mute); border-radius: 50%; }
.article-info-left .info-item { display: flex; align-items: center; gap: 6px; }

.article-actions { display: flex; gap: 8px; }

.article-actions button {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
  font-size: 0.9rem;
}

.article-actions button:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* 文章主体 */
.article-body {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 44px 48px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-main);
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin: 28px 0 12px;
}

.article-body p { margin-bottom: 18px; }

.article-body ul, .article-body ol {
  margin: 0 0 18px 22px;
}

.article-body li { margin-bottom: 8px; }

.article-body strong { color: var(--primary); font-weight: 700; }

.article-body blockquote {
  background: var(--bg);
  border-left: 4px solid var(--accent);
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
  color: var(--text-soft);
  font-style: italic;
}

.article-body blockquote p:last-child { margin-bottom: 0; }

.article-body code {
  background: var(--bg);
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.88em;
  color: #b85e1a;
}

.article-body pre {
  background: #1a2933;
  color: #e8eef2;
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 24px 0;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.6;
}

.article-body pre code { background: none; color: inherit; padding: 0; }

.article-body img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 24px 0;
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 40px 0;
}

/* 文末标签 */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
}

.article-tags .tag-label {
  font-size: 0.82rem;
  color: var(--text-mute);
  margin-right: 6px;
  align-self: center;
}

.article-tags a {
  font-size: 0.8rem;
  color: var(--text-soft);
  background: var(--bg);
  border: 1px solid var(--border-soft);
  padding: 5px 14px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.18s;
}

.article-tags a:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* 上一篇 / 下一篇 */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.article-nav-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: all 0.22s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-nav-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border); }

.article-nav-item .nav-label {
  font-size: 0.75rem;
  color: var(--text-mute);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.article-nav-item .nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.4;
}

.article-nav-item.next { text-align: right; align-items: flex-end; }

/* 文章右侧栏 */
.article-side {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 目录卡 */
.toc-list { display: flex; flex-direction: column; gap: 2px; }

.toc-list a {
  font-size: 0.85rem;
  color: var(--text-soft);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: all 0.18s;
  line-height: 1.4;
}

.toc-list a:hover { color: var(--primary); background: var(--bg); }

.toc-list a.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-left-color: var(--accent);
  font-weight: 600;
}

.toc-list a.sub { padding-left: 26px; font-size: 0.8rem; }

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

.page-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid var(--border-soft);
  text-decoration: none;
  transition: all 0.18s;
}

.page-btn:hover { background: var(--bg); color: var(--primary); border-color: var(--border); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ===================================================================
   页脚
   =================================================================== */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.6);
  margin-top: 40px;
  padding: 24px 32px;
}

.footer-inner {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.footer-inner .heart { color: var(--accent); }

/* ===================================================================
   响应式
   =================================================================== */
@media (max-width: 1100px) {
  .layout, .layout-single { grid-template-columns: 1fr; padding: 24px; }
  .sidebar, .article-side { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .magazine-grid { grid-template-columns: repeat(2, 1fr); }
  .post.large { grid-column: span 2; grid-row: span 1; }
  .top-nav { display: none; }
  .post-row { grid-template-columns: 1fr; }
  .post-row-thumb { display: none; }
}

@media (max-width: 720px) {
  .topbar-inner { padding: 0 16px; gap: 12px; }
  .top-search { display: none; }
  .layout, .layout-single { padding: 16px; gap: 20px; }
  .sidebar, .article-side { grid-template-columns: 1fr; }
  .magazine-grid { grid-template-columns: 1fr; }
  .post.large { grid-column: span 1; padding: 26px; }
  .post.large .post-title { font-size: 1.4rem; }
  .footer-inner { flex-direction: column; gap: 10px; text-align: center; }
  .btn-login { padding: 0 12px; }
  .article-header { padding: 28px 22px; }
  .article-header h1 { font-size: 1.6rem; }
  .article-body { padding: 28px 22px; }
  .article-nav { grid-template-columns: 1fr; }
  .search-panel { padding: 18px; }
  .search-panel .search-btn { width: 100%; justify-content: center; }
}