/* ============================================================
   DjangoBlog 现代化主题 v2
   设计理念：现代工程师博客 —— 简洁、专业、AI 质感
   - 浅色纸感背景 + 深墨文字，蓝紫 accent（AI/技术主题）
   - 卡片化文章列表，sticky 导航，深色代码块
   - 移动优先响应式，阅读体验优化
   ============================================================ */

:root {
    /* 色彩系统 */
    --bg: #f5f6fa;
    --bg-soft: #eceef4;
    --card: #ffffff;
    --text: #1f2430;
    --text-soft: #5a6172;
    --text-faint: #9aa1b2;
    --border: #e3e6ee;
    --border-strong: #d0d4e0;

    /* accent：AI 蓝紫 */
    --accent: #4f46e5;
    --accent-strong: #4338ca;
    --accent-soft: #eef0fd;
    --accent-glow: rgba(79, 70, 229, 0.18);

    /* 语义色 */
    --ok: #16a34a;
    --warn: #d97706;
    --danger: #dc2626;
    --dark: #171c28;

    /* 排版 */
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;

    /* 布局 */
    --maxw: 1180px;
    --content-maxw: 780px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-md: 0 4px 16px rgba(16, 24, 40, 0.07);
    --shadow-lg: 0 12px 40px rgba(16, 24, 40, 0.12);
    --header-h: 64px;
}

/* ============ 暗色模式 ============
   两种触发：系统偏好（prefers-color-scheme）+ 手动切换（[data-theme="dark"]）
   手动切换优先级更高；JS 负责写 <html data-theme> + localStorage

   【暂时禁用】暗色模式整体隐藏：按钮移除、JS 关闭、自动跟随系统也关闭，
   恢复时把下面 @media 前的 /* 与结尾的 */ 删掉并恢复按钮/JS 即可。
   */
/*
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0f1420;
        --bg-soft: #151b2a;
        --card: #181f30;
        --text: #e6e9f0;
        --text-soft: #a3aabf;
        --text-faint: #6b7284;
        --border: #2a3247;
        --border-strong: #39425c;
        --accent: #7c82f0;
        --accent-strong: #9aa2ff;
        --accent-soft: rgba(124, 130, 240, 0.16);
        --accent-glow: rgba(124, 130, 240, 0.25);
        --ok: #2ebd6b;
        --warn: #e5a540;
        --danger: #f05252;
        --dark: #0b0f18;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
        --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    }
}
*/

:root[data-theme="dark"] {
    --bg: #0f1420;
    --bg-soft: #151b2a;
    --card: #181f30;
    --text: #e6e9f0;
    --text-soft: #a3aabf;
    --text-faint: #6b7284;
    --border: #2a3247;
    --border-strong: #39425c;
    --accent: #7c82f0;
    --accent-strong: #9aa2ff;
    --accent-soft: rgba(124, 130, 240, 0.16);
    --accent-glow: rgba(124, 130, 240, 0.25);
    --ok: #2ebd6b;
    --warn: #e5a540;
    --danger: #f05252;
    --dark: #0b0f18;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* 深色代码块在暗色模式下保持对比（当前位置的 .highlight / pre 已是深色，
   这里统一加深底色背景与边框便于过渡） */
:root[data-theme="dark"] .entry-content pre,
:root[data-theme="dark"] .highlight pre,
:root[data-theme="dark"] .plain-code,
:root[data-theme="dark"] .entry-content code {
    border-color: var(--border-strong);
}

/* ============ 主题切换按钮（导航栏） ============ */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: 8px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .12s ease;
    vertical-align: middle;
}

.theme-toggle:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.theme-toggle-icon {
    position: relative;
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    transition: background .2s ease;
}

.theme-toggle-icon::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px dashed var(--accent);
    opacity: 0;
    transition: opacity .2s ease;
}

:root[data-theme="dark"] .theme-toggle-icon {
    background: transparent;
    border: 1.5px solid var(--accent);
    box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 3px var(--accent);
}

:root[data-theme="dark"] .theme-toggle-icon::after {
    opacity: 1;
}

/* ============ 代码块增强：复制按钮 + 语言标签 ============ */
.code-block-enhanced {
    position: relative;
    margin: 18px 0;
}

