/* CiciCMS 默认模板样式 */
:root {
    --ink: #101828;
    --ink-2: #475467;
    --ink-3: #98a2b3;
    --line: #e7ecf3;
    --bg: #ffffff;
    --bg-soft: #f7f9fc;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.85 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
.wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ---------- 头部 ---------- */
.site-head {
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .92);
    position: sticky; top: 0; z-index: 30;
    backdrop-filter: saturate(160%) blur(8px);
}
.head-inner { display: flex; align-items: center; gap: 22px; height: 66px; }
.logo { font-size: 19px; font-weight: 800; letter-spacing: -.4px; color: var(--ink); flex: none; }
.logo:hover { color: var(--ink); }
.site-nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
    padding: 5px 11px; border-radius: 8px; font-size: 14px; color: var(--ink-2); white-space: nowrap;
}
.site-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.site-nav a.on { color: var(--brand); background: #eff6ff; font-weight: 600; }
.head-search { display: flex; gap: 6px; flex: none; }
.head-search input {
    width: 150px; border: 1px solid var(--line); background: var(--bg-soft); border-radius: 9px;
    padding: 7px 11px; font-size: 13.5px; outline: none; font-family: inherit; color: var(--ink);
}
.head-search input:focus { border-color: #bfdbfe; background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.head-search button {
    border: 0; background: var(--brand); color: #fff; border-radius: 9px; padding: 0 14px; font-size: 13.5px; cursor: pointer;
}
.head-search button:hover { background: var(--brand-dark); }

.main { padding: 34px 0 60px; min-height: 55vh; }

/* ---------- 首页 hero ---------- */
.hero {
    margin-bottom: 34px; padding: 38px 32px 34px;
    border-radius: 18px; border: 1px solid #e6edf7;
    background: linear-gradient(135deg, #f6f9fd 0%, #eef3fa 58%, #e8eff8 100%);
    position: relative; overflow: hidden;
}
.hero::after {
    content: ""; position: absolute; right: -70px; top: -90px;
    width: 260px; height: 260px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, .10), rgba(37, 99, 235, 0));
    pointer-events: none;
}
.hero h1 { font-size: 34px; line-height: 1.25; letter-spacing: -1.1px; margin: 0 0 10px; position: relative; }
.hero p { margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 620px; position: relative; }

