/* ==========================================================================
   IT 笔记 · 前台样式（基于 layui 的自定义皮肤）
   ========================================================================== */

:root {
    --primary: #16baaa;
    --primary-dark: #0e9c8e;
    --primary-soft: #e8f9f6;
    --ink: #1a2b31;
    --ink-2: #33454c;
    --sub: #5d6b76;
    --muted: #98a3ad;
    --bg: #f4f7f9;
    --card: #ffffff;
    --border: #e9eef2;
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(16, 42, 51, .04);
    --shadow-md: 0 10px 30px rgba(16, 42, 51, .07);
    --mono: "JetBrains Mono", "Cascadia Code", Consolas, Monaco, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .18s ease; }
img { max-width: 100%; }
i.layui-icon { vertical-align: middle; }

::selection { background: rgba(22, 186, 170, .18); }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cdd6dd; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #b6c2cb; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================ 顶部导航 ============================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    height: 66px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(16, 42, 51, .07); }

.header-inner {
    height: 66px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1cc7b5, #0b8f84);
    color: #fff;
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -1px;
    box-shadow: 0 6px 14px rgba(22, 186, 170, .28);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: .3px; }
.brand-text em {
    font-style: normal;
    font-size: 9.5px;
    letter-spacing: 2.2px;
    color: var(--muted);
    font-weight: 600;
}

.site-nav { display: flex; align-items: center; gap: 2px; }

.site-nav a {
    position: relative;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 14.5px;
    color: var(--ink-2);
    transition: background .18s ease, color .18s ease;
}
.site-nav a:hover { color: var(--primary-dark); background: #f2f8f7; }
.site-nav a.active { color: var(--primary-dark); font-weight: 600; }
.site-nav a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 1px;
    width: 16px;
    height: 2px;
    transform: translateX(-50%);
    border-radius: 2px;
    background: var(--primary);
}
.site-nav a.nav-admin {
    margin-left: 4px;
    font-size: 13px;
    color: var(--sub);
    border: 1px solid var(--border);
    padding: 4px 10px;
}
.site-nav a.nav-admin:hover { border-color: var(--primary); color: var(--primary-dark); background: #fff; }
.site-nav a.nav-admin::after { display: none; }

.header-search {
    margin-left: auto;
    width: 230px;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    background: #f2f5f7;
    border-radius: 999px;
    transition: background .2s ease, box-shadow .2s ease;
}
.header-search i { color: var(--muted); font-size: 15px; }
.header-search input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13px;
    color: var(--ink);
    min-width: 0;
}
.header-search:focus-within { background: #fff; box-shadow: 0 0 0 2px rgba(22, 186, 170, .2); }

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--ink-2);
    cursor: pointer;
}

/* ============================ 首页 Hero ============================ */
.hero {
    position: relative;
    overflow: hidden;
    padding: 62px 0 46px;
    background: linear-gradient(180deg, #eefaf8 0%, #f5fafc 58%, var(--bg) 100%);
    border-bottom: 1px solid rgba(22, 186, 170, .08);
}
.hero-glow {
    position: absolute;
    top: -180px;
    right: -120px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(22, 186, 170, .18), rgba(22, 186, 170, 0) 68%);
    pointer-events: none;
}
.hero-inner { position: relative; max-width: 760px; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
    padding: 5px 13px 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(22, 186, 170, .2);
    font-size: 12.5px;
    color: var(--primary-dark);
    letter-spacing: .3px;
}
.hero-eyebrow .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 186, 170, .18);
}

.hero h1 {
    margin: 0 0 16px;
    font-size: 44px;
    line-height: 1.26;
    letter-spacing: -.8px;
    font-weight: 800;
    color: #103038;
}
.hero h1 .hl {
    color: var(--primary-dark);
    background-image: linear-gradient(transparent 64%, rgba(22, 186, 170, .22) 64%);
    padding: 0 2px;
}

.hero-desc {
    margin: 0 0 26px;
    max-width: 620px;
    font-size: 15px;
    line-height: 1.85;
    color: var(--sub);
}