.code-block-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px 6px 14px;
    background: #121826;
    border: 1px solid #2a3247;
    border-bottom: 0;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.code-block-enhanced .code-lang {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #8b93a7;
}

.code-copy-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #3a4357;
    background: #1c2436;
    color: #c3cadb;
    font-size: 0.75rem;
    font-family: var(--font-body);
    padding: 4px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all .18s ease;
}

.code-copy-btn:hover {
    border-color: var(--accent);
    color: #fff;
    background: rgba(124, 130, 240, 0.22);
}

.code-copy-btn.copied {
    border-color: var(--ok);
    color: #d9ffe8;
    background: rgba(46, 189, 107, 0.18);
}

.code-block-enhanced > pre,
.code-block-enhanced .highlight > pre,
.code-block-enhanced pre.plain-code {
    margin: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
    border: 1px solid #2a3247 !important;
    border-top: 0 !important;
}

.code-block-enhanced code {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
}

/* ============ 重置增强 ============ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.18s ease;
}

a:hover {
    color: var(--accent-strong);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    padding-left: 1.4em;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.35;
    color: var(--text);
    font-weight: 700;
}

/* ============ 页面骨架 ============ */
#page.hfeed.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

/* ============ Header ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(1.6) blur(14px);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid var(--border);
}

.site-header hgroup {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 14px 24px 0;
}

.site-header .site-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.site-header .site-title a {
    color: var(--text);
    background: linear-gradient(120deg, var(--text) 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-header .site-title a:hover {
    opacity: 0.85;
}

.site-header .site-description {
    margin: 4px 0 0;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-soft);
    line-height: 1.5;
    max-width: 640px;
}

/* ============ 导航 ============ */
.main-navigation {
    max-width: var(--maxw);
    margin: 10px auto 0;
    padding: 0 24px;
}

.main-navigation .nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.main-navigation .nav-menu > li {
    position: relative;
}

.main-navigation .nav-menu > li > a {
    display: inline-block;
    padding: 9px 14px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-soft);
    border-radius: var(--radius-sm);
    transition: all 0.18s ease;
}

.main-navigation .nav-menu > li > a:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

.main-navigation .nav-menu > li.current-menu-item > a,
.main-navigation .nav-menu > li.current_page_item > a {
    color: var(--accent);
    font-weight: 600;
    background: var(--accent-soft);
}

/* 子菜单（分类层级） */
.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    list-style: none;
    margin: 4px 0 0;
    padding: 6px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 50;
}

.main-navigation li:hover > .sub-menu {
    display: block;
}

.main-navigation .sub-menu a {
    display: block;
    padding: 7px 12px;
    font-size: 0.88rem;
    color: var(--text-soft);
    border-radius: 6px;
}

.main-navigation .sub-menu a:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

/* 嵌套子菜单右展开 */
.main-navigation .sub-menu .sub-menu {
    top: -6px;
    left: 100%;
}

/* 汉堡按钮（移动端） */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    font-family: var(--font-body);
}

/* ============ 主布局 ============ */
.wrapper {
    flex: 1;
    max-width: var(--maxw);
    width: 100%;
    margin: 0 auto;
    padding: 28px 24px 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: start;
}

#primary.site-content {
    min-width: 0;
}

/* ============ 归档页头 ============ */
.archive-header {
    margin-bottom: 22px;
}

.archive-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-soft);
}

.archive-title span {
    color: var(--accent);
}

.search-query {
    color: var(--accent);
    font-weight: 700;
}

/* ============ 文章卡片（列表页） ============ */
#content article.hentry {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 26px;
    margin: 0 0 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

#content article.hentry:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--border-strong);
}

.entry-header {
    margin-bottom: 12px;
}

.entry-title {
    margin: 0 0 6px;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.entry-title a {
    color: var(--text);
    position: relative;
}

.entry-title a:hover {
    color: var(--accent);
}

/* 置顶徽章 */
.pin-badge {
    display: inline-block;
    vertical-align: 2px;
    margin-right: 8px;
    padding: 1px 9px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(120deg, var(--accent), #7c3aed);
    border-radius: 999px;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 6px var(--accent-glow);
}

/* 文章 meta 行（阅读时长/浏览量） */
.entry-meta-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-faint);
}

