/* ============================================
   CodeCourse 前台全站样式（菜鸟风格 · 白底绿导航）
   ============================================ */
:root {
    --green: #7cb342;
    --green-deep: #558b2f;
    --green-dark: #33691e;
    --green-bg: #f1f8e9;
    --green-line: #dcedc8;
    --text: #333;
    --text-2: #666;
    --text-3: #999;
    --border: #e8e8e8;
    --card: #ffffff;
    --code-bg: #282c34;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: #fff;
    color: var(--text);
    line-height: 1.7;
    font-size: 15px;
}
a { color: var(--green-deep); text-decoration: none; }
a:hover { color: var(--green-dark); }
img { max-width: 100%; }

/* ---------- 顶部导航（深绿条） ---------- */
.site-header {
    background: var(--green-deep);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 60px;
}
.logo {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    letter-spacing: .5px;
}
.logo span { color: #c8e6a0; }
.nav-links { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.nav-links a {
    padding: 6px 12px;
    border-radius: 6px;
    color: rgba(255,255,255,.92);
    font-size: 14px;
    white-space: nowrap;
    transition: .2s;
}
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,.16); color: #fff; }
.search-box { display: flex; align-items: center; }
.search-box form { display: flex; }
.search-box input {
    width: 220px;
    padding: 7px 14px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 13px;
    outline: none;
    background: #fff;
    color: #333;
}
.search-box input::placeholder { color: #999; }
.search-box button {
    padding: 7px 16px;
    background: var(--green-dark);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 13px;
}
.search-box button:hover { background: #224a12; }

/* ---------- 主体容器 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }

/* ---------- 首页两栏布局（左侧分类 + 主区卡片） ---------- */
.home-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}
.cat-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}
.cat-sidebar .sb-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--green-dark);
    padding: 8px 12px;
    border-bottom: 2px solid var(--green-line);
    margin-bottom: 6px;
}
.cat-sidebar a {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-2);
    border-radius: 6px;
    transition: .15s;
}
.cat-sidebar a:hover { background: var(--green-bg); color: var(--green-deep); }
.cat-sidebar a.active { background: var(--green-bg); color: var(--green-dark); font-weight: 700; }

.cat-main { flex: 1; min-width: 0; }

/* 板块标题 */
.block {
    margin-bottom: 34px;
    scroll-margin-top: 76px;
}
.block-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 4px;
}
.block-title .b-icon { font-size: 22px; }
.block-desc { font-size: 13px; color: var(--text-3); margin-bottom: 14px; }