.hero-search {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 600px;
    height: 56px;
    padding: 6px 6px 6px 20px;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 14px 34px rgba(15, 60, 70, .09);
    border: 1px solid #eef3f5;
}
.hero-search i { color: var(--muted); font-size: 18px; }
.hero-search input {
    flex: 1;
    border: 0;
    outline: 0;
    font-size: 14px;
    background: transparent;
    min-width: 0;
}
.hero-search button {
    height: 44px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #1cc7b5, #0e9c8e);
    color: #fff;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
    box-shadow: 0 8px 18px rgba(22, 186, 170, .28);
}
.hero-search button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(22, 186, 170, .34); }

.hero-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}
.hero-cats a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid #e3eef0;
    font-size: 13px;
    color: var(--ink-2);
    transition: .18s ease;
}
.hero-cats a:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: #fff;
    transform: translateY(-1px);
}
.hero-cats a em { font-style: normal; font-size: 11px; color: var(--muted); }

.hero-stats {
    display: flex;
    gap: 46px;
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px dashed rgba(22, 186, 170, .22);
}
.hero-stats strong {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #103038;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.hero-stats span { font-size: 12.5px; color: var(--muted); }

.cat-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ============================ 通用布局 ============================ */
.site-main { min-height: calc(100vh - 66px - 260px); }
.home-body { padding: 34px 0 64px; }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.section-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-head h2 i { color: var(--primary); font-size: 19px; }
.section-side { display: flex; align-items: center; gap: 16px; }
.section-side .muted { font-size: 12.5px; color: var(--muted); }
.link-more { font-size: 12.5px; color: var(--sub); }
.link-more:hover { color: var(--primary-dark); }

.badge, .page-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(22, 186, 170, .12);
    color: var(--primary-dark);
    font-size: 11px;
    letter-spacing: 1.6px;
    font-weight: 700;
    text-transform: uppercase;
}

.muted { color: var(--muted); }

/* ============================ 笔记卡片 ============================ */
.note-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.note-card:hover {
    transform: translateY(-2px);
    border-color: #c9ebe5;
    box-shadow: 0 14px 32px rgba(16, 90, 90, .09);
}
.note-card.is-top { border-color: #f3e2bd; background: linear-gradient(180deg, #fffdf6, #fff 46%); }

.top-flag {
    position: absolute;
    top: -1px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 9px 3px;
    border-radius: 0 0 8px 8px;
    background: linear-gradient(135deg, #f6c66a, #eaa838);
    color: #7a4b06;
    font-size: 11px;
    font-weight: 700;
}

.note-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 10px;
}
.note-meta span { display: inline-flex; align-items: center; gap: 4px; }
.note-meta i { font-size: 13px; }
.cat-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2px;
}

.note-title { margin: 0 0 8px; font-size: 19px; line-height: 1.5; font-weight: 700; letter-spacing: -.2px; }
.note-title a { color: var(--ink); }
.note-title a:hover { color: var(--primary-dark); }

.note-summary {
    margin: 0 0 14px;
    font-size: 13.8px;
    line-height: 1.8;
    color: var(--sub);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.note-summary mark, .note-title mark {
    background: rgba(255, 214, 102, .45);
    color: inherit;
    padding: 0 2px;
    border-radius: 3px;
}

.note-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px dashed #eef2f4;
}
.note-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.note-tags a {
    font-size: 12px;
    color: #7c8a95;
    background: #f3f6f8;
    padding: 2px 8px;
    border-radius: 5px;
    transition: .18s ease;
}
.note-tags a:hover { background: var(--primary-soft); color: var(--primary-dark); }

.read-more { font-size: 13px; color: var(--primary-dark); font-weight: 600; white-space: nowrap; }
.read-more i { font-size: 12px; transition: transform .18s ease; }
.read-more:hover i { transform: translateX(3px); }