.entry-meta-line .dot {
    color: var(--border-strong);
}

.comments-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-faint);
    margin-bottom: 8px;
}

.comments-link .leave-reply a,
.comments-link a {
    color: var(--text-faint);
}

.comments-link a:hover {
    color: var(--accent);
}

.read-time {
    color: var(--text-soft);
}

/* 更新于 标注 */
.update-time {
    color: var(--accent);
    font-weight: 500;
}

.update-time::before {
    content: "✎ ";
    font-size: 0.78em;
}

/* 点赞 + 分享工具条 */
.interact-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 26px 0 10px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--border-strong);
    background: var(--card);
    color: var(--text-soft);
    font-size: 0.85rem;
    font-family: var(--font-body);
    padding: 7px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.like-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.like-btn .like-heart {
    font-size: 0.95rem;
    transition: transform 0.15s ease;
}

.like-btn:hover .like-heart {
    transform: scale(1.25);
}

.like-btn.liked {
    background: rgba(220, 38, 38, 0.08);
    border-color: var(--danger);
    color: var(--danger);
    font-weight: 600;
}

.like-btn.liked .like-heart {
    animation: heart-pop 0.3s ease;
}

@keyframes heart-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.45); }
    100% { transform: scale(1.1); }
}

.like-count {
    font-weight: 700;
    min-width: 1.6em;
    text-align: center;
}

.interact-divider {
    width: 1px;
    height: 20px;
    background: var(--border-strong);
    margin: 0 4px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-strong);
    background: var(--card);
    color: var(--text-soft);
    font-size: 0.85rem;
    font-family: var(--font-body);
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
}

.share-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.share-icon {
    font-size: 0.92rem;
}

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-faint);
    padding: 6px 0 0;
}

.breadcrumb div {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb a {
    color: var(--text-faint);
}

.breadcrumb a:hover {
    color: var(--accent);
}

/* 列表摘要 */
#content .entry-content {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.8;
}

#content .entry-content p {
    margin: 0 0 10px;
}

#content article.hentry .read-more {
    margin: 12px 0 0;
}

#content article.hentry .read-more a {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    padding: 6px 14px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    transition: all 0.18s ease;
}

#content article.hentry .read-more a:hover {
    background: var(--accent);
    color: #fff;
}

/* ============ 文章正文（详情页） ============ */
.single #content article.hentry,
#content article.hentry.single-entry {
    padding-top: 32px;
}

.entry-content {
    font-size: 1.02rem;
    line-height: 1.85;
    color: #2b303c;
}

.entry-content > * {
    max-width: var(--content-maxw);
    margin-left: auto;
    margin-right: auto;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2em;
    margin-bottom: 0.7em;
    scroll-margin-top: calc(var(--header-h) + 20px);
}

.entry-content h2 {
    font-size: 1.45rem;
    padding-bottom: 0.4em;
    border-bottom: 1px solid var(--border);
}

.entry-content h3 {
    font-size: 1.22rem;
    color: var(--text);
}

.entry-content h4 {
    font-size: 1.08rem;
    color: var(--text);
}

.entry-content p {
    margin: 0 0 1.15em;
}

.entry-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(79, 70, 229, 0.35);
}

.entry-content a:hover {
    text-decoration-color: var(--accent);
}

.entry-content strong {
    color: var(--text);
    font-weight: 700;
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 1.2em;
}

.entry-content li {
    margin-bottom: 0.4em;
}

.entry-content li::marker {
    color: var(--accent);
}

/* 引用块 */
.entry-content blockquote {
    margin: 1.5em auto;
    padding: 14px 20px;
    border-left: 4px solid var(--accent);
    background: var(--accent-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-soft);
    font-size: 0.98em;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

/* 行内代码 */
.entry-content code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--bg-soft);
    color: #b45309;
    padding: 2px 6px;
    border-radius: 5px;
    word-break: break-word;
}

/* 代码块：深色 */
.entry-content pre {
    margin: 0.5em auto 1.4em;
    padding: 18px 20px;
    background: #1e2433;
    border-radius: var(--radius);
    overflow-x: auto;
    line-height: 1.65;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
}