/* 教程卡片（【学习 Xxx】 + 一行简介，3 列） */
.tut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.tut-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px;
    display: block;
    color: var(--text);
    transition: box-shadow .2s, border-color .2s, transform .2s;
}
.tut-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,.07);
    border-color: var(--green);
    transform: translateY(-2px);
    color: var(--text);
}
.tut-card .t-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.tut-card .t-name .learn { color: var(--green-deep); }
.tut-card .t-intro {
    font-size: 13px;
    color: var(--text-3);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.tut-card .t-meta { font-size: 12px; color: var(--text-3); margin-top: 8px; }

/* ---------- 板块页（同两栏布局） ---------- */
.page-head { margin-bottom: 16px; }
.page-head .crumb { font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.page-head h1 { font-size: 24px; color: var(--green-dark); }
.page-head .page-desc { font-size: 13px; color: var(--text-3); margin-top: 2px; }

/* ---------- 教程页（左目录右内容） ---------- */
.tut-layout { display: flex; gap: 24px; align-items: flex-start; }
.tut-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}
.tut-sidebar .sb-head { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.tut-sidebar .sb-head .sb-icon { font-size: 22px; }
.tut-sidebar .sb-head .sb-title { font-weight: 700; font-size: 15px; margin-top: 4px; color: var(--green-dark); }
.tut-sidebar .sb-head .sb-count { font-size: 12px; color: var(--text-3); }
.tut-sidebar nav a {
    display: block;
    padding: 9px 16px;
    font-size: 13px;
    color: var(--text-2);
    border-left: 3px solid transparent;
    transition: .15s;
}
.tut-sidebar nav a:hover { background: var(--green-bg); color: var(--green-deep); }
.tut-sidebar nav a.active { background: var(--green-bg); color: var(--green-dark); border-left-color: var(--green); font-weight: 700; }
.tut-sidebar nav a .done { color: #7cb342; font-size: 11px; }

.tut-main { flex: 1; min-width: 0; }
.tut-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px 36px;
}
.tut-content h1 { font-size: 26px; margin-bottom: 8px; color: var(--green-dark); }
.tut-content .ch-meta { font-size: 13px; color: var(--text-3); margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.tut-content h3 { font-size: 18px; margin: 24px 0 12px; color: var(--green-dark); }
.tut-content p { margin-bottom: 14px; }
.tut-content ul, .tut-content ol { margin: 0 0 14px 22px; }
.tut-content li { margin-bottom: 6px; }
.tut-content code {
    background: #f2f4f7;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: Consolas, "Courier New", monospace;
    color: #c7254e;
}
.tut-content pre.code-block {
    background: var(--code-bg);
    color: #e5e7eb;
    border-radius: 8px;
    padding: 16px 18px;
    overflow-x: auto;
    margin: 0;
    position: relative;
}
.tut-content pre.code-block code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: 13.5px;
    line-height: 1.7;
}
.code-wrap { margin: 16px 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.code-wrap pre.code-block { border-radius: 0; border: none; }
.code-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: #f5f6f8;
    border-top: 1px solid var(--border);
    padding: 10px 14px;
}
.btn-run, .btn-copy {
    padding: 6px 16px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    cursor: pointer;
    transition: .2s;
}
.btn-run { background: var(--green); color: #fff; }
.btn-run:hover { background: var(--green-deep); }
.btn-run.disabled { background: #c8cdd4; cursor: not-allowed; }
.btn-copy { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-copy:hover { background: var(--green-bg); }

/* 内容整理中 */
.empty-tip {
    background: var(--green-bg);
    border: 1px solid var(--green-line);
    color: var(--green-dark);
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 14px;
    margin: 16px 0;
}

/* 上下篇导航 */
.ch-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.ch-nav a {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 13px;
    color: var(--text-2);
    flex: 1 1 240px;
    transition: .2s;
}
.ch-nav a:hover { border-color: var(--green); color: var(--green-deep); }
.ch-nav .next { text-align: right; }

/* ---------- 广告位 ---------- */
.ad-box { margin: 20px 0; text-align: center; }
.ad-box iframe { max-width: 100%; }

/* ---------- 搜索 ---------- */
.search-result { margin-bottom: 12px; }
.search-result h3 { font-size: 16px; }
.search-result p { font-size: 13px; color: var(--text-2); }
.search-result .tag { font-size: 12px; color: var(--green); }

/* ---------- 页脚 ---------- */
.site-footer {
    background: #2b2b2b;
    color: rgba(255,255,255,.65);
    margin-top: 40px;
    padding: 32px 20px;
    text-align: center;
    font-size: 13px;
}
.site-footer .f-links { margin-bottom: 10px; }
.site-footer .f-links a { color: rgba(255,255,255,.75); margin: 0 10px; font-size: 13px; }
.site-footer .f-links a:hover { color: #fff; }
.site-footer a { color: rgba(255,255,255,.65); }

/* ---------- 运行弹层 ---------- */
.run-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}
.run-modal.open { display: flex; }
.run-box {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 860px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.run-box .rb-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
}
.run-box .rb-close {
    border: none;
    background: var(--green-bg);
    color: var(--green-dark);
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13px;
}
.run-box .rb-body { flex: 1; }
.run-box .rb-body iframe { width: 100%; height: 100%; border: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .home-layout { flex-direction: column; }
    .cat-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 4px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border);
    }
    .cat-sidebar .sb-title { border-bottom: none; white-space: nowrap; margin-bottom: 0; }
    .cat-sidebar a { white-space: nowrap; }
    .tut-layout { flex-direction: column; }
    .tut-sidebar { width: 100%; position: static; max-height: none; }
    .tut-sidebar nav { display: flex; overflow-x: auto; }
    .tut-sidebar nav a { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; padding: 10px 14px; }
    .tut-sidebar nav a.active { border-left: none; border-bottom-color: var(--green); }
    .tut-content { padding: 20px; }
    .header-inner { gap: 10px; }
    .search-box input { width: 110px; }
    .tut-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}


/* ---------- 正文排版增强（表格/代码/参考手册/延伸阅读） ---------- */
.tut-content table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14px; }
.tut-content th, .tut-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.tut-content th { background: var(--green-bg); color: var(--green-dark); font-weight: 600; }
.tut-content tr:nth-child(even) td { background: #fafbfc; }
.tut-content pre {
    background: var(--code-bg); color: #e5e7eb; border-radius: 8px;
    padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.7;
    font-family: Consolas, "Courier New", monospace;
}
.tut-content pre code { background: none; color: inherit; padding: 0; }

/* 参考手册速查 */
.ref-box { margin: 28px 0 8px; border: 1px solid var(--green-line); border-radius: 8px; overflow: hidden; background: #fff; }
.ref-head { background: var(--green-bg); color: var(--green-dark); font-weight: 700; font-size: 15px; padding: 12px 16px; }
.ref-tip { font-size: 12.5px; color: var(--text-2); padding: 8px 16px 0; }
.ref-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 10px 0 0; }
.ref-table th, .ref-table td { border: none; border-bottom: 1px solid var(--border); padding: 8px 16px; text-align: left; }
.ref-table th { background: #fff; color: var(--green-dark); border-bottom: 2px solid var(--green-line); }
.ref-table td:first-child { width: 38%; }
.ref-table code { background: var(--green-bg); color: var(--green-dark); border-radius: 4px; padding: 2px 6px; font-size: 12.5px; }

/* 侧栏热门教程 */
.sb-hot { margin-top: 18px; padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.sb-hot-title { font-weight: 700; font-size: 14px; color: var(--green-dark); margin-bottom: 10px; }
.sb-hot ul { list-style: none; margin: 0; padding: 0; }
.sb-hot li { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.sb-hot li:last-child { border-bottom: none; }
.sb-hot a { font-size: 13.5px; color: var(--text); }
.sb-hot a:hover { color: var(--green-deep); }
.sb-hot-views { font-size: 12px; color: #aaa; }

/* 延伸阅读 */
.related-box { margin-top: 28px; border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; }
.related-title { font-weight: 700; font-size: 15px; color: var(--green-dark); padding: 12px 16px; border-bottom: 1px solid var(--border); background: #fafbfc; }
.related-list { list-style: none; margin: 0; padding: 6px 16px 12px; }
.related-list li { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.related-list li:last-child { border-bottom: none; }
.related-list a { display: flex; gap: 10px; align-items: flex-start; }
.rl-icon { font-size: 20px; }
.rl-body { display: flex; flex-direction: column; gap: 2px; }
.rl-name { font-size: 14px; font-weight: 600; color: var(--green-deep); }
.rl-intro { font-size: 12.5px; color: var(--text-2); }


/* ---------- 移动端导航（汉堡菜单） ---------- */
.menu-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    font-size: 22px; color: #fff; padding: 4px 8px; line-height: 1;
}
@media (max-width: 760px) {
    .menu-toggle { display: block; }
    .nav-links, .search-box {
        display: none;
        position: absolute; left: 0; right: 0; top: 56px;
        background: var(--green-dark); z-index: 200;
        flex-direction: column; padding: 6px 16px 14px; box-shadow: 0 6px 16px rgba(0,0,0,.25);
    }
    .nav-links.open, .search-box.open { display: flex; }
    .nav-links a {
        padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12);
        font-size: 15px; color: #fff;
    }
    .nav-links a.active { color: #c8e6a0; font-weight: 700; }
    .search-box { top: auto; }
    .search-box form { display: flex; gap: 8px; width: 100%; margin-top: 10px; }
    .search-box input { flex: 1; width: auto; }
}


/* ---------- 笔记列表页 ---------- */
.notes-layout { display: flex; gap: 24px; align-items: flex-start; }
.notes-side { width: 200px; flex-shrink: 0; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px; position: sticky; top: 72px; }
.ns-head { font-size: 13px; font-weight: 700; color: var(--green-dark); padding: 6px 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.notes-side a { display: block; padding: 9px 10px; border-radius: 6px; font-size: 14px; color: var(--text); }
.notes-side a:hover { background: var(--green-bg); color: var(--green-deep); }
.notes-side a.active { background: var(--green-bg); color: var(--green-dark); font-weight: 700; }
.notes-side .ns-top { font-weight: 600; }
.notes-side .ns-subs a { padding-left: 24px; font-size: 13px; color: var(--text-2); }
.notes-main { flex: 1; min-width: 0; }
.notes-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.notes-tabs a { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; color: var(--text-2); }
.notes-tabs a:hover { border-color: var(--green); color: var(--green-deep); }
.notes-tabs a.active { background: var(--green); border-color: var(--green); color: #fff; }
.note-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; margin-bottom: 14px; transition: box-shadow .2s; }
.note-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.nc-title { font-size: 17px; margin: 0 0 6px; }
.nc-title a { color: var(--text); }
.nc-title a:hover { color: var(--green-deep); }
.nc-top { display: inline-block; background: #fef3c7; color: #b45309; font-size: 11px; padding: 1px 8px; border-radius: 4px; margin-right: 6px; vertical-align: 2px; }
.nc-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.nc-cat { color: var(--green); font-weight: 600; }
.nc-summary { font-size: 13.5px; color: var(--text-2); line-height: 1.7; margin: 0 0 10px; }
.nc-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.pager-box { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 20px; }
.pager-info { font-size: 13px; color: var(--text-2); }

/* ---------- 笔记文章页 ---------- */
.note-layout { display: flex; gap: 24px; align-items: flex-start; }
.note-main { flex: 1; min-width: 0; }
.note-content { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 28px 32px; }
.note-content h1 { font-size: 24px; margin: 0 0 10px; color: var(--green-dark); line-height: 1.4; }
.note-content .nc-meta { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.note-content h2 { font-size: 20px; margin: 28px 0 12px; color: var(--green-dark); }
.note-content h3 { font-size: 16px; margin: 22px 0 10px; color: var(--green-dark); }
.note-content p { font-size: 15px; line-height: 1.9; margin: 0 0 14px; }
.note-content ul, .note-content ol { padding-left: 22px; margin: 0 0 14px; line-height: 1.9; }
.note-content table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14px; }
.note-content th, .note-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.note-content th { background: var(--green-bg); color: var(--green-dark); font-weight: 600; }
.note-content tr:nth-child(even) td { background: #fafbfc; }
.note-content pre {
    background: var(--code-bg); color: #e5e7eb; border-radius: 8px;
    padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.7;
    font-family: Consolas, "Courier New", monospace;
}
.note-content code { background: var(--green-bg); color: var(--green-dark); border-radius: 4px; padding: 2px 6px; font-size: 13px; }
.note-content pre code { background: none; color: inherit; padding: 0; }
.note-content blockquote { border-left: 4px solid var(--green); margin: 16px 0; padding: 10px 16px; background: var(--green-bg); color: #555; border-radius: 0 6px 6px 0; }
.note-content img { max-width: 100%; height: auto; border-radius: 6px; }
.note-content .nc-tags { margin-top: 20px; padding-top: 14px; border-top: 1px dashed var(--border); }
.note-side { width: 240px; flex-shrink: 0; position: sticky; top: 72px; display: flex; flex-direction: column; gap: 14px; }
.ns-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.ns-card-title { font-weight: 700; font-size: 14px; color: var(--green-dark); margin-bottom: 10px; }
.ns-card-list { list-style: none; margin: 0; padding: 0; }
.ns-card-list li { padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.ns-card-list li:last-child { border-bottom: none; }
.ns-card-list a { color: var(--text); }
.ns-card-list a:hover { color: var(--green-deep); }

@media (max-width: 900px) {
    .notes-layout { flex-direction: column; }
    .notes-side { width: 100%; position: static; display: flex; flex-wrap: wrap; gap: 4px; }
    .notes-side .ns-head { width: 100%; border-bottom: none; margin-bottom: 0; padding-bottom: 6px; }
    .notes-side .ns-subs { width: 100%; display: flex; flex-wrap: wrap; }
    .notes-side .ns-subs a { padding-left: 10px; }
    .note-layout { flex-direction: column; }
    .note-side { width: 100%; position: static; }
    .note-content { padding: 20px 18px; }
}


/* ---------- 文章页相关阅读（底部） ---------- */
.related-box { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 20px 24px; margin-top: 18px; }
.related-title { font-size: 16px; font-weight: 700; color: var(--green-dark); margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--green-bg); }
.related-list { display: flex; flex-direction: column; }
.related-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 4px; border-bottom: 1px dashed var(--border); text-decoration: none; }
.related-item:last-child { border-bottom: none; }
.ri-title { font-size: 14px; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-item:hover .ri-title { color: var(--green-deep); }
.ri-meta { font-size: 12px; color: var(--text-2); flex-shrink: 0; }

/* ---------- 标签链接 ---------- */
.tag-label { font-size: 13px; color: var(--text-2); margin-right: 6px; }
.note-content .nc-tags .tag { display: inline-block; text-decoration: none; background: var(--green-bg); color: var(--green-dark); border-radius: 999px; padding: 3px 12px; font-size: 12.5px; margin: 0 6px 6px 0; transition: .2s; }
.note-content .nc-tags .tag:hover { background: var(--green); color: #fff; }


/* ---------- 404 页面 ---------- */
.nf-wrap { max-width: 760px; margin: 40px auto 60px; text-align: center; }
.nf-code { background: var(--code-bg); color: #e5e7eb; border-radius: 10px; padding: 18px 20px; text-align: left; font-family: Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.9; margin-bottom: 30px; overflow-x: auto; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.nf-line-1 { color: #f8d7da; }
.nf-kw { color: #f97583; font-weight: 700; }
.nf-str { color: #79b8ff; }
.nf-fn { color: #ffab70; }
.nf-num { color: #b392f0; }
.nf-line-2 { color: #6b7280; font-style: italic; margin-top: 4px; }
.nf-404 { font-size: clamp(88px, 16vw, 150px); font-weight: 900; line-height: 1; letter-spacing: 4px; background: linear-gradient(135deg, var(--green) 0%, #8bc34a 55%, #cddc39 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin: 8px 0 6px; font-family: Consolas, "Courier New", monospace; }
.nf-title { font-size: 26px; color: var(--green-dark); margin: 0 0 10px; }
.nf-desc { font-size: 15px; color: var(--text-2); line-height: 1.8; margin: 0 0 22px; }
.nf-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.nf-btn-home { background: var(--green); color: #fff; padding: 11px 26px; border-radius: 8px; font-size: 15px; font-weight: 600; }
.nf-btn-home:hover { background: var(--green-deep); color: #fff; }
.nf-count { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; border-radius: 50%; background: var(--green-bg); color: var(--green-dark); font-weight: 700; font-size: 15px; }
.nf-count-text { font-size: 13px; color: var(--text-2); }
.nf-search { display: flex; gap: 8px; max-width: 460px; margin: 0 auto 28px; }
.nf-search input { flex: 1; padding: 11px 14px; border: 2px solid var(--border); border-radius: 8px; font-size: 14px; }
.nf-search input:focus { outline: none; border-color: var(--green); }
.nf-search button { padding: 11px 22px; background: var(--green); color: #fff; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; }
.nf-search button:hover { background: var(--green-deep); }
.nf-hot { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; text-align: left; }
.nf-hot-title { font-weight: 700; font-size: 14px; color: var(--green-dark); margin-bottom: 12px; }
.nf-hot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.nf-hot-list a { display: inline-block; padding: 7px 14px; background: var(--green-bg); color: var(--green-dark); border-radius: 999px; font-size: 13px; }
.nf-hot-list a:hover { background: var(--green); color: #fff; }

/* ---------- 返回顶部 ---------- */
.back-top { position: fixed; right: 24px; bottom: 40px; width: 46px; height: 46px; border-radius: 50%; background: var(--green); color: #fff; border: none; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.22); opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .25s ease; z-index: 999; }
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--green-deep); }
@media (max-width: 768px) { .back-top { right: 16px; bottom: 88px; width: 42px; height: 42px; font-size: 19px; } }
