:root {
  --primary: #1e3a5f;
  --primary-deep: #152b47;
  --accent: #c9a227;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #2b3a4a;
  --text-light: #6b7a8a;
  --border: #e5e9f0;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- 顶栏 ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1080px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--primary); }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(201,162,39,0.15); }
.nav { display: flex; gap: 26px; font-size: 14px; color: var(--text-light); }
.nav a:hover { color: var(--primary); }
.nav a.active { color: var(--accent); font-weight: 600; }

/* ---------- Hero ---------- */
.hero { max-width: 1080px; margin: 0 auto; padding: 80px 24px 60px; text-align: center; }
.hero .badge { display: inline-block; padding: 5px 14px; border-radius: 20px; background: rgba(201,162,39,0.12); color: #9a7b16; font-size: 13px; margin-bottom: 20px; }
.hero h1 { font-size: 40px; color: var(--primary-deep); letter-spacing: 1px; }
.hero h1 .accent { color: var(--accent); }
.hero .sub { margin-top: 14px; font-size: 18px; color: var(--text-light); }
.hero p.desc { max-width: 620px; margin: 22px auto 0; font-size: 15px; color: var(--text-light); }
.hero .cta { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn { display: inline-block; padding: 11px 28px; border-radius: 8px; font-size: 15px; background: var(--primary); color: #fff; transition: transform .15s, box-shadow .15s; border: 1px solid transparent; cursor: pointer; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(30,58,95,0.25); }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--border); }
.btn.ghost:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.btn.gold { background: var(--accent); color: #fff; }
.btn.gold:hover { box-shadow: 0 8px 20px rgba(201,162,39,0.3); }

/* ---------- 内容板块 ---------- */
.features { max-width: 1080px; margin: 0 auto; padding: 20px 24px 80px; }
.sec-title { text-align: center; font-size: 26px; color: var(--primary-deep); margin-bottom: 40px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 30px 26px; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0,0,0,0.08); }
.card .icon { font-size: 30px; margin-bottom: 16px; }
.card h3 { font-size: 17px; color: var(--primary-deep); margin-bottom: 10px; }
.card h3 a:hover { color: var(--accent); }
.card p { font-size: 14px; color: var(--text-light); }

/* ---------- 页面头部 ---------- */
.page-header { background: linear-gradient(135deg, var(--primary-deep), var(--primary)); color: #fff; padding: 70px 24px 60px; text-align: center; }
.page-header .badge { display: inline-block; padding: 5px 14px; border-radius: 20px; background: rgba(201,162,39,0.2); color: #e7cf7a; font-size: 13px; margin-bottom: 18px; }
.page-header h1 { font-size: 36px; letter-spacing: 1px; }
.page-header .sub { margin-top: 12px; font-size: 17px; color: rgba(255,255,255,0.82); }

.section { max-width: 1080px; margin: 0 auto; padding: 56px 24px; }

/* ---------- 博客列表 ---------- */
.blog-layout { display: flex; gap: 28px; align-items: flex-start; }
.blog-main { flex: 1; min-width: 0; }
.blog-side { width: 260px; flex: 0 0 260px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.toolbar input[type=text] {
  flex: 1; min-width: 200px; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; background: #fff; color: var(--text); outline: none;
}
.toolbar input[type=text]:focus { border-color: var(--accent); }
.toolbar .btn { padding: 10px 22px; }

.list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.post { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 26px 24px; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.post:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0,0,0,0.08); }
.post .post-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.post .tag { display: inline-block; padding: 3px 12px; border-radius: 16px; background: rgba(201,162,39,0.14); color: #9a7b16; font-size: 12px; }
.post .pin { font-size: 12px; color: var(--accent); }
.post h3 { font-size: 17px; color: var(--primary-deep); margin-bottom: 10px; line-height: 1.5; }
.post h3 a:hover { color: var(--accent); }
.post .excerpt { font-size: 14px; color: var(--text-light); flex: 1; }
.post .post-tags { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.post .post-tags span { font-size: 12px; color: #8a97a6; background: #f0f3f7; padding: 2px 9px; border-radius: 12px; }
.post .meta { margin-top: 14px; font-size: 12px; color: #a3adb9; display: flex; gap: 16px; }

/* ---------- 博客列表单栏流 ---------- */
.post-list { display: flex; flex-direction: column; gap: 20px; }
.post-list .post { padding: 28px 28px 24px; position: relative; overflow: hidden; }
.post-list .post::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); transition: width .18s; }
.post-list .post:hover::before { width: 4px; }
.post-list .post h3 { font-size: 20px; }
.post-foot { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.post-foot .post-tags { margin-top: 0; }
.post-foot .meta { margin-top: 0; }

.pagination { margin-top: 40px; display: flex; gap: 8px; justify-content: center; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; color: var(--text-light); background: #fff; }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .cur { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { opacity: .5; pointer-events: none; }

.side-box { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; margin-bottom: 20px; }
.side-box h4 { font-size: 15px; color: var(--primary-deep); margin-bottom: 14px; padding-left: 10px; border-left: 3px solid var(--accent); }
.side-box ul { list-style: none; }
.side-box li { margin-bottom: 8px; }
.side-box li a { font-size: 14px; color: var(--text-light); display: flex; justify-content: space-between; }
.side-box li a:hover, .side-box li a.on { color: var(--accent); }
.side-box li a .cnt { color: #b6bfca; font-size: 12px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { font-size: 13px; color: var(--text-light); background: #f0f3f7; padding: 4px 11px; border-radius: 14px; }
.tag-cloud a:hover, .tag-cloud a.on { background: var(--accent); color: #fff; }

.empty { background: var(--card); border: 1px dashed var(--border); border-radius: 14px; padding: 60px 30px; text-align: center; color: var(--text-light); font-size: 15px; }

/* ---------- 文章详情 ---------- */
.article-wrap { max-width: 1080px; margin: 0 auto; padding: 48px 24px 70px; display: flex; gap: 30px; align-items: flex-start; }
.article { flex: 1; min-width: 0; max-width: 780px; }
.article .tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.article .tag { display: inline-block; padding: 3px 12px; border-radius: 16px; background: rgba(201,162,39,0.14); color: #9a7b16; font-size: 12px; }
.article h1 { font-size: 30px; color: var(--primary-deep); line-height: 1.4; margin-bottom: 16px; }
.article .meta { font-size: 13px; color: #a3adb9; margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--border); display: flex; gap: 18px; flex-wrap: wrap; }
.article .body { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 40px 42px; }

/* 正文排版 */
.body { font-size: 15.5px; color: var(--text); line-height: 1.9; }
.body p { margin-bottom: 18px; }
.body h2 { font-size: 22px; color: var(--primary-deep); margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.body h3 { font-size: 18px; color: var(--primary-deep); margin: 24px 0 12px; }
.body h4 { font-size: 16px; color: var(--primary-deep); margin: 20px 0 10px; }
.body ul, .body ol { margin: 0 0 18px 24px; }
.body li { margin-bottom: 6px; }
.body a { color: var(--primary); border-bottom: 1px solid rgba(30,58,95,0.3); }
.body a:hover { color: var(--accent); border-color: var(--accent); }
.body blockquote { margin: 20px 0; padding: 14px 20px; border-left: 4px solid var(--accent); background: #fbf8ee; color: #5c5540; border-radius: 0 8px 8px 0; }
.body blockquote p { margin: 0; }
.body img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14.5px; }
.body th, .body td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.body th { background: #f0f3f7; color: var(--primary-deep); font-weight: 600; }
.body tr:nth-child(even) td { background: #fafbfc; }
.body hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.body code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; background: #f0f3f7; padding: 2px 6px; border-radius: 4px; font-size: 13.5px; color: #c7254e; }

/* 目录 */
.toc { background: #f8f9fb; border: 1px solid var(--border); border-radius: 10px; padding: 18px 22px; margin-bottom: 24px; font-size: 14px; }
.toc::before { content: "目录"; display: block; font-weight: 700; color: var(--primary-deep); margin-bottom: 8px; }
.toc ul { list-style: none; margin: 0; }
.toc li { margin: 5px 0; }
.toc li ul { margin-left: 16px; }
.toc a { color: var(--text-light); }
.toc a:hover { color: var(--accent); }

/* 代码高亮 */
.codehilite { background: #f6f8fa; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; overflow-x: auto; margin: 18px 0; font-size: 13.5px; line-height: 1.6; }
.codehilite pre { margin: 0; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }
.codehilite .c, .codehilite .c1, .codehilite .cm, .codehilite .cs { color: #6a737d; font-style: italic; }
.codehilite .k, .codehilite .kc, .codehilite .kd, .codehilite .kn, .codehilite .kp, .codehilite .kr, .codehilite .kt { color: #d73a49; }
.codehilite .s, .codehilite .s1, .codehilite .s2, .codehilite .sb, .codehilite .sc, .codehilite .sd, .codehilite .se, .codehilite .sh, .codehilite .si, .codehilite .sx { color: #032f62; }
.codehilite .na, .codehilite .nc, .codehilite .nd, .codehilite .ne, .codehilite .nf, .codehilite .fm { color: #6f42c1; }
.codehilite .nb, .codehilite .bp { color: #005cc5; }
.codehilite .mi, .codehilite .mf, .codehilite .mh, .codehilite .mo, .codehilite .il { color: #005cc5; }
.codehilite .o, .codehilite .ow { color: #d73a49; }
.codehilite .nt, .codehilite .nv, .codehilite .vc, .codehilite .vg, .codehilite .vi { color: #e36209; }

/* 上一篇 / 下一篇 */
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 26px; }
.post-nav a { flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; font-size: 14px; color: var(--text-light); transition: border-color .15s; }
.post-nav a:hover { border-color: var(--accent); color: var(--accent); }
.post-nav a span { display: block; font-size: 12px; color: #b6bfca; margin-bottom: 4px; }
.post-nav a.next { text-align: right; }

.back { display: inline-block; margin-top: 26px; color: var(--primary); font-size: 14px; }
.back:hover { color: var(--accent); }

/* ---------- 关于 ---------- */
.about { max-width: 1080px; margin: 0 auto; padding: 0 24px 80px; }
.about-box { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 34px; text-align: center; }
.about-box h2 { font-size: 22px; color: var(--primary-deep); margin-bottom: 16px; }
.about-box p { font-size: 15px; color: var(--text-light); max-width: 720px; margin: 0 auto; }
.about-box .contact { margin-top: 18px; font-size: 15px; color: var(--text); }

/* ---------- 页脚 ---------- */
.footer { background: var(--primary-deep); color: rgba(255,255,255,0.75); padding: 30px 24px; text-align: center; font-size: 13px; }
.footer .beian { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; }
.footer .beian a { color: rgba(255,255,255,0.75); }
.footer .beian a:hover { color: #fff; text-decoration: underline; }
/* 公安备案：图标 + 文字，图标与文字垂直居中 */
.footer .beian .ga-link { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.footer .beian .ga-link img { display: block; width: 16px; height: 18px; flex: none; }

/* ---------- 工具 / 发布 / 关于 页面 ---------- */
.section.narrow { max-width: 820px; }
.sec-desc { text-align: center; font-size: 15px; color: var(--text-light); margin-bottom: 38px; }
.feature-list { list-style: none; }
.feature-list li { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin-bottom: 14px; display: flex; gap: 16px; align-items: flex-start; }
.feature-list .no { flex: none; width: 30px; height: 30px; border-radius: 8px; background: rgba(201,162,39,0.14); color: #9a7b16; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.feature-list b { color: var(--primary-deep); font-size: 15px; display: block; margin-bottom: 4px; }
.feature-list p { font-size: 14px; color: var(--text-light); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps.cols-4 { grid-template-columns: repeat(4, 1fr); }
.step { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 26px 22px; text-align: center; }
.step .num { width: 38px; height: 38px; margin: 0 auto 14px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; }
.step h3 { font-size: 16px; color: var(--primary-deep); margin-bottom: 8px; }
.step p { font-size: 13px; color: var(--text-light); }
.cta-box { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 40px 34px; text-align: center; }
.cta-box h2 { font-size: 22px; color: var(--primary-deep); margin-bottom: 14px; }
.cta-box p { font-size: 15px; color: var(--text-light); max-width: 620px; margin: 0 auto 24px; }
.highlight { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 34px; text-align: center; }
.highlight h2 { font-size: 22px; color: var(--primary-deep); margin-bottom: 16px; }
.highlight p { font-size: 15px; color: var(--text-light); max-width: 720px; margin: 0 auto; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.contact-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 28px 24px; text-align: center; }
.contact-card .icon { font-size: 28px; margin-bottom: 12px; }
.contact-card h3 { font-size: 16px; color: var(--primary-deep); margin-bottom: 8px; }
.contact-card p { font-size: 14px; color: var(--text-light); word-break: break-all; }

/* ---------- 下载页 ---------- */
.dl-hero { display: flex; align-items: center; justify-content: space-between; gap: 40px; background: linear-gradient(135deg, var(--primary-deep), var(--primary)); border-radius: 16px; padding: 48px 52px; color: #fff; }
.dl-hero .tag { display: inline-block; padding: 4px 14px; border-radius: 16px; background: rgba(201,162,39,0.25); color: #e7cf7a; font-size: 13px; margin-bottom: 16px; }
.dl-hero h2 { font-size: 28px; margin-bottom: 10px; letter-spacing: 1px; }
.dl-hero .dl-ver { font-size: 15px; color: rgba(255,255,255,0.82); margin-bottom: 20px; }
.dl-feats { list-style: none; margin: 0; }
.dl-feats li { font-size: 14px; color: rgba(255,255,255,0.9); padding: 4px 0 4px 22px; position: relative; }
.dl-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.dl-cta { text-align: center; flex: none; }
.dl-btn { padding: 14px 42px; font-size: 17px; }
.dl-hint { margin-top: 12px; font-size: 13px; color: rgba(255,255,255,0.7); }

.dl-list { display: flex; flex-direction: column; gap: 12px; }
.dl-item { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; }
.dl-item-main { flex: 1; min-width: 0; }
.dl-item-name { font-size: 15px; color: var(--primary-deep); font-weight: 600; word-break: break-all; }
.dl-item-meta { font-size: 13px; color: var(--text-light); margin-top: 2px; }
.btn.sm { padding: 8px 20px; font-size: 14px; }

/* 下载页深色卡内的更新介绍（Markdown 渲染） */
.dl-note { margin-top: 4px; font-size: 14px; color: rgba(255,255,255,0.9); }
.dl-note p { margin-bottom: 8px; }
.dl-note ul, .dl-note ol { margin: 0 0 8px 20px; }
.dl-note li { margin-bottom: 4px; }
.dl-note code { background: rgba(255,255,255,0.16); padding: 1px 5px; border-radius: 4px; color: #fff; }
.dl-note a { color: #e7cf7a; }

/* 文章底部下载卡片 */
.dl-card { display: flex; align-items: center; gap: 16px; margin-top: 30px; background: linear-gradient(135deg, var(--primary-deep), var(--primary)); border-radius: 12px; padding: 20px 24px; color: #fff; }
.dl-card-icon { font-size: 28px; }
.dl-card-main { flex: 1; min-width: 0; }
.dl-card-title { font-size: 15px; font-weight: 600; }
.dl-card-ver { font-size: 13px; color: rgba(255,255,255,0.82); margin-top: 2px; }
.dl-card .btn { flex: none; }

@media (max-width: 860px) {
  .blog-layout, .article-wrap { flex-direction: column; }
  .blog-side { width: 100%; flex: 1; }
  .list { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hero h1 { font-size: 30px; }
  .grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .page-header h1 { font-size: 28px; }
  .article h1 { font-size: 24px; }
  .article .body { padding: 26px 20px; }
  .article-wrap { padding-top: 28px; }
  .dl-hero { flex-direction: column; padding: 34px 26px; text-align: center; }
  .dl-feats li { text-align: left; }
}