/* ---------- 列表 ---------- */
.post-list { display: flex; flex-direction: column; gap: 22px; }
.post-card {
    border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
    display: flex; gap: 20px; align-items: flex-start;
}
.post-card:hover { box-shadow: 0 10px 30px rgba(16, 24, 40, .07); border-color: #dbe4f0; transform: translateY(-1px); }
.post-cover { flex: 0 0 150px; height: 106px; border-radius: 10px; overflow: hidden; display: block; background: var(--bg-soft); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-body { flex: 1; min-width: 0; }
.post-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.post-meta .cat { color: var(--brand); background: #eff6ff; padding: 1px 9px; border-radius: 20px; }
.post-meta .pin { color: #b45309; background: #fffbeb; padding: 1px 8px; border-radius: 20px; }
.post-title { font-size: 20px; line-height: 1.45; margin: 0 0 8px; letter-spacing: -.3px; }
.post-title a { color: var(--ink); }
.post-title a:hover { color: var(--brand); }
.post-excerpt { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; line-height: 1.8; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.more { font-size: 13.5px; font-weight: 500; }
a.pin.file { color: #1d4ed8; background: #eff4ff; }
a.pin.file:hover { background: var(--brand); color: #fff; }
.tags-mini { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.tags-mini a { color: var(--ink-3); }
.tags-mini a:hover { color: var(--brand); }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.pg {
    min-width: 34px; height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 13.5px; color: var(--ink-2); background: #fff;
}
.pg:hover { border-color: #bfdbfe; color: var(--brand); background: #f8fbff; }
.pg.cur { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pg.dis { color: #cbd5e1; border-color: #f1f5f9; }
.pg-info { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }

/* ---------- 页面标题 ---------- */
.page-head { margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.6px; }
.page-head p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.page-count { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--ink-3); }

/* ---------- 正文 ---------- */
.entry { max-width: 760px; margin: 0 auto; }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumb a { color: var(--ink-2); }
.entry-head h1 { font-size: 32px; line-height: 1.35; letter-spacing: -.8px; margin: 0 0 14px; }
.entry-meta { display: flex; gap: 16px; font-size: 13px; color: var(--ink-3); padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.entry-cover { margin: 0 0 26px; border-radius: var(--radius); overflow: hidden; }
.entry-content { font-size: 16.5px; line-height: 1.95; color: #1d2939; }
.entry-content p { margin: 0 0 20px; }
.entry-content h2 { font-size: 23px; margin: 38px 0 14px; letter-spacing: -.4px; }
.entry-content h3 { font-size: 19px; margin: 30px 0 12px; }
.entry-content a { border-bottom: 1px solid #bfdbfe; }
.entry-content img { border-radius: 10px; margin: 8px 0; }
.entry-content blockquote {
    margin: 22px 0; padding: 14px 18px; background: var(--bg-soft); border-left: 3px solid #bfdbfe;
    color: var(--ink-2); border-radius: 0 10px 10px 0;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content ul, .entry-content ol { padding-left: 24px; margin: 0 0 20px; }
.entry-content li { margin: 6px 0; }
.entry-content code {
    background: #f2f4f7; padding: 2px 6px; border-radius: 5px; font-size: .9em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #b42318;
}
.entry-content pre {
    background: #101828; color: #e4e7ec; padding: 16px 18px; border-radius: 12px; overflow-x: auto;
    font-size: 13.5px; line-height: 1.7;
}
.entry-content pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14.5px; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.entry-content th { background: var(--bg-soft); }
/* ---------- 附件下载 ---------- */
.entry-attach { margin-top: 30px; }
.attach-card {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-soft); color: var(--ink);
}
.attach-card:hover { border-color: #bfdbfe; background: #f5f9ff; color: var(--ink); }
.attach-ico {
    flex: none; width: 40px; height: 40px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--line);
    color: var(--brand); font-size: 18px; font-weight: 700;
}
.attach-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.attach-text strong { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-text em { font-style: normal; font-size: 12.5px; color: var(--ink-3); }
.attach-go {
    flex: none; padding: 6px 15px; border-radius: 20px;
    background: var(--brand); color: #fff; font-size: 13px; font-weight: 500;
}
.attach-card:hover .attach-go { background: var(--brand-dark); }

.entry-tags { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.entry-tags a { background: var(--bg-soft); border: 1px solid var(--line); padding: 2px 10px; border-radius: 20px; color: var(--ink-2); font-size: 12.5px; }
.entry-tags a:hover { color: var(--brand); border-color: #bfdbfe; }

/* ---------- 相关文章 ---------- */
.related { max-width: 760px; margin: 40px auto 0; border-top: 1px solid var(--line); padding-top: 22px; }
.related h2 { font-size: 15px; color: var(--ink-3); font-weight: 600; letter-spacing: .3px; margin: 0 0 10px; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 14.5px; border-bottom: 1px dashed #f2f4f7; }
.related li:last-child { border-bottom: 0; }
.related time { color: var(--ink-3); font-size: 12.5px; flex: none; }

/* ---------- 标签云 ---------- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud a {
    border: 1px solid var(--line); border-radius: 22px; padding: 6px 14px; font-size: 14px; color: var(--ink-2);
    background: #fff;
}
.tag-cloud a:hover { border-color: #bfdbfe; color: var(--brand); background: #f8fbff; }
.tag-cloud a span { margin-left: 7px; font-size: 12px; color: var(--ink-3); }

/* ---------- 搜索 ---------- */
.search-form { display: flex; gap: 8px; margin-top: 12px; max-width: 460px; }
.search-form input {
    flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; font-size: 14.5px;
    outline: none; font-family: inherit; background: var(--bg-soft);
}
.search-form input:focus { background: #fff; border-color: #bfdbfe; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.search-form button {
    border: 0; background: var(--brand); color: #fff; padding: 0 20px; border-radius: 10px; font-size: 14px; cursor: pointer;
}

/* ---------- 空态 / 404 ---------- */
.empty { padding: 60px 20px; text-align: center; color: var(--ink-3); font-size: 14.5px; }
.error-page { text-align: center; padding: 70px 0 50px; }
.error-page .code { font-size: 92px; font-weight: 800; letter-spacing: -4px; color: #e4e7ec; line-height: 1; }
.error-page h1 { font-size: 24px; margin: 10px 0 6px; }
.error-page p { color: var(--ink-2); margin: 0 0 24px; }
.error-actions { display: flex; gap: 10px; justify-content: center; }
.btn {
    display: inline-block; background: var(--brand); color: #fff; border-radius: 10px; padding: 9px 20px;
    font-size: 14px; border: 1px solid var(--brand);
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn.ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn.ghost:hover { color: var(--brand); border-color: #bfdbfe; }

/* ---------- 页脚 ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 26px 0; margin-top: 20px; }
.foot-inner { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.foot-main p { margin: 0 0 4px; }
.copy { color: var(--ink-2); font-weight: 500; }
.foot-desc { font-size: 12.5px; }
.foot-html { margin-top: 6px; font-size: 12.5px; }
.foot-side { display: flex; flex-direction: column; gap: 4px; text-align: right; }
.foot-side a { color: var(--ink-3); }
.foot-side a:hover { color: var(--brand); }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
    .head-inner { height: auto; padding: 12px 0; flex-wrap: wrap; gap: 10px; }
    .site-nav { order: 3; width: 100%; }
    .head-search { margin-left: auto; }
    .head-search input { width: 118px; }
    .hero h1 { font-size: 26px; }
    .post-card { padding: 18px; flex-direction: column; gap: 14px; }
    .post-cover { flex: none; width: 100%; height: 168px; }
    .post-title { font-size: 18px; }
    .entry-head h1 { font-size: 25px; }
    .entry-content { font-size: 16px; }
    .entry-meta { flex-wrap: wrap; gap: 10px; }
    .foot-side { text-align: left; }
    .pager .pg-info { width: 100%; margin-left: 0; }
}
/* ---------- 页脚导航 ---------- */
.foot-nav { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.foot-nav a { color: var(--ink-3); }
.foot-nav a:hover { color: var(--brand); }

/* ---------- 区块标题 ---------- */
.sec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.sec-head h2 { font-size: 20px; margin: 0; letter-spacing: -.4px; }
.sec-head h2 a { color: var(--ink); }
.sec-desc { font-size: 13px; color: var(--ink-3); }
.sec-more { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.sec-more:hover { color: var(--brand); }
.home-latest { margin: 34px 0 10px; }
.home-cat { margin: 38px 0 0; padding-top: 26px; border-top: 1px solid var(--line); }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li {
    display: flex; gap: 12px; align-items: baseline;
    padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px;
}
.mini-list li:last-child { border-bottom: 0; }
.mini-list time { color: var(--ink-3); font-size: 12.5px; flex: none; font-variant-numeric: tabular-nums; }
.mini-list a { color: var(--ink-2); }
.mini-list a:hover { color: var(--brand); }
.mini-list .mini-empty { color: var(--ink-3); font-size: 13.5px; border-bottom: 0; }

/* ---------- 面包屑 ---------- */
.crumb-cur { color: var(--ink-2); }
.crumb-sep { color: var(--ink-3); }

/* ---------- 内容页推荐位 / 上下篇 ---------- */
.entry-flag { display: inline-flex; gap: 6px; }
.entry-flag em {
    font-style: normal; font-size: 11.5px; color: #b45309;
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 20px; padding: 1px 8px;
}
.entry-nav {
    max-width: 760px; margin: 36px auto 0; display: grid; gap: 10px;
    grid-template-columns: 1fr 1fr;
}
.entry-nav .pn {
    display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px;
    font-size: 14px; color: var(--ink-2); background: var(--bg-soft); line-height: 1.6;
}
.entry-nav .pn span { display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 2px; }
.entry-nav a.pn:hover { border-color: #bfdbfe; color: var(--brand); background: #fff; }
.entry-nav .pn.next { text-align: right; }
.entry-nav .pn.dis { color: var(--ink-3); background: #fff; }
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li {
    display: flex; gap: 12px; justify-content: space-between; align-items: baseline;
    padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px;
}
.related-list li:last-child { border-bottom: 0; }
.related-list time { color: var(--ink-3); font-size: 12.5px; flex: none; }
@media (max-width: 640px) { .entry-nav { grid-template-columns: 1fr; } }

/* ---------- 归档页 ---------- */
.arc-year { margin: 0 0 34px; }
.arc-year-title {
    font-size: 22px; margin: 0 0 14px; letter-spacing: -.5px;
    padding-bottom: 8px; border-bottom: 2px solid var(--ink);
}
.arc-year-title small, .arc-month h3 small { font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: 8px; }
.arc-month { margin: 0 0 18px; }
.arc-month h3 { font-size: 14px; color: var(--ink-2); margin: 0 0 8px; font-weight: 600; }
.arc-list { list-style: none; margin: 0; padding: 0 0 0 4px; }
.arc-list li {
    display: flex; gap: 14px; align-items: baseline;
    padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px;
}
.arc-list li:last-child { border-bottom: 0; }
.arc-list time { color: var(--ink-3); font-size: 12.5px; flex: none; font-variant-numeric: tabular-nums; }
.arc-list a { color: var(--ink-2); }
.arc-list a:hover { color: var(--brand); }
.arc-list em { font-style: normal; margin-left: auto; font-size: 12px; color: var(--ink-3); flex: none; }

/* ---------- 友链页 ---------- */
.link-sec { margin: 0 0 32px; }
.link-title { font-size: 17px; margin: 0 0 14px; letter-spacing: -.3px; }
.link-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.link-card {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--bg-soft); color: var(--ink-2); font-size: 14px;
}
.link-card:hover { border-color: #bfdbfe; background: #fff; color: var(--brand); }
.link-card.logo img { width: 88px; height: 31px; object-fit: contain; display: block; }
.link-card.logo span { font-size: 13px; }
.link-empty { color: var(--ink-3); font-size: 13.5px; margin: 0; }
.link-note { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; font-size: 14px; color: var(--ink-2); }
.link-note p { margin: 0 0 8px; }
.link-note ul { margin: 0 0 10px; padding-left: 20px; }
.link-note li { margin: 4px 0; }

/* ---------- 栏目横幅：有图时页头变成图片背景，遮罩保证文字可读 ---------- */
.page-head.has-banner {
  position: relative; overflow: hidden; color: #fff;
  padding: 34px 28px; border-bottom: 0; border-radius: 14px;
  background-size: cover; background-position: center;
}
.page-head.has-banner::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(15,23,42,.64), rgba(15,23,42,.26));
}
.page-head.has-banner > * { position: relative; z-index: 1; }
.page-head.has-banner h1 { color: #fff; }
.page-head.has-banner p { color: rgba(255,255,255,.9); }
.page-head.has-banner .page-count { color: rgba(255,255,255,.82); }