.entry-content pre code {
    background: none;
    color: #e2e8f0;
    padding: 0;
    font-size: inherit;
    word-break: normal;
    white-space: pre;
}

/* 无语言代码块（plain-code）同样深色 */
.entry-content pre.plain-code {
    background: #1e2433;
    border: 1px solid #2a3142;
    border-radius: var(--radius);
    padding: 18px 20px;
    overflow-x: auto;
    margin: 1.4em auto;
}

.entry-content pre.plain-code code {
    color: #cbd5e1;
}

/* pygments 高亮（深色主题适配） */
.entry-content .highlight {
    background: #1e2433;
    border-radius: var(--radius);
    overflow: hidden;
    margin: 1.4em auto;
    box-shadow: var(--shadow-md);
}

.entry-content .highlight pre {
    margin: 0;
    background: transparent;
    box-shadow: none;
}

.entry-content .highlight .k, .entry-content .highlight .kd, .entry-content .highlight .kn { color: #c792ea; }
.entry-content .highlight .s, .entry-content .highlight .s1, .entry-content .highlight .s2, .entry-content .highlight .sd, .entry-content .highlight .sb { color: #c3e88d; }
.entry-content .highlight .c, .entry-content .highlight .c1, .entry-content .highlight .cm { color: #767a8c; font-style: italic; }
.entry-content .highlight .m, .entry-content .highlight .mi, .entry-content .highlight .mf, .entry-content .highlight .mo { color: #f78c6c; }
.entry-content .highlight .nb, .entry-content .highlight .nc, .entry-content .highlight .nf { color: #82aaff; }
.entry-content .highlight .kc { color: #ffcb6b; }
.entry-content .highlight .o, .entry-content .highlight .p { color: #89a0c8; }
.entry-content .highlight .err { color: #ff5555; }
.entry-content .highlight .n, .entry-content .highlight .nn { color: #e2e8f0; }
.entry-content .highlight .no { color: #f78c6c; }
.entry-content .highlight .nd { color: #ffcb6b; }
.entry-content .highlight .vc, .entry-content .highlight .vi { color: #f07178; }

/* 表格 */
.entry-content table {
    margin: 1.4em auto;
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    line-height: 1.6;
}

.entry-content th {
    background: var(--accent-soft);
    color: var(--text);
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    border: 1px solid var(--border);
}

.entry-content td {
    padding: 9px 14px;
    border: 1px solid var(--border);
    color: var(--text-soft);
}

.entry-content tr:nth-child(even) td {
    background: #fafbfd;
}

.entry-content tr:hover td {
    background: #f4f5fb;
}

/* 正文图片 */
.entry-content img {
    display: block;
    margin: 1.4em auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

/* 水平线 */
.entry-content hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2.2em auto;
}

/* ============ 文章 meta（作者/时间/分类/标签） ============ */
.entry-meta {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
    font-size: 0.82rem;
    color: var(--text-faint);
    line-height: 2;
}

.entry-meta a {
    color: var(--accent);
}

.entry-meta a:hover {
    text-decoration: underline;
}

.entry-meta .by-author {
    display: inline-block;
}

/* 文章导航（上一篇/下一篇） */
.nav-single,
.navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 28px 0 0;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    clear: both;
    overflow: hidden;
}

.nav-single .nav-previous,
.nav-single .nav-next,
.navigation .nav-previous,
.navigation .nav-next {
    flex: 1;
    min-width: 0;
    font-size: 0.88rem;
    line-height: 1.6;
}

.nav-single .nav-next,
.navigation .nav-next {
    text-align: right;
}

.nav-single a,
.navigation a {
    color: var(--text-soft);
    font-weight: 500;
}

.nav-single a:hover,
.navigation a:hover {
    color: var(--accent);
}

.meta-nav {
    color: var(--text-faint);
}

/* ============ 相关阅读 ============ */
.related-articles {
    margin: 24px 0 0;
}

/* ============ 目录（TOC） ============ */
#toc-box {
    margin: 0 0 20px;
    padding: 16px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
}

#toc-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text);
}

#toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    line-height: 1.9;
    columns: 2;
    column-gap: 32px;
}

#toc-list li {
    break-inside: avoid;
}

#toc-list a {
    color: var(--text-soft);
    display: inline-block;
    padding: 2px 0;
    border-bottom: 1px solid transparent;
}

#toc-list a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent-soft);
}

/* ============ 图片灯箱 ============ */
#lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(10, 12, 20, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

#lightbox.open {
    display: flex;
}

.lightbox-stage {
    max-width: min(1400px, 92vw);
    max-height: 84vh;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    overflow: hidden;
}

.lightbox-img {
    max-width: 100%;
    max-height: 82vh;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.12);
    transform-origin: center;
    transition: transform 0.08s ease;
    user-select: none;
    object-fit: contain;
}

.lightbox-caption {
    position: fixed;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80vw;
    color: #e2e8f0;
    font-size: 0.92rem;
    text-align: center;
    background: rgba(20, 24, 38, 0.7);
    padding: 8px 16px;
    border-radius: 999px;
    pointer-events: none;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 26px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(20, 24, 38, 0.6);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.18s ease;
    z-index: 210;
}

.lightbox-close:hover {
    background: var(--danger);
    border-color: var(--danger);
}

.lightbox-tools {
    position: fixed;
    bottom: 22px;
    right: 26px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 210;
}

.lightbox-tools button {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    background: rgba(20, 24, 38, 0.6);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.15s ease;
}

.lightbox-tools button:hover {
    background: rgba(79, 70, 229, 0.85);
    border-color: rgba(79, 70, 229, 0.85);
}

.lightbox-zoom-level {
    min-width: 52px;
    text-align: center;
    color: #e2e8f0;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.lightbox-drag-tip {
    position: fixed;
    top: 78px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(226, 232, 240, 0.85);
    font-size: 0.82rem;
    background: rgba(20, 24, 38, 0.55);
    padding: 6px 14px;
    border-radius: 999px;
    pointer-events: none;
    z-index: 210;
}

/* ============ 相关阅读 ============ */
.related-articles {
    margin: 22px 0 0;
    padding: 18px 22px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.related-articles h3 {
    margin: 0 0 12px;
    font-size: 1rem;
    color: var(--text);
}

.related-articles ul {
    margin: 0;
    padding-left: 20px;
    line-height: 2;
    font-size: 0.92rem;
}

.related-articles li span {
    color: var(--text-faint);
    font-size: 0.8rem;
}

/* ============ 侧栏 ============ */
#secondary.widget-area {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.widget {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-soft);
    position: relative;
}

.widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 42px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget ul li {
    padding: 7px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.88rem;
    line-height: 1.6;
}

.widget ul li:last-child {
    border-bottom: 0;
}

.widget ul li a {
    color: var(--text-soft);
    display: block;
}

.widget ul li a:hover {
    color: var(--accent);
}

/* 搜索框 */
.widget_search .searchform {
    display: flex;
    gap: 8px;
}

.widget_search input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-body);
    color: var(--text);
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.widget_search input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.widget_search input[type="submit"] {
    padding: 9px 18px;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    white-space: nowrap;
    transition: background 0.18s ease;
}

.widget_search input[type="submit"]:hover {
    background: var(--accent-strong);
}

/* 标签云 */
.widget .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.widget .tagcloud a {
    display: inline-block;
    padding: 4px 11px;
    font-size: 0.8rem !important;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid transparent;
    border-radius: 999px;
    transition: all 0.18s ease;
}

.widget .tagcloud a:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* 分类数 */
.widget .cat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 近期评论 */
.widget .recentcomments {
    display: block;
}

/* 功能（登录/管理） */
.widget .widget_meta li a {
    color: var(--text-soft);
}

/* ============ 分页 ============ */
.error-page-help {
    margin: 16px 0 30px;
    line-height: 2;
}

.header-center {
    text-align: center;
}

.error-page-help a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed var(--accent);
}
.pagination-navi,
#nav-below.navigation {
    margin-top: 8px;
}