.empty-state {
    background: #fff;
    border: 1px dashed #dbe4e9;
    border-radius: var(--radius);
    padding: 54px 20px;
    text-align: center;
    color: var(--muted);
}
.empty-state i { font-size: 40px; color: #c8d3da; display: block; margin-bottom: 10px; }
.empty-state p { margin: 0 0 16px; font-size: 14px; }

/* ============================ 侧边栏 ============================ */
.side-col { position: sticky; top: 84px; }

.side-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.side-title {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}
.side-title::before {
    content: "";
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: linear-gradient(180deg, #1cc7b5, #0e9c8e);
}

.about-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.about-avatar {
    width: 54px; height: 54px;
    border-radius: 50%;
    background: #eef7f5;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--border);
}
.about-name h3 { margin: 0; font-size: 15.5px; font-weight: 700; }
.about-name p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.about-desc { margin: 0 0 16px; font-size: 12.8px; line-height: 1.75; color: var(--sub); }

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 12px 0;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
}
.about-stats > div { text-align: center; position: relative; }
.about-stats > div + div::before {
    content: "";
    position: absolute;
    left: 0; top: 20%;
    height: 60%;
    width: 1px;
    background: var(--border);
}
.about-stats strong { display: block; font-size: 16px; font-weight: 800; color: var(--primary-dark); line-height: 1.4; }
.about-stats span { font-size: 11px; color: var(--muted); }

.about-stats.vertical { grid-template-columns: repeat(2, 1fr); gap: 12px; border: 0; padding: 0; }
.about-stats.vertical > div + div::before { display: none; }
.about-stats.vertical > div { background: #f7fafb; border-radius: 10px; padding: 14px 8px; }

.about-links { display: flex; gap: 8px; margin-top: 14px; }
.about-links a {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    border-radius: 9px;
    background: #f3f6f8;
    color: var(--sub);
    font-size: 15px;
    transition: .18s ease;
}
.about-links a:hover { background: var(--primary-soft); color: var(--primary-dark); transform: translateY(-2px); }

.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li + li { margin-top: 2px; }
.cat-list a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 13.2px;
    color: var(--ink-2);
    transition: .18s ease;
}
.cat-list a:hover { background: #f4faf9; color: var(--primary-dark); }
.cat-name { flex: 1; }
.cat-count {
    font-size: 11.5px;
    color: var(--muted);
    background: #f1f4f6;
    padding: 0 7px;
    border-radius: 999px;
    line-height: 18px;
}
.empty-tip { font-size: 12.5px; color: var(--muted); margin: 0; list-style: none; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 7px;
    background: #f4f6f8;
    color: #5b6873;
    font-size: 12.5px;
    transition: .18s ease;
}
.tag-item em { font-style: normal; font-size: 11px; color: #a9b3bc; }
.tag-item:hover { background: var(--primary-soft); color: var(--primary-dark); transform: translateY(-1px); }
.tag-item.tag-md { font-size: 13px; background: #eef8f6; color: #2f6f69; }
.tag-item.tag-lg { font-size: 13.5px; background: #e2f6f2; color: var(--primary-dark); font-weight: 600; }

.hot-list { list-style: none; margin: 0; padding: 0; counter-reset: hot; }
.hot-list li + li { margin-top: 4px; }
.hot-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
    border-radius: 7px;
    font-size: 13px;
    color: var(--ink-2);
    transition: .18s ease;
}
.hot-list a:hover { color: var(--primary-dark); background: #f7fbfa; }
.hot-index {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    color: #c2ccd4;
    flex-shrink: 0;
}
.hot-list li:nth-child(-n+3) .hot-index { color: var(--primary); }
.hot-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hot-list i { color: #e8b45d; font-size: 13px; }

.side-note p { margin: 0 0 8px; font-size: 12.8px; color: var(--sub); line-height: 1.8; }
.side-note b { color: var(--ink-2); }
.side-note-foot { color: var(--muted) !important; font-size: 12px !important; }

/* ============================ 分页 ============================ */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}
.pager-num, .pager-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--ink-2);
    font-size: 13px;
    transition: .18s ease;
}
.pager-num:hover, .pager-btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.pager-num.active {
    background: linear-gradient(135deg, #1cc7b5, #0e9c8e);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(22, 186, 170, .25);
}
.pager-btn.disabled { color: #c3ccd3; background: #f8fafb; cursor: not-allowed; }
.pager-ellipsis { color: var(--muted); padding: 0 2px; }
.pager-info { margin-left: 8px; font-size: 12.5px; color: var(--muted); }

/* ============================ 列表页头 ============================ */
.page-head {
    padding: 26px 0 28px;
    background: linear-gradient(180deg, #eefaf8, #f5f9fb);
    border-bottom: 1px solid rgba(22, 186, 170, .1);
}
.crumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 16px;
}
.crumb a { color: var(--sub); }
.crumb a:hover { color: var(--primary-dark); }
.crumb i { font-size: 11px; color: #bcc7cf; }
.crumb span { color: var(--ink-2); }

.page-head-main {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.page-head h1 {
    margin: 8px 0 6px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.5px;
    color: #103038;
}
.page-head p { margin: 0; font-size: 13.5px; color: var(--sub); }

.page-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 320px;
    height: 42px;
    padding: 0 6px 0 14px;
    background: #fff;
    border: 1px solid #e3edee;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}
.page-search i { color: var(--muted); }
.page-search input { flex: 1; border: 0; outline: 0; font-size: 13px; background: transparent; min-width: 0; }
.page-search button {
    height: 32px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

/* ============================ 文章页 ============================ */
.reading-progress {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    z-index: 880;
    pointer-events: none;
}
.reading-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #1cc7b5, #56d6c5);
    border-radius: 0 3px 3px 0;
    transition: width .1s linear;
}

.article-head { padding: 26px 0 30px; background: linear-gradient(180deg, #f0faf8, #f5f9fb); }

.article-badges { display: flex; align-items: center; gap: 8px; }
.top-badge {
    font-size: 11px;
    padding: 2px 9px;
    border-radius: 6px;
    background: linear-gradient(135deg, #f6c66a, #eaa838);
    color: #7a4b06;
    font-weight: 700;
}
.article-head h1 {
    margin: 12px 0 16px;
    font-size: 33px;
    line-height: 1.4;
    font-weight: 800;
    letter-spacing: -.6px;
    color: #0f2f37;
    max-width: 900px;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 12.8px;
    color: var(--sub);
}
.article-meta span { display: inline-flex; align-items: center; gap: 5px; }
.article-meta i { color: #a7b4bd; font-size: 13.5px; }

.article-body { padding: 26px 0 64px; }

.article-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px 40px 28px;
    box-shadow: var(--shadow-sm);
}

/* 正文排版 */
.prose { font-size: 15.4px; line-height: 1.92; color: #2a3a40; word-wrap: break-word; }
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }

.prose h2, .prose h3, .prose h4 { position: relative; color: #103038; font-weight: 700; scroll-margin-top: 90px; }
.prose h2 {
    font-size: 21px;
    margin: 40px 0 16px;
    padding-left: 13px;
    border-left: 4px solid var(--primary);
    line-height: 1.5;
}
.prose h3 { font-size: 17.5px; margin: 30px 0 12px; }
.prose h3::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    margin-right: 8px;
    border-radius: 2px;
    background: var(--primary);
    vertical-align: middle;
}
.prose h4 { font-size: 15.5px; margin: 22px 0 10px; color: var(--ink-2); }

.prose p { margin: 14px 0; }
.prose a { color: var(--primary-dark); border-bottom: 1px solid rgba(22, 186, 170, .35); }
.prose a:hover { border-bottom-color: var(--primary-dark); background: rgba(22, 186, 170, .06); }
.prose strong { color: #16323a; font-weight: 700; }
.prose hr { border: 0; border-top: 1px dashed #e2e9ed; margin: 30px 0; }

.prose ul, .prose ol { margin: 14px 0; padding-left: 26px; }
.prose li { margin: 7px 0; }
.prose li::marker { color: var(--primary); }
.prose ul ul, .prose ol ol { margin: 6px 0; }

.prose blockquote {
    margin: 18px 0;
    padding: 14px 18px;
    background: linear-gradient(90deg, #f4fbf9, #fbfdfd);
    border-left: 3px solid var(--primary);
    border-radius: 0 10px 10px 0;
    color: #48605f;
}
.prose blockquote p { margin: 6px 0; }

.prose code {
    font-family: var(--mono);
    font-size: 13px;
    background: #f1f5f7;
    color: #c9315f;
    padding: 2px 6px;
    border-radius: 5px;
    border: 1px solid #eaeff2;
}
.prose pre {
    position: relative;
    margin: 18px 0;
    padding: 20px 22px;
    background: #1b2430;
    border-radius: 11px;
    overflow-x: auto;
    box-shadow: 0 8px 22px rgba(20, 35, 45, .12);
}
.prose pre code {
    display: block;
    background: transparent;
    border: 0;
    padding: 0;
    color: #e6edf3;
    font-size: 13.2px;
    line-height: 1.72;
    white-space: pre;
}
.prose pre::before {
    content: "";
    position: absolute;
    top: 12px; left: 16px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #ff6b6b;
    box-shadow: 13px 0 0 #ffc46b, 26px 0 0 #4dd07a;
    opacity: .75;
}
.prose pre { padding-top: 34px; }

.code-copy {
    position: absolute;
    top: 8px;
    right: 10px;
    padding: 3px 9px;
    font-size: 11.5px;
    color: #a9b6c3;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 6px;
    cursor: pointer;
    transition: .18s ease;
    z-index: 2;
}
.code-copy:hover { color: #fff; background: rgba(22, 186, 170, .35); border-color: transparent; }

.prose table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    font-size: 14px;
    border: 1px solid #e6ecef;
    border-radius: 10px;
    overflow: hidden;
}
.prose thead th {
    background: #f5f9fa;
    font-weight: 600;
    color: #16323a;
    text-align: left;
}
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid #edf1f4; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover { background: #fafcfd; }

.prose img { border-radius: 10px; margin: 10px 0; box-shadow: 0 6px 20px rgba(16, 42, 51, .08); }

.prose .md-anchor {
    margin-left: 6px;
    font-size: 15px;
    color: var(--primary);
    border: 0;
    opacity: 0;
    transition: opacity .2s ease;
}
.prose h2:hover .md-anchor, .prose h3:hover .md-anchor { opacity: .7; }

.prose .footnotes { margin-top: 30px; padding-top: 16px; border-top: 1px dashed #e2e9ed; font-size: 13px; color: var(--sub); }

.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #e6edf0;
}
.article-tags .label { font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.article-tags a {
    font-size: 12.5px;
    color: var(--sub);
    background: #f3f7f8;
    padding: 4px 11px;
    border-radius: 999px;
    transition: .18s ease;
}
.article-tags a:hover { background: var(--primary-soft); color: var(--primary-dark); }

.article-declare {
    margin-top: 20px;
    padding: 12px 16px;
    background: #f8fafb;
    border-radius: 10px;
    font-size: 12.2px;
    line-height: 1.8;
    color: #8b98a3;
}
.article-declare a { color: #7c8b96; text-decoration: underline; }
.article-declare b { color: var(--sub); }

/* 上一篇 / 下一篇 */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 18px;
}
.post-nav-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    transition: .2s ease;
}
.post-nav-item:hover { border-color: #c9ebe5; box-shadow: var(--shadow-md); }
.post-nav-item.align-right { text-align: right; }
.pn-label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.pn-label i { font-size: 11px; }
.post-nav-item a {
    font-size: 13.5px;
    color: var(--ink-2);
    font-weight: 600;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.post-nav-item a:hover { color: var(--primary-dark); }
.pn-empty { font-size: 13px; color: #bcc7cf; }

.related-block { margin-top: 30px; }
.block-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.block-title i { color: var(--primary); }
.related-card {
    display: block;
    height: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    transition: .2s ease;
}
.related-card:hover { transform: translateY(-2px); border-color: #c9ebe5; box-shadow: var(--shadow-md); }
.rc-cat { font-size: 11px; color: var(--primary-dark); background: var(--primary-soft); padding: 2px 8px; border-radius: 5px; }
.related-card h4 { margin: 9px 0 6px; font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.related-card p { margin: 0 0 8px; font-size: 12.5px; color: var(--sub); line-height: 1.7; }
.rc-date { font-size: 11.5px; color: var(--muted); }

/* 目录 */
.toc-card { max-height: calc(100vh - 120px); overflow: auto; }
.toc { display: flex; flex-direction: column; border-left: 1px solid #eef2f4; }
.toc-link {
    position: relative;
    padding: 5px 8px 5px 12px;
    margin-left: -1px;
    font-size: 12.8px;
    color: var(--sub);
    border-left: 2px solid transparent;
    line-height: 1.55;
    transition: .18s ease;
}
.toc-link:hover { color: var(--primary-dark); }
.toc-link.toc-level-3 { padding-left: 24px; font-size: 12.2px; color: #7b8892; }
.toc-link.active {
    color: var(--primary-dark);
    font-weight: 600;
    border-left-color: var(--primary);
    background: #f5fbfa;
}

/* ============================ 归档 ============================ */
.archive-list { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 26px 20px; }
.archive-year { padding-top: 18px; }
.year-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 6px 0 14px;
    font-size: 26px;
    font-weight: 800;
    color: #103038;
    letter-spacing: -.5px;
}
.year-title em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 500; }
.archive-month { margin-bottom: 18px; padding-left: 4px; }
.month-title {
    position: relative;
    margin: 0 0 8px;
    padding-left: 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
}
.month-title::before {
    content: "";
    position: absolute;
    left: 0; top: 7px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 186, 170, .14);
}
.archive-month ul { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 1px dashed #e3ebe9; }
.archive-month li { position: relative; }
.archive-month li::before {
    content: "";
    position: absolute;
    left: -16px; top: 14px;
    width: 8px;
    height: 1px;
    background: #e3ebe9;
}
.archive-month a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--ink-2);
    transition: .18s ease;
}
.archive-month a:hover { background: #f5fbfa; color: var(--primary-dark); }
.arc-cat { font-size: 11px; color: var(--sub); background: #f1f5f7; padding: 1px 7px; border-radius: 5px; flex-shrink: 0; }
.arc-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arc-date { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

.archive-count { text-align: right; }
.archive-count strong { display: block; font-size: 40px; font-weight: 800; color: var(--primary); line-height: 1; }
.archive-count span { font-size: 12px; color: var(--muted); }

/* ============================ 关于 ============================ */
.about-profile { display: flex; gap: 22px; align-items: center; }
.profile-avatar {
    width: 92px; height: 92px;
    border-radius: 50%;
    background: #eef7f5;
    border: 3px solid #fff;
    box-shadow: 0 8px 22px rgba(16, 90, 90, .12);
    flex-shrink: 0;
}
.profile-main h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.profile-main h1 small { font-size: 13px; font-weight: 500; color: var(--sub); margin-left: 8px; }
.profile-main p { margin: 0 0 12px; font-size: 13.8px; color: var(--sub); max-width: 720px; line-height: 1.8; }
.profile-links { display: flex; gap: 10px; flex-wrap: wrap; }
.profile-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e3edee;
    font-size: 12.5px;
    color: var(--sub);
}
.profile-links a:hover { border-color: var(--primary); color: var(--primary-dark); }

.panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 28px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}
.panel-title {
    margin: 0 0 14px;
    font-size: 16.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.panel-title i { color: var(--primary); }
.panel-text { margin: 0 0 12px; font-size: 14px; line-height: 1.9; color: var(--sub); }
.panel-text code {
    font-family: var(--mono);
    font-size: 12.5px;
    background: #f1f5f7;
    padding: 2px 6px;
    border-radius: 4px;
    color: #c9315f;
}

.skill-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 26px; }
.skill-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.skill-head em { font-style: normal; color: var(--primary-dark); font-weight: 600; font-size: 12px; }
.skill-bar { height: 7px; border-radius: 999px; background: #f0f4f6; overflow: hidden; }
.skill-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #56d6c5, #16baaa);
}

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 1px dashed #dfe9e7; }
.timeline li { position: relative; padding: 0 0 18px 16px; }
.timeline li::before {
    content: "";
    position: absolute;
    left: -22px; top: 7px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--primary);
}
.tl-year { display: block; font-family: var(--mono); font-size: 12px; color: var(--primary-dark); font-weight: 700; }
.tl-text { font-size: 13.5px; color: var(--sub); line-height: 1.75; }

/* ============================ 页脚 ============================ */
.site-footer {
    background: #0f2b33;
    color: rgba(255, 255, 255, .62);
    padding: 44px 0 22px;
    margin-top: 20px;
}
.footer-grid { row-gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand strong { color: #fff; font-size: 16px; letter-spacing: .3px; }
.footer-desc { margin: 0 0 14px; font-size: 12.8px; line-height: 1.85; max-width: 380px; color: rgba(255, 255, 255, .52); }
.footer-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-tags span {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .6);
}
.site-footer h5 { margin: 4px 0 12px; font-size: 13.5px; color: #fff; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer li a { font-size: 12.8px; color: rgba(255, 255, 255, .55); }
.site-footer li a:hover { color: var(--primary); }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 12px;
    color: rgba(255, 255, 255, .38);
}
.footer-tech { font-family: var(--mono); font-size: 11.5px; }

.back-top {
    position: fixed;
    right: 26px;
    bottom: 30px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--sub);
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(16, 42, 51, .1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: .25s ease;
    z-index: 890;
}
.back-top.show { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { color: var(--primary-dark); border-color: var(--primary); }

/* ============================ 404 ============================ */
.error-page { padding: 90px 0 110px; text-align: center; }
.error-code {
    font-family: var(--mono);
    font-size: 110px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #1cc7b5, #0b6f77);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -6px;
}
.error-page h1 { margin: 16px 0 8px; font-size: 24px; font-weight: 700; color: #103038; }
.error-page p { margin: 0 0 24px; color: var(--sub); font-size: 14px; }
.error-actions { display: flex; gap: 12px; justify-content: center; }
.error-actions .layui-btn { border-radius: 999px; padding: 0 22px; height: 40px; line-height: 40px; }
.error-actions .layui-btn-normal { background: var(--primary); border-color: var(--primary); }

/* ============================ 响应式 ============================ */
@media screen and (max-width: 991px) {
    .header-search { width: 190px; }
    .hero h1 { font-size: 36px; }
    .article-card { padding: 26px 24px; }
    .skill-list { grid-template-columns: 1fr; }
}

@media screen and (max-width: 767px) {
    .header-inner { gap: 12px; }
    .brand-text em { display: none; }

    .site-nav {
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 14px 14px;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 14px 24px rgba(16, 42, 51, .08);
        display: none;
    }
    .site-nav.open { display: flex; }
    .site-nav a { padding: 11px 12px; border-radius: 8px; }
    .site-nav a.active::after { display: none; }
    .site-nav a.nav-admin { margin: 6px 0 0; text-align: center; }

    .header-search { display: none; }
    .nav-toggle { display: block; }

    .hero { padding: 40px 0 34px; }
    .hero h1 { font-size: 28px; line-height: 1.35; }
    .hero-desc { font-size: 13.5px; }
    .hero-search { height: 48px; padding-left: 16px; }
    .hero-search button { height: 38px; padding: 0 18px; font-size: 13px; }
    .hero-stats { gap: 22px; flex-wrap: wrap; margin-top: 26px; }
    .hero-stats strong { font-size: 20px; }
    .hero-cats a { font-size: 12px; padding: 5px 10px; }

    .home-body { padding: 20px 0 46px; }
    .note-card { padding: 18px 16px 14px; }
    .note-title { font-size: 16.5px; }
    .note-summary { font-size: 13px; }
    .note-foot { flex-wrap: wrap; gap: 8px; }

    .page-head { padding: 18px 0 20px; }
    .page-head h1 { font-size: 23px; }
    .page-search { width: 100%; }
    .archive-count { display: none; }

    .article-head h1 { font-size: 22px; }
    .article-meta { gap: 12px; font-size: 12px; }
    .article-card { padding: 20px 16px; border-radius: 12px; }
    .prose { font-size: 15px; line-height: 1.85; }
    .prose h2 { font-size: 18.5px; margin-top: 30px; }
    .prose pre { padding: 14px 14px 16px; margin-left: -4px; margin-right: -4px; }
    .article-card { overflow-x: hidden; }

    .post-nav { grid-template-columns: 1fr; }
    .post-nav-item.align-right { text-align: left; }

    .about-profile { flex-direction: column; align-items: flex-start; gap: 14px; }
    .profile-avatar { width: 70px; height: 70px; }
    .archive-list { padding: 6px 14px 14px; }
    .year-title { font-size: 21px; }
    .arc-cat { display: none; }

    .footer-bottom { flex-direction: column; gap: 6px; }
    .back-top { right: 14px; bottom: 18px; }
}
