/* ==================== 变量 ==================== */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --text: #23272f;
  --text-soft: #5b6472;
  --text-mute: #98a1ae;
  --line: #e9ebef;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-soft: #eef0ff;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(20, 28, 45, .05);
  --shadow-hover: 0 6px 20px rgba(40, 50, 90, .10);
  --maxw: 1160px;
  --header-h: 60px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--header-h) + 14px); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.container { width: min(var(--maxw), 94%); margin: 0 auto; }

/* ==================== 顶部导航 ==================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { font-size: 17px; font-weight: 800; letter-spacing: .3px; white-space: nowrap; }
.brand-text span { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 7px 13px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-soft); transition: .18s;
}
.main-nav a:hover { color: var(--accent); background: var(--accent-soft); }
.main-nav a.active { color: var(--accent); font-weight: 600; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-form { display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px; }
.search-icon { color: var(--text-mute); flex-shrink: 0; }
.search-form input { border: 0; background: transparent; outline: 0; width: 150px; font-size: 13px; color: var(--text); }
.search-form input::placeholder { color: var(--text-mute); }
.nav-toggle { display: none; background: transparent; border: 0; color: var(--text); padding: 4px; }

/* ==================== 主体两栏 ==================== */
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; padding-top: 26px; padding-bottom: 48px; align-items: start; }
.content { min-width: 0; }

/* 分类 Tab */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.tab {
  border: 1px solid var(--line); background: var(--surface); color: var(--text-soft);
  padding: 6px 13px; border-radius: 18px; font-size: 13px; transition: .18s;
}
.tab:hover { border-color: var(--accent); color: var(--accent); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.tab .cnt { opacity: .7; font-size: 11px; margin-left: 3px; }

/* 栏目标题 */
.section-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--accent); padding-bottom: 9px; margin-bottom: 4px; }
.section-head h2 { font-size: 18px; font-weight: 700; position: relative; padding-left: 11px; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; background: var(--accent); border-radius: 2px; }
.result-hint { font-size: 13px; color: var(--text-soft); padding: 12px 2px; }
.result-hint b { color: var(--accent); }