/* ============ 回到顶部 ============ */
#rocket {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 90;
    font-size: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#rocket.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#rocket::after {
    content: "↑";
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

#rocket:hover {
    background: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

#rocket:hover::after {
    color: #fff;
}

/* ============ 评论 ============ */
#comments.themeform {
    margin-top: 36px;
}

#comments .comment-tabs {
    list-style: none;
    margin: 0 0 20px;
    padding: 0 0 10px;
    border-bottom: 2px solid var(--accent-soft);
    display: flex;
    gap: 4px;
}

#comments .comment-tabs li a {
    display: inline-block;
    padding: 8px 16px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-soft);
    border-radius: var(--radius-sm);
    background: transparent;
}

#comments .comment-tabs li.active a {
    color: var(--accent);
    background: var(--accent-soft);
}

#comments .commentlist {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 评论项 */
#comments .commentlist > li,
#comments .commentlist li.comment {
    margin: 0 0 16px;
    padding: 16px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    list-style: none;
}

#comments .commentlist .comment-body {
    font-size: 0.95rem;
}

#comments .comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

#comments .comment-author .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-soft);
}

#comments .comment-author .fn {
    font-style: normal;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

#comments .comment-author .fn a {
    color: var(--accent);
    font-weight: 700;
}

#comments .comment-author .says {
    color: var(--text-faint);
    font-size: 0.85rem;
}

