/* 浅蓝主题 */
:root {
  --bg: #E8F4FD;
  --bg-card: #FFFFFF;
  --primary: #2980B9;
  --primary-light: #3498DB;
  --primary-dark: #1A6EA8;
  --text: #2C3E50;
  --text-muted: #7F8C8D;
  --border: #BDC3C7;
  --border-light: #D5E8F5;
  --link: #2980B9;
  --shadow-sm: 0 1px 4px rgba(41,128,185,0.10);
  --shadow-md: 0 4px 12px rgba(41,128,185,0.18);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
}

a { color: var(--link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

.container { max-width: 900px; margin: 0 auto; padding: 0 16px; }
main.container { padding-top: 24px; padding-bottom: 44px; }

/* ── 头部 ── */
.site-header {
  background: linear-gradient(135deg, #2980B9 0%, #1A6EA8 100%);
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(26,110,168,0.35);
}
.site-header h1 {
  margin: 0;
  font-size: 1.75rem;
  color: #fff;
  font-weight: 700;
}
.site-header .site-subtitle {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.80);
}
.site-header a { color: #fff; }
.site-header a:hover { color: rgba(255,255,255,0.85); text-decoration: none; }

/* ── 列表 ── */
.news-list { padding: 0; }
.news-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.news-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.news-item .title { font-size: 1.05rem; font-weight: 500; margin: 0 0 8px; }
.news-item .title a { color: var(--text); }
.news-item .title a:hover { color: var(--primary); text-decoration: none; }
.news-item .meta { font-size: 0.82rem; color: var(--text-muted); }
.news-item .meta span { margin-right: 16px; }

/* ── 分页（质感浮雕按钮）── */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 28px 0;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  user-select: none;
}
.pagination a {
  background: linear-gradient(180deg, #fff 0%, #e8f4fd 100%);
  border: 1px solid #b0cfe4;
  color: var(--primary);
  box-shadow: 0 2px 5px rgba(41,128,185,0.13), inset 0 1px 0 rgba(255,255,255,0.9);
  transition: all 0.15s;
}
.pagination a:hover {
  background: linear-gradient(180deg, #ebf5fb 0%, #d4ecf7 100%);
  border-color: var(--primary);
  box-shadow: 0 3px 9px rgba(41,128,185,0.22), inset 0 1px 0 rgba(255,255,255,0.8);
  transform: translateY(-1px);
  color: var(--primary-dark);
  text-decoration: none;
}
.pagination a:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 5px rgba(26,110,168,0.18);
}
.pagination .current {
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
  border: 1px solid var(--primary-dark);
  color: #fff;
  box-shadow: 0 3px 8px rgba(41,128,185,0.38), inset 0 1px 0 rgba(255,255,255,0.22);
}

/* ── 文章头部 ── */
.article-header {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px 28px 20px;
  margin-bottom: 14px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.breadcrumb { font-size: 0.82rem; margin-bottom: 14px; color: var(--text-muted); }
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: none; color: var(--primary-dark); }
.article-header h1 { font-size: 1.55rem; margin: 0 0 14px; line-height: 1.45; font-weight: 700; }
.article-meta { font-size: 0.85rem; color: var(--text-muted); }
.article-meta span, .article-meta time { margin-right: 20px; }

/* ── 文章导读 ── */
.article-intro {
  background: linear-gradient(135deg, #EBF5FB 0%, #D6EAF8 100%);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.intro-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.intro-body { font-size: 0.95rem; color: #2C3E50; line-height: 1.8; }

/* ── 目录 TOC ── */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.toc-title { font-size: 0.95rem; font-weight: 700; color: var(--text); }

.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { border-bottom: 1px dashed var(--border-light); }
.toc-list li:last-child { border-bottom: none; }
.toc-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  color: var(--text);
  font-size: 0.92rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.toc-list a:hover { color: var(--primary); background: var(--bg); text-decoration: none; }

/* 序号 */
.toc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 20px;
  padding: 0 5px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(41,128,185,0.30);
}
.toc-text { flex: 1; }

/* ── 字体工具栏 ── */
.font-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 7px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  width: fit-content;
  margin-left: auto;
}
.font-icon-sm { font-size: 0.78rem; color: var(--text-muted); font-weight: 700; user-select: none; }
.font-icon-lg { font-size: 1.1rem; color: var(--text-muted); font-weight: 700; user-select: none; }

/* Range 滑块（质感）*/
input[type="range"]#font-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 110px;
  height: 5px;
  background: linear-gradient(to right, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
input[type="range"]#font-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff 0%, #d4ecf7 100%);
  border: 2px solid var(--primary);
  box-shadow: 0 2px 6px rgba(41,128,185,0.42), inset 0 1px 0 rgba(255,255,255,0.9);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}
input[type="range"]#font-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 3px 10px rgba(41,128,185,0.60), inset 0 1px 0 rgba(255,255,255,0.9);
  transform: scale(1.2);
}
input[type="range"]#font-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff 0%, #d4ecf7 100%);
  border: 2px solid var(--primary);
  box-shadow: 0 2px 6px rgba(41,128,185,0.42);
  cursor: pointer;
}

/* ── 正文 ── */
.article-content {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  font-size: 16px;
  line-height: 1.9;
}
.article-content img { max-width: 100%; height: auto; border-radius: 4px; }
.article-content p { margin: 0 0 1.2em; }
.article-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 1.8em 0 0.8em;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.article-content h2::before {
  content: attr(data-num);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 20px;
  padding: 0 5px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(41,128,185,0.30);
}
.article-content h2:first-child { margin-top: 0; }

/* ── 上下篇导航 ── */
.article-nav {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
}
.article-nav .nav-prev, .article-nav .nav-next { margin-bottom: 10px; }
.article-nav .nav-label { color: var(--text-muted); }
.article-nav .nav-none { color: var(--text-muted); font-style: italic; }
.article-nav .nav-more { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border-light); }