/* 文章列表流（缩略图左 + 内容右）—— begin 主题典型结构 */
.post-list { display: flex; flex-direction: column; }
.post-item {
  display: flex; gap: 18px; padding: 20px 0;
  border-bottom: 1px dashed var(--line);
}
.post-item:first-child { padding-top: 16px; }
.thumb {
  width: 200px; height: 140px; flex-shrink: 0; border-radius: var(--radius);
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.thumb span { color: #fff; font-size: 34px; font-weight: 800; letter-spacing: 1px; text-shadow: 0 2px 8px rgba(0,0,0,.18); }
.post-body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.post-cat {
  align-self: flex-start; font-size: 11px; color: var(--accent);
  background: var(--accent-soft); padding: 2px 9px; border-radius: 4px; margin-bottom: 7px;
}
.post-title { font-size: 17px; font-weight: 700; line-height: 1.45; margin-bottom: 8px; }
.post-title a:hover { color: var(--accent); }
.post-title .ver { font-size: 12px; color: var(--text-mute); font-weight: 500; margin-left: 5px; }
.post-title .new { font-size: 10px; color: #fff; background: #ef4444; padding: 1px 5px; border-radius: 3px; vertical-align: 2px; margin-left: 5px; }
.post-desc { font-size: 13.5px; color: var(--text-soft); line-height: 1.7; margin-bottom: 10px; }
.post-meta { margin-top: auto; display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--text-mute); }
.post-meta .date::before { content: "🕒 "; }
.read-more { color: var(--accent); font-weight: 600; }
.read-more:hover { text-decoration: underline; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.pagination button {
  min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-soft); border-radius: var(--radius-sm); font-size: 13px; transition: .18s;
}
.pagination button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pagination button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination button:disabled { opacity: .45; cursor: default; }

/* 空状态 */
.empty-state { text-align: center; padding: 70px 20px; color: var(--text-mute); }
.empty-state svg { color: var(--line); margin: 0 auto 14px; }
.empty-state h3 { font-size: 17px; color: var(--text-soft); margin-bottom: 6px; }
.empty-state p { font-size: 13px; margin-bottom: 18px; }
.btn-reset { border: 0; background: var(--accent); color: #fff; padding: 8px 18px; border-radius: var(--radius-sm); font-size: 13px; }

/* ==================== 侧边栏 ==================== */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.widget-title { font-size: 15px; font-weight: 700; padding-bottom: 9px; margin-bottom: 12px; border-bottom: 1px solid var(--line); position: relative; padding-left: 11px; }
.widget-title::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; background: var(--accent); border-radius: 2px; }
.rank-list { list-style: none; }
.rank-list li { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--surface-2); }
.rank-list li:last-child { border-bottom: 0; }
.rank-num { width: 19px; height: 19px; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-2); color: var(--text-mute); border-radius: 4px; font-size: 11px; font-weight: 700; }
.rank-list li:nth-child(-n+3) .rank-num { background: var(--accent); color: #fff; }
.rank-list a:hover { color: var(--accent); }
.cat-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.cat-list a { display: flex; justify-content: space-between; padding: 6px 7px; border-radius: 5px; font-size: 12.5px; color: var(--text-soft); }
.cat-list a:hover { background: var(--accent-soft); color: var(--accent); }
.cat-list a span { color: var(--text-mute); font-size: 11px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud a { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-soft); padding: 3px 9px; border-radius: 4px; }
.tag-cloud a:hover { border-color: var(--accent); color: var(--accent); }
.widget-about p { font-size: 13px; color: var(--text-soft); margin-bottom: 10px; }
.contact-row { font-size: 12.5px; color: var(--text-soft); padding-top: 9px; border-top: 1px dashed var(--line); }
.contact-row a { color: var(--accent); }
.contact-row a:hover { text-decoration: underline; }

/* ==================== 页脚 ==================== */
.site-footer { background: #20242e; color: #aeb5c2; padding: 30px 0 20px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.brand-footer .brand-text { color: #fff; }
.brand-footer .brand-text span { color: #a5b0ff; }
.site-footer .footer-inner > div > p { font-size: 13px; margin-top: 10px; }
.footer-links { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; font-size: 13px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #333846; margin-top: 22px; padding-top: 16px; font-size: 12px; color: #7d8595; }

/* ==================== 弹窗 ==================== */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(15,20,35,.55); display: grid; place-items: center; padding: 20px; }
.modal-overlay[hidden] { display: none; }
.modal { background: var(--surface); border-radius: 12px; padding: 26px; width: min(420px, 100%); position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; font-size: 24px; color: var(--text-mute); line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-title { font-size: 18px; margin-bottom: 12px; }
.modal-body { font-size: 14px; color: var(--text-soft); line-height: 1.8; }
.modal-body a { color: var(--accent); }

/* ==================== 渐变缩略图 ==================== */
.grad-indigo { background: linear-gradient(135deg, #6366f1, #3730a3); }
.grad-purple { background: linear-gradient(135deg, #a855f7, #6b21a8); }
.grad-pink   { background: linear-gradient(135deg, #ec4899, #9d174d); }
.grad-green  { background: linear-gradient(135deg, #22c55e, #166534); }
.grad-blue   { background: linear-gradient(135deg, #3b82f6, #1e40af); }
.grad-cyan   { background: linear-gradient(135deg, #06b6d4, #155e75); }
.grad-orange { background: linear-gradient(135deg, #f97316, #9a3412); }
.grad-red    { background: linear-gradient(135deg, #ef4444, #991b1b); }

/* 搜索高亮 */
mark { background: #fde68a; color: inherit; padding: 0 1px; border-radius: 2px; }

/* ==================== 信息资讯页 ==================== */
.news-updated { font-size: 12px; color: var(--text-mute); font-weight: 400; }
.news-notice {
  font-size: 12.5px; color: var(--text-soft); background: var(--accent-soft);
  border-left: 3px solid var(--accent); padding: 9px 13px; border-radius: 0 6px 6px 0;
  margin: 14px 0 4px; line-height: 1.6;
}
.news-footer-note { font-size: 12px; color: var(--text-mute); text-align: center; padding: 22px 0 8px; line-height: 1.7; }
.news-footer-note b { color: var(--accent); }

/* ==================== 响应式 ==================== */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; padding: 10px; gap: 2px; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .search-form input { width: 105px; }
  .post-item { flex-direction: column; }
  .thumb { width: 100%; height: 170px; }
  .sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .search-form { padding: 5px 9px; }
  .search-form input { width: 78px; }
  .brand-text { font-size: 15px; }
}