#comments .commentmetadata {
    font-size: 0.78rem;
    color: var(--text-faint);
    margin-bottom: 10px;
}

#comments .comment-body > p {
    margin: 0 0 8px;
    color: var(--text-soft);
    line-height: 1.8;
}

#comments .reply {
    text-align: right;
}

#comments .comment-reply-link {
    display: inline-block;
    padding: 4px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    transition: all 0.18s ease;
}

#comments .comment-reply-link:hover {
    background: var(--accent);
    color: #fff;
}

/* 评论表单 */
.comments-area {
    margin-top: 28px;
    padding: 22px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.comment-respond .comment-reply-title {
    margin: 0 0 16px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-soft);
}

.comment-respond .comment-reply-title small a {
    font-size: 0.8rem;
    color: var(--danger);
    font-weight: 400;
    text-decoration: none;
}

.comment-form p {
    margin: 0 0 14px;
}

.comment-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-soft);
}

.comment-form textarea {
    width: 100%;
    min-height: 130px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: #fff;
    resize: vertical;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    box-sizing: border-box;
}

.comment-form input[type="text"],
.comment-form input[type="email"] {
    width: 100%;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--text);
    box-sizing: border-box;
}

.comment-form textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.comment-form .errorlist {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    color: var(--danger);
    font-size: 0.82rem;
}

.comment-form .form-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.comment-form .form-submit .submit {
    padding: 10px 28px;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.18s ease, transform 0.12s ease;
}

.comment-form .form-submit .submit:hover {
    background: var(--accent-strong);
    transform: translateY(-1px);
}

.comment-markdown {
    font-size: 0.78rem;
    color: var(--text-faint);
}

.comments-area .comment-meta {
    font-size: 0.95rem;
    color: var(--text-soft);
    font-weight: 400;
}

.comments-area .comment-meta a {
    color: var(--accent);
    font-weight: 600;
}

.comments-area .oauth-login-area {
    margin-top: 12px;
}

/* ============ 页脚 ============ */
#colophon {
    background: var(--dark);
    color: #9aa1b2;
    padding: 28px 24px;
    margin-top: auto;
}

#colophon .site-info {
    max-width: var(--maxw);
    margin: 0 auto;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.8;
}

#colophon .site-info a {
    color: var(--text-faint);
}

#colophon .site-info a:hover {
    color: #fff;
}

#colophon p {
    margin: 0;
}

/* 页脚邮件订阅框 */
#colophon .subscribe-box {
    max-width: var(--maxw);
    margin: 0 auto 18px;
    text-align: center;
}

#colophon .subscribe-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#colophon .subscribe-form label {
    font-size: 0.9rem;
    color: #c6ccd8;
    margin-right: 6px;
}

#colophon .subscribe-form input[type=email] {
    width: 260px;
    max-width: 70vw;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid #3a4152;
    background: #151b28;
    color: #e6e9f0;
    font-size: 0.85rem;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

#colophon .subscribe-form input[type=email]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