/* ── 文章双栏布局 ── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: start;
}
.article-main { min-width: 0; }

/* ── 侧边栏 ── */
.sidebar { min-width: 0; }
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.sidebar-widget-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.sidebar-list { list-style: none; margin: 0; padding: 0; }
.sidebar-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 0.85rem;
}
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
  line-height: 1.45;
}
.sidebar-list a:hover { color: var(--primary); text-decoration: none; }
.sidebar-item-title {
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sidebar-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar-rank--top {
  background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
  color: #fff;
}
.sidebar-rank--normal {
  background: var(--bg);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}
.sidebar-views, .sidebar-date {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
  padding-left: 28px;
}

/* ── 底部 ── */
.site-footer {
  text-align: center;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border-light);
  margin-top: 16px;
}

/* ── 响应式 ── */
@media (max-width: 600px) {
  .article-header { padding: 16px; }
  .article-header h1 { font-size: 1.28rem; }
  .article-content { padding: 16px; font-size: 15px; }
  .toc { padding: 14px 16px; }
  .toc-header { flex-direction: column; align-items: flex-start; }
  .font-toolbar { margin-left: 0; }
  .news-item { padding: 14px 16px; }
  .article-layout { grid-template-columns: 1fr; }
}


* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

.container { max-width: 900px; margin: 0 auto; padding: 0 16px; }

/* 头部 */
.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  padding: 24px 0;
  border-bottom: 2px solid var(--border);
}
.site-header h1 {
  margin: 0;
  font-size: 1.75rem;
  color: var(--text);
  font-weight: 600;
}
.site-header .site-subtitle {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: normal;
}
.site-header a { color: var(--text); }
.site-header a:hover { color: var(--accent-hover); }

/* 列表 */
.news-list { padding: 24px 0; }
.news-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.news-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(212, 168, 75, 0.15);
}
.news-item .title {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 8px;
}
.news-item .title a:hover { color: var(--accent-hover); }
.news-item .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.news-item .meta span { margin-right: 16px; }

/* 分页 */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 24px 0;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text);
}
.pagination a:hover {
  background: var(--primary);
  border-color: var(--accent);
  color: var(--text);
}
.pagination .current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* 文章页 */
.article-header { padding: 24px 0 16px; }
.article-header .back { margin-bottom: 12px; font-size: 0.9rem; }
.article-header h1 {
  font-size: 1.6rem;
  margin: 0 0 12px;
  line-height: 1.4;
}
.article-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.article-meta span, .article-meta time { margin-right: 20px; }
.breadcrumb { font-size: 0.85rem; margin-bottom: 12px; color: var(--text-muted); }
.breadcrumb a { color: var(--link); }
.article-content {
  padding: 16px 0 24px;
  border-top: 1px solid var(--border);
}
.article-content img { max-width: 100%; height: auto; }
.article-content p { margin: 0 0 1em; }
.article-nav {
  padding: 20px 0 32px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.article-nav .nav-prev,
.article-nav .nav-next {
  margin-bottom: 12px;
}
.article-nav .nav-label { color: var(--text-muted); }
.article-nav .nav-none { color: var(--text-muted); font-style: italic; }
.article-nav .nav-more {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

/* 底部 */
.site-footer {
  text-align: center;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
