/* ===== 51吃瓜网 主题变量 ===== */
:root {
  --primary-color: #b42318;
  --primary-dark: #8f1d14;
  --accent-color: #e85d04;
  --heading-color: #1f2937;
  --text-color: #4b5563;
  --muted-color: #6b7280;
  --background-color: #ffffff;
  --section-background: #f7f7f8;
  --border-color: #e5e7eb;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --container-width: 1200px;
  --transition: 0.25s ease;
}

/* ===== 基础重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-color);
  background: var(--background-color);
}
a { color: var(--primary-color); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-color); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { color: var(--heading-color); font-weight: 700; line-height: 1.3; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }

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

/* ===== 顶部信息栏 ===== */
.top-bar { background: var(--primary-dark); color: #fff; font-size: 0.82rem; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; height: 36px; }
.top-bar a { color: rgba(255,255,255,0.85); }
.top-bar a:hover { color: #fff; }
.top-bar-left { display: flex; gap: 18px; }
.top-bar-right { display: flex; gap: 14px; align-items: center; }
.top-bar-date { opacity: 0.8; }

/* ===== 头部 ===== */
.site-header { background: #fff; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }
.header-main { display: flex; align-items: center; gap: 24px; padding: 14px 0; }

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1.1rem; letter-spacing: -1px;
  box-shadow: 0 3px 8px rgba(180,35,24,0.3);
}
.logo-text { font-size: 1.5rem; font-weight: 800; color: var(--primary-color); letter-spacing: -0.5px; line-height: 1; }
.logo-text span { color: var(--heading-color); }

/* 搜索框 */
.search-box { flex: 1; max-width: 460px; display: flex; }
.search-box input {
  flex: 1; height: 42px; padding: 0 16px; border: 2px solid var(--border-color);
  border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); outline: none; font-size: 0.92rem; color: var(--text-color);
  transition: border-color var(--transition);
}
.search-box input:focus { border-color: var(--primary-color); }
.search-box button {
  height: 42px; padding: 0 22px; background: var(--primary-color); color: #fff;
  border: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; cursor: pointer; font-size: 0.9rem; font-weight: 600;
  transition: background var(--transition);
}
.search-box button:hover { background: var(--primary-dark); }

/* 快捷入口 */
.quick-links { display: flex; gap: 8px; flex-shrink: 0; }
.quick-links a {
  padding: 7px 14px; border: 1px solid var(--border-color); border-radius: 20px;
  font-size: 0.82rem; color: var(--muted-color); transition: all var(--transition);
}
.quick-links a:hover { border-color: var(--primary-color); color: var(--primary-color); }

/* ===== 主导航 ===== */
.main-nav { background: var(--primary-color); }
.main-nav ul { display: flex; }
.main-nav li { position: relative; }
.main-nav a {
  display: block; padding: 14px 22px; color: #fff; font-size: 1rem; font-weight: 600;
  transition: background var(--transition);
}
.main-nav a:hover, .main-nav a.active { background: var(--primary-dark); color: #fff; }
.main-nav a::after {
  content: ""; position: absolute; bottom: 0; left: 50%; width: 0; height: 3px;
  background: var(--accent-color); transition: all var(--transition); transform: translateX(-50%);
}
.main-nav a:hover::after, .main-nav a.active::after { width: 60%; }

/* 移动端菜单按钮 */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span {
  display: block; width: 24px; height: 2px; background: var(--primary-color);
  margin: 5px 0; transition: var(--transition); border-radius: 2px;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== 面包屑 ===== */
.breadcrumb { padding: 14px 0; font-size: 0.85rem; color: var(--muted-color); }
.breadcrumb a { color: var(--muted-color); }
.breadcrumb a:hover { color: var(--primary-color); }
.breadcrumb span { margin: 0 6px; color: var(--border-color); }
.breadcrumb .current { color: var(--text-color); }

/* ===== 区块通用 ===== */
.section { padding: 28px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { display: flex; align-items: center; gap: 10px; }
.section-title h2 { font-size: 1.3rem; }
.section-title .section-h1 { font-size: 1.3rem; font-weight: 700; }
.section-title .bar { width: 4px; height: 22px; background: var(--primary-color); border-radius: 2px; }
.section-more { font-size: 0.85rem; color: var(--muted-color); }
.section-more:hover { color: var(--primary-color); }
.section-gray { background: var(--section-background); }

/* ===== 热点头条 ===== */
.hero-area { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.hero-main {
  position: relative; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md);
  aspect-ratio: 16/9;
}
.hero-main img { width: 100%; height: 100%; object-fit: cover; }
.hero-main .hero-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 24px 20px 18px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
}
.hero-main .hero-tag {
  display: inline-block; padding: 3px 10px; background: var(--primary-color); color: #fff;
  font-size: 0.75rem; border-radius: 4px; margin-bottom: 8px;
}
.hero-main h2 { color: #fff; font-size: 1.5rem; margin-bottom: 6px; }
.hero-main p { color: rgba(255,255,255,0.8); font-size: 0.88rem; }
.hero-side { display: flex; flex-direction: column; gap: 10px; }
.hero-side-item {
  display: flex; gap: 12px; padding: 12px; background: var(--section-background);
  border-radius: var(--radius-sm); transition: var(--transition); border-left: 3px solid transparent;
}
.hero-side-item:hover { border-left-color: var(--primary-color); background: #fff; box-shadow: var(--shadow-sm); }
.hero-side-item .rank { font-size: 1.1rem; font-weight: 800; color: var(--primary-color); flex-shrink: 0; min-width: 22px; }
.hero-side-item:nth-child(n+4) .rank { color: var(--muted-color); }
.hero-side-item h3 { font-size: 0.95rem; line-height: 1.4; }
.hero-side-item .meta { font-size: 0.78rem; color: var(--muted-color); margin-top: 4px; }

/* ===== 焦点大图+热点列表 ===== */
.focus-area { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.focus-main {
  position: relative; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md);
  aspect-ratio: 16/10;
}
.focus-main img { width: 100%; height: 100%; object-fit: cover; }
.focus-main .focus-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
}
.focus-main h3 { color: #fff; font-size: 1.15rem; }
.focus-list { display: flex; flex-direction: column; gap: 12px; }
.focus-list-item { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px dashed var(--border-color); }
.focus-list-item:last-child { border-bottom: none; }
.focus-list-item .num {
  width: 22px; height: 22px; background: var(--primary-color); color: #fff; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; flex-shrink: 0;
}
.focus-list-item:nth-child(n+4) .num { background: var(--border-color); color: var(--muted-color); }
.focus-list-item h3 { font-size: 0.95rem; line-height: 1.4; margin-bottom: 4px; }
.focus-list-item .meta { font-size: 0.78rem; color: var(--muted-color); }

/* ===== 文章卡片网格 ===== */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-md);
  overflow: hidden; transition: var(--transition); display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: transparent; }
.card-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--section-background); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.card:hover .card-thumb img { transform: scale(1.05); }
.card-body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.card-body .tag {
  display: inline-block; padding: 2px 8px; background: rgba(180,35,24,0.08); color: var(--primary-color);
  font-size: 0.75rem; border-radius: 4px; margin-bottom: 8px; align-self: flex-start;
}
.card-body h3 { font-size: 1rem; line-height: 1.45; margin-bottom: 8px; }
.card-body p { font-size: 0.85rem; color: var(--muted-color); line-height: 1.6; margin-bottom: 12px; flex: 1; }
.card-body .meta { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted-color); }

/* ===== 大图文卡片（热门事件） ===== */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card {
  position: relative; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm);
  aspect-ratio: 4/3; transition: var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.feature-card img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.feature-card:hover img { transform: scale(1.06); }
.feature-card .overlay {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 16px 14px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
}
.feature-card .badge {
  display: inline-block; padding: 3px 10px; background: var(--accent-color); color: #fff;
  font-size: 0.72rem; border-radius: 4px; margin-bottom: 8px; font-weight: 600;
}
.feature-card h3 { color: #fff; font-size: 1.05rem; line-height: 1.4; }

/* ===== 文字资讯列表（娱乐动态） ===== */
.text-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
.text-list li {
  display: flex; align-items: center; gap: 10px; padding: 11px 0;
  border-bottom: 1px dashed var(--border-color);
}
.text-list li .dot { width: 6px; height: 6px; background: var(--primary-color); border-radius: 50%; flex-shrink: 0; }
.text-list li a { color: var(--heading-color); font-size: 0.95rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-list li a:hover { color: var(--primary-color); }
.text-list li .date { font-size: 0.78rem; color: var(--muted-color); flex-shrink: 0; }

/* ===== 标签云 + 文章列表（网络热点） ===== */
.topic-area { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud a {
  padding: 7px 14px; background: var(--section-background); border: 1px solid var(--border-color);
  border-radius: 20px; font-size: 0.85rem; color: var(--text-color); transition: var(--transition);
}
.tag-cloud a:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.topic-list { display: flex; flex-direction: column; gap: 14px; }
.topic-item { display: flex; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border-color); }
.topic-item:last-child { border-bottom: none; }
.topic-item img { width: 140px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.topic-item .info h3 { font-size: 1rem; margin-bottom: 6px; }
.topic-item .info p { font-size: 0.85rem; color: var(--muted-color); margin-bottom: 8px; }
.topic-item .info .meta { font-size: 0.78rem; color: var(--muted-color); }

/* ===== 排行榜 ===== */
/* 排行榜（单列） */
.rank-box { background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 18px; }
.rank-box h3 { font-size: 1.05rem; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-color); display: inline-block; }
.rank-box .rank-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border-color); }
.rank-box .rank-list li:last-child { border-bottom: none; }
.rank-box .rank-list li .num {
  width: 24px; height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; flex-shrink: 0; background: var(--border-color); color: var(--muted-color);
}
.rank-box .rank-list li:nth-child(1) .num { background: var(--primary-color); color: #fff; }
.rank-box .rank-list li:nth-child(2) .num { background: var(--accent-color); color: #fff; }
.rank-box .rank-list li:nth-child(3) .num { background: #d97706; color: #fff; }
.rank-box .rank-list li a { color: var(--heading-color); font-size: 0.92rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-box .rank-list li a:hover { color: var(--primary-color); }

/* ===== 公告 ===== */
.notice-list { background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 8px 20px; }
.notice-list li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--border-color); }
.notice-list li:last-child { border-bottom: none; }
.notice-list li .tag { padding: 2px 8px; background: var(--primary-color); color: #fff; font-size: 0.72rem; border-radius: 3px; flex-shrink: 0; }
.notice-list li a { color: var(--heading-color); font-size: 0.95rem; flex: 1; }
.notice-list li a:hover { color: var(--primary-color); }
.notice-list li .date { font-size: 0.78rem; color: var(--muted-color); }
.notice-single { background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 20px 24px; }
.notice-single p { font-size: 0.92rem; color: var(--text-color); line-height: 1.8; }

/* ===== 友情链接 ===== */
.friend-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.friend-links span { font-size: 0.88rem; color: var(--muted-color); font-weight: 600; }
.friend-links a { padding: 5px 12px; background: var(--section-background); border-radius: 4px; font-size: 0.82rem; color: var(--text-color); }
.friend-links a:hover { background: var(--primary-color); color: #fff; }

/* ===== 页脚 ===== */
.site-footer { background: #1a1a1a; color: #999; padding: 40px 0 20px; margin-top: 20px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 30px; border-bottom: 1px solid #333; }
.footer-brand .logo-text { color: #fff; }
.footer-brand .logo-text span { color: var(--accent-color); }
.footer-brand p { font-size: 0.85rem; line-height: 1.8; margin-top: 14px; color: #888; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #999; font-size: 0.85rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { padding-top: 20px; text-align: center; font-size: 0.82rem; color: #666; }
.footer-bottom p { margin-bottom: 4px; }
.footer-bottom .icp { color: #555; }

/* ===== 列表页 ===== */
.list-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.list-header { margin-bottom: 20px; }
.list-header h1 { font-size: 1.6rem; margin-bottom: 8px; }
.list-header p { font-size: 0.9rem; color: var(--muted-color); }
.article-list { display: flex; flex-direction: column; gap: 16px; }
.article-item {
  display: flex; gap: 16px; padding: 16px; background: #fff;
  border: 1px solid var(--border-color); border-radius: var(--radius-md); transition: var(--transition);
}
.article-item:hover { box-shadow: var(--shadow-md); border-color: transparent; }
.article-item .thumb { width: 200px; aspect-ratio: 16/9; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--section-background); }
.article-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-item.no-thumb .thumb { display: none; }
.article-item .content { flex: 1; display: flex; flex-direction: column; }
.article-item .content .tag { display: inline-block; padding: 2px 8px; background: rgba(180,35,24,0.08); color: var(--primary-color); font-size: 0.72rem; border-radius: 4px; margin-bottom: 8px; align-self: flex-start; }
.article-item h3 { font-size: 1.1rem; margin-bottom: 8px; }
.article-item p { font-size: 0.88rem; color: var(--muted-color); margin-bottom: 12px; flex: 1; line-height: 1.6; }
.article-item .meta { display: flex; gap: 16px; font-size: 0.78rem; color: var(--muted-color); }

/* 侧边栏 */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-box { background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 18px; }
.sidebar-box h3 { font-size: 1.05rem; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-color); display: inline-block; }
.sidebar-hot.rank-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border-color); }
.sidebar-hot.rank-list li:last-child { border-bottom: none; }
.sidebar-hot.rank-list li .num { width: 22px; height: 22px; border-radius: 4px; background: var(--border-color); color: var(--muted-color); display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; flex-shrink: 0; }
.sidebar-hot.rank-list li:nth-child(1) .num { background: var(--primary-color); color: #fff; }
.sidebar-hot.rank-list li:nth-child(2) .num { background: var(--accent-color); color: #fff; }
.sidebar-hot.rank-list li:nth-child(3) .num { background: #d97706; color: #fff; }
.sidebar-hot.rank-list li a { color: var(--heading-color); font-size: 0.88rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-hot.rank-list li a:hover { color: var(--primary-color); }

/* ===== CSS counter 序号 ===== */
.rank-list { counter-reset: rank-number; list-style: none; padding: 0; margin: 0; }
.rank-list li { counter-increment: rank-number; }
.rank-list .num::before { content: counter(rank-number, decimal-leading-zero); }
.hero-side { counter-reset: side-rank; }
.hero-side-item { counter-increment: side-rank; }
.hero-side-item .rank::before { content: counter(side-rank, decimal-leading-zero); }

/* ===== 首页主标题 ===== */
.site-main-title { font-size: 1.5rem; font-weight: 700; color: var(--heading-color); text-align: center; padding: 16px 0 8px; margin: 0; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 30px 0; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: 0.88rem; color: var(--text-color);
  padding: 0 10px; transition: var(--transition);
}
.pagination a:hover { border-color: var(--primary-color); color: var(--primary-color); }
.pagination .current { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.pagination .disabled { color: var(--border-color); cursor: not-allowed; }

/* ===== 文章详情页 ===== */
.article-detail { max-width: 820px; margin: 0 auto; }
.article-detail h1 { font-size: 1.8rem; line-height: 1.4; margin-bottom: 16px; }
.article-meta { display: flex; gap: 20px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--border-color); margin-bottom: 24px; font-size: 0.85rem; color: var(--muted-color); }
.article-meta span { display: flex; align-items: center; gap: 5px; }
.article-content { font-size: 1rem; line-height: 1.9; color: var(--text-color); }
.article-content p { margin-bottom: 18px; }
.article-content h2 { font-size: 1.3rem; margin: 28px 0 14px; padding-left: 12px; border-left: 4px solid var(--primary-color); }
.article-content h3 { font-size: 1.1rem; margin: 22px 0 10px; }
.article-content img { border-radius: var(--radius-md); margin: 18px 0; max-width: 100%; height: auto; }
.article-content blockquote {
  margin: 20px 0; padding: 16px 20px; background: var(--section-background);
  border-left: 4px solid var(--accent-color); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted-color);
}
.article-content ul, .article-content ol { margin: 16px 0; padding-left: 24px; }
.article-content ul li, .article-content ol li { margin-bottom: 8px; list-style: disc; }
.article-content ol li { list-style: decimal; }
.article-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.article-content table th, .article-content table td { border: 1px solid var(--border-color); padding: 10px 14px; text-align: left; font-size: 0.9rem; }
.article-content table th { background: var(--section-background); font-weight: 700; }
.article-tags { margin: 24px 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.article-tags span { font-size: 0.85rem; color: var(--muted-color); }
.article-tags a { padding: 4px 12px; background: var(--section-background); border-radius: 20px; font-size: 0.82rem; }
.article-tags a:hover { background: var(--primary-color); color: #fff; }

/* 上下篇 */
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 30px 0; }
.prev-next .pn-item { padding: 14px 16px; background: var(--section-background); border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.prev-next .pn-item:hover { border-color: var(--primary-color); }
.prev-next .pn-label { font-size: 0.78rem; color: var(--muted-color); margin-bottom: 4px; }
.prev-next .pn-item a { font-size: 0.92rem; color: var(--heading-color); }
.prev-next .pn-item:hover a { color: var(--primary-color); }
.back-to-list { text-align: center; margin: 20px 0; }
.back-to-list a { display: inline-block; padding: 10px 28px; background: var(--primary-color); color: #fff; border-radius: 24px; font-size: 0.9rem; transition: var(--transition); }
.back-to-list a:hover { background: var(--primary-dark); }

/* 相关文章 */
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* 详情页布局 */
.detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 30px; }
.detail-main { min-width: 0; }

/* ===== 单页 ===== */
.single-page { max-width: 760px; margin: 0 auto; }
.single-page h1 { font-size: 1.7rem; margin-bottom: 20px; text-align: center; }
.single-page .content { font-size: 1rem; line-height: 1.9; }
.single-page .content p { margin-bottom: 16px; }
.single-page .content h2 { font-size: 1.25rem; margin: 24px 0 12px; }
.single-page .info-box { background: var(--section-background); border-radius: var(--radius-md); padding: 20px; margin: 16px 0; }
.single-page .info-box p { margin-bottom: 8px; }
.single-page .info-box .label { color: var(--heading-color); font-weight: 600; }

/* ===== 搜索页 ===== */
.search-header { text-align: center; padding: 30px 0; }
.search-header h1 { font-size: 1.5rem; margin-bottom: 16px; }
.search-header .search-box-large { max-width: 560px; margin: 0 auto; display: flex; }
.search-header .search-box-large input { flex: 1; height: 48px; padding: 0 18px; border: 2px solid var(--border-color); border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); outline: none; font-size: 1rem; }
.search-header .search-box-large input:focus { border-color: var(--primary-color); }
.search-header .search-box-large button { height: 48px; padding: 0 28px; background: var(--primary-color); color: #fff; border: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; cursor: pointer; font-size: 0.95rem; font-weight: 600; }
.search-header .search-box-large button:hover { background: var(--primary-dark); }
.search-meta { font-size: 0.88rem; color: var(--muted-color); margin-bottom: 20px; }
.search-meta strong { color: var(--primary-color); }

/* ===== 标签页 ===== */
.tag-header { text-align: center; padding: 24px 0; }
.tag-header .tag-title { font-size: 1.5rem; margin-bottom: 8px; }
.tag-header .tag-title span { color: var(--primary-color); }
.tag-header p { font-size: 0.88rem; color: var(--muted-color); }

/* ===== 404 ===== */
.error-page { text-align: center; padding: 60px 20px; min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.error-page .error-illustration { margin-bottom: 30px; }
.error-page h1 { font-size: 3rem; color: var(--primary-color); margin-bottom: 12px; }
.error-page p { font-size: 1rem; color: var(--muted-color); margin-bottom: 24px; }
.error-page .btn-group { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.error-page .btn { display: inline-block; padding: 11px 28px; border-radius: 24px; font-size: 0.92rem; font-weight: 600; transition: var(--transition); }
.error-page .btn-primary { background: var(--primary-color); color: #fff; }
.error-page .btn-primary:hover { background: var(--primary-dark); }
.error-page .btn-outline { border: 2px solid var(--border-color); color: var(--text-color); }
.error-page .btn-outline:hover { border-color: var(--primary-color); color: var(--primary-color); }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 50px 20px; }
.empty-state .icon { font-size: 3rem; color: var(--border-color); margin-bottom: 16px; }
.empty-state h3 { font-size: 1.15rem; color: var(--heading-color); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; color: var(--muted-color); }

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }

/* ===== 无JS回退 ===== */
.no-js .menu-toggle { display: none; }
.no-js .mobile-nav { display: none; }

/* 2026-07-28: content-matched local image set */
.category-banner { margin: 4px 0 28px; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--section-background); }
.category-banner img { display: block; width: 100%; aspect-ratio: 40/13; object-fit: cover; }
.single-banner { margin-top: 0; }
.article-figure { margin: 22px 0 26px; }
.article-figure img { display: block; width: 100%; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.article-figure figcaption { margin-top: 9px; color: var(--muted-color); font-size: .82rem; text-align: center; }