#colophon .subscribe-form input[type=email]::placeholder {
    color: #6b7285;
}

#colophon .subscribe-form button {
    padding: 9px 22px;
    border-radius: 999px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s ease, transform .12s ease;
}

#colophon .subscribe-form button:hover {
    background: var(--accent-strong);
    transform: translateY(-1px);
}

#colophon .subscribe-form button:disabled {
    opacity: .6;
    cursor: wait;
}

#colophon .subscribe-msg {
    margin: 10px auto 0;
    font-size: 0.8rem;
    min-height: 1.2em;
}

#colophon .subscribe-msg.sub-ok {
    color: #4ade80;
}

#colophon .subscribe-msg.sub-error {
    color: #f87171;
}

/* 退订页 */
.unsub-box {
    max-width: 480px;
    margin: 60px auto;
    padding: 40px 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.unsub-box h2 {
    margin: 0 0 14px;
    color: var(--text);
}

.unsub-tip {
    color: var(--text-soft);
    line-height: 1.8;
    margin: 0 0 8px;
}

.unsub-box form {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.unsub-btn {
    padding: 10px 30px;
    border-radius: 999px;
    border: none;
    background: var(--danger);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.unsub-btn:hover {
    opacity: .9;
}

.unsub-cancel {
    color: var(--text-faint);
    font-size: 0.85rem;
}

.unsub-cancel:hover {
    color: var(--accent);
}

#colophon .beian-code {
    display: inline-block;
    height: 20px;
    line-height: 20px;
    margin: 0 0 0 5px;
    color: #939393;
}

/* ============ 响应式 ============ */
@media (max-width: 960px) {
    .wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 20px 16px 40px;
    }

    #secondary.widget-area {
        position: static;
        order: 2;
    }

    .site-header hgroup {
        padding: 12px 16px 0;
    }

    .main-navigation {
        padding: 0 16px;
    }
}

@media (max-width: 720px) {
    body {
        font-size: 15px;
    }

    .site-header hgroup {
        text-align: center;
    }

    .site-header .site-description {
        margin-left: auto;
        margin-right: auto;
    }

    /* 折叠导航 */
    .main-navigation .menu-toggle {
        display: block;
        width: 100%;
        margin-bottom: 6px;
    }

    .main-navigation .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        padding-bottom: 8px;
    }

    .main-navigation .nav-menu.toggled-on {
        display: flex;
    }

    .main-navigation .nav-menu > li > a {
        display: block;
        width: 100%;
        padding: 10px 12px;
    }

    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        border: 0;
        border-left: 2px solid var(--border);
        margin: 2px 0 2px 12px;
        padding: 0;
        display: block;
        background: transparent;
    }

    .main-navigation .sub-menu .sub-menu {
        left: 0;
        top: 0;
    }

    /* 文章卡片 */
    #content article.hentry {
        padding: 18px 18px;
    }

    .entry-title {
        font-size: 1.15rem;
    }

    .entry-content h2 {
        font-size: 1.25rem;
    }

    .entry-content h3 {
        font-size: 1.12rem;
    }

    .entry-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .nav-single {
        flex-direction: column;
        gap: 8px;
    }

    .nav-single .nav-next {
        text-align: left;
    }

    #rocket {
        right: 14px;
        bottom: 14px;
        width: 38px;
        height: 38px;
    }
}

/* ============ 打印 ============ */
@media print {
    .site-header,
    #secondary,
    #rocket,
    .nav-single,
    #toc-box,
    .related-articles {
        display: none !important;
    }

    .wrapper {
        display: block;
        max-width: 100%;
        padding: 0;
    }

    article.hentry {
        box-shadow: none !important;
        border: 0 !important;
    }

    body {
        background: #fff;
    }

    .entry-content pre {
        background: #f5f5f5 !important;
        color: #333 !important;
        white-space: pre-wrap;
    }
}

/* ============================================================
   登录 / 注册页（base_account.html 专用）
   Bootstrap 旧样式之上覆盖为站点主题
   ============================================================ */
body.account-body {
    background: var(--bg);
    background-image:
        radial-gradient(1200px 500px at 85% -10%, rgba(79, 70, 229, .10), transparent 60%),
        radial-gradient(900px 420px at -10% 110%, rgba(124, 58, 237, .08), transparent 60%);
    padding: 48px 16px;
    font-family: var(--font-body);
    color: var(--text);
}

body.account-body .container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 0;
}

body.account-body .form-signin-heading {
    margin: 0 0 22px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    letter-spacing: .01em;
}

body.account-body .form-signin-heading::after {
    content: "";
    display: block;
    width: 46px;
    height: 3px;
    margin: 12px auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), #7c3aed);
}

body.account-body .card.card-signin {
    width: 100%;
    max-width: 420px;
    padding: 34px 36px 30px;
    margin: 0 auto 20px;
    box-sizing: border-box;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

body.account-body .card-signin .profile-img {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 3px solid var(--accent-soft);
    display: block;
}

body.account-body .form-signin {
    max-width: 320px;
    padding: 0;
    margin: 0 auto;
}

body.account-body .form-signin .form-control,
body.account-body .form-signin input[type="text"],
body.account-body .form-signin input[type="email"],
body.account-body .form-signin input[type="password"],
body.account-body .form-signin input[type="username"] {
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    margin-bottom: 14px;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-body);
    color: var(--text);
    background: #fff;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

body.account-body .form-signin .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    outline: none;
}

body.account-body .form-signin .btn-primary {
    width: 100%;
    padding: 11px 16px;
    margin-top: 6px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    box-shadow: none;
    transition: background .18s ease, transform .12s ease;
}

body.account-body .form-signin .btn-primary:hover,
body.account-body .form-signin .btn-primary:focus {
    background: var(--accent-strong);
    box-shadow: 0 4px 14px var(--accent-glow);
    transform: translateY(-1px);
}

body.account-body .form-signin .checkbox {
    margin: 14px 0 4px;
    font-size: .85rem;
    color: var(--text-soft);
}

body.account-body .form-signin .checkbox input {
    margin-right: 4px;
}

body.account-body .errorlist,
body.account-body .error-message {
    list-style: none;
    margin: 0 0 12px;
    padding: 8px 12px;
    font-size: .82rem;
    color: var(--danger);
    background: rgba(239, 68, 68, .08);
    border: 1px solid rgba(239, 68, 68, .25);
    border-radius: var(--radius-sm);
}

body.account-body .text-center {
    text-align: center;
    margin: 14px 0 0;
    font-size: .9rem;
    color: var(--text-faint);
}

body.account-body .text-center a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

body.account-body .text-center a:hover {
    text-decoration: underline;
}

/* OAuth 社交登录区 */
body.account-body .widget-login {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--border);
    text-align: center;
}

body.account-body .widget-login .login-title {
    display: block;
    margin-bottom: 14px;
    font-size: .8rem;
    color: var(--text-faint);
}

body.account-body .widget-login .oauth-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

body.account-body .widget-login .oauth-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

body.account-body .widget-login .oauth-icon-link:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* 登录限速错误提示 */
.login-error-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: var(--danger);
    font-size: .82rem;
    line-height: 1.5;
    text-align: left;
}

.login-error-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* ============================================================
   搜索结果页（search_result_item.html 精简卡片）
   ============================================================ */
.search-result-item {
    margin-bottom: 18px;
    padding: 20px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .18s ease, transform .18s ease;
}

.search-result-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.search-result-item .entry-title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 700;
}

.search-result-item .entry-title a {
    color: var(--text);
    text-decoration: none;
}

.search-result-item .entry-title a:hover {
    color: var(--accent);
}

.search-result-item .entry-meta-line {
    font-size: .8rem;
}

.search-result-item .meta-cat {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.search-result-item .entry-content {
    margin-top: 10px;
}

.search-result-item .search-excerpt {
    margin: 0 0 8px;
    font-size: .9rem;
    line-height: 1.7;
    color: var(--text-soft);
    word-break: break-word;
}

.search-result-item .read-more {
    margin: 0;
}

.search-result-item .read-more a {
    display: inline-block;
    padding: 6px 16px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    text-decoration: none;
    transition: all .18s ease;
}

.search-result-item .read-more a:hover {
    background: var(--accent);
    color: #fff;
}