/* ========== 全局变量 & 重置 ========== */
:root {
    --color-primary: #e67e22;
    --color-primary-hover: #d35400;
    --color-primary-light: #f0a050;
    --color-primary-bg: rgba(230, 126, 34, 0.08);
    --color-primary-bg-hover: rgba(230, 126, 34, 0.15);
    --color-accent: #3498db;
    --color-text: #2c3e50;
    --color-text-secondary: #636e72;
    --color-text-muted: #b2bec3;
    --color-bg: #f5f0e8;
    --color-card: #ffffff;
    --color-border: #f1f2f6;
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.05);
    --shadow-card-hover: 0 8px 30px rgba(230, 126, 34, 0.12);
    --radius-card: 16px;
    --radius-tag: 20px;
    --font-body: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Courier New', monospace;
}

/* 标签配色系统 */
.tag-color-0 { background: rgba(230,126,34,0.1); color: #e67e22; }
.tag-color-1 { background: rgba(52,152,219,0.1); color: #3498db; }
.tag-color-2 { background: rgba(46,204,113,0.1); color: #27ae60; }
.tag-color-3 { background: rgba(155,89,182,0.1); color: #8e44ad; }
.tag-color-4 { background: rgba(231,76,60,0.1);  color: #c0392b; }
.tag-color-5 { background: rgba(241,196,15,0.15);color: #d4a017; }
.tag-color-6 { background: rgba(26,188,156,0.1); color: #16a085; }
.tag-color-7 { background: rgba(149,165,166,0.15);color: #7f8c8d; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

/* 全局代码元素统一使用等宽字体 */
code, pre, kbd, samp, .code {
    font-family: var(--font-mono);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 导航栏 ========== */
header {
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s, background-color 0.3s;
}

/* 阅读页取消吸顶 */
.page-read header {
    position: static;
    background-color: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

/* 菜单打开时提升 header 层级，确保导航菜单在遮罩层之上 */
header.nav-open {
    z-index: 9998;
}

nav {
    padding: 0.8rem 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.3px;
    font-family: var(--font-heading);
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-menu a {
    color: var(--color-text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-primary);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    transform: scaleX(1);
}

/* 汉堡菜单按钮（桌面端隐藏） */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    width: 36px;
    height: 36px;
    padding: 6px;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 201;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-overlay {
    display: none;
}

/* ========== 主要内容区域 ========== */
main {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
}

/* ========== 博客容器（首页两栏布局） ========== */
.blog-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    align-items: start;
}

/* ========== 文章列表 ========== */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-item {
    background: var(--color-card);
    padding: 1.8rem;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.post-item:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
    border-color: rgba(230, 126, 34, 0.12);
}

.post-title {
    margin-bottom: 0.6rem;
}

.post-title a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.45;
    font-family: var(--font-heading);
    transition: color 0.2s;
}

.post-title a:hover {
    color: var(--color-primary);
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* 元信息图标通用样式 */
.post-meta .post-date,
.post-meta .post-category,
.post-meta .post-views {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.post-meta .post-date::before,
.post-meta .post-category::before,
.post-meta .post-views::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    opacity: 0.5;
}

/* 列表页元信息中间点分隔 */
.post-list .post-meta span + span::before {
    content: "·";
    margin-right: 0.4rem;
    color: var(--color-text-muted);
    background-image: none;
    width: auto;
    height: auto;
    opacity: 1;
}

.post-meta .post-date {
    color: var(--color-text-muted);
}

.post-meta .post-date::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23888'%3E%3Cpath d='M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/%3E%3C/svg%3E");
}

.post-meta .post-category::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e67e22'%3E%3Cpath d='M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z'/%3E%3C/svg%3E");
    opacity: 0.6;
}

.post-meta .post-views {
    color: var(--color-text-muted);
}

.post-meta .post-views::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23aaa'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z'/%3E%3C/svg%3E");
}

.post-excerpt {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.75;
    font-size: 0.93rem;
    font-family: var(--font-body);
}

.post-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 0.8rem;
}

.post-footer-bar .post-tags {
    flex: 1;
    min-width: 0;
}

.post-readmore {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.2s;
}

.post-readmore:hover {
    color: var(--color-primary-hover);
}

/* ========== 标签 ========== */
.post-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

/* 文章详情页标签区域图标 */
.post-header .post-tags::before {
    display: none;
}

/* 列表页底部标签栏不加图标 */
.post-footer-bar .post-tags::before {
    display: none;
}

.tag {
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-tag);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    /* 默认色，会被 tag-color-N 覆盖 */
    background: var(--color-primary-bg);
    color: var(--color-primary);
}

/* 夜间模式切换按钮（触控尺寸保障） */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 6px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    background: rgba(255,255,255,0.7);
    cursor: pointer;
}

/* 分享按钮（触控尺寸保障） */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 6px;
    border-radius: 10px;
}

.tag:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
}

/* ========== 侧边栏 ========== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 80px;
}

.widget {
    background: var(--color-card);
    padding: 1.5rem;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.widget h3, .widget-title {
    margin-bottom: 1rem;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 600;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--color-border);
    position: relative;
}

.widget h3::after, .widget-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--color-primary);
}

.recent-posts {
    list-style: none;
}

.recent-posts li {
    margin-bottom: 0.5rem;
}

.recent-posts a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s;
}

.recent-posts a:hover {
    color: var(--color-primary);
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* 友情链接（卡片式） */
.link-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.link-list li {
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.link-list li:hover {
    background: var(--color-primary-bg);
}

.link-list a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.link-list a::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23636e72'%3E%3Cpath d='M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.link-list a:hover {
    color: var(--color-primary);
}

.link-list a:hover::before {
    opacity: 0.8;
}

/* ========== 暂无数据提示 ========== */
.empty-tip {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    padding: 1rem 0;
    text-align: center;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 1rem 0;
}

.pagination a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0;
    transition: color 0.2s;
}

.pagination a:hover {
    color: var(--color-primary-hover);
}

.pagination-info {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ========== 热门文章排行 ========== */
.hot-posts {
    list-style: none;
    counter-reset: none;
    padding: 0;
    margin: 0;
}

.hot-post-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.hot-post-item:last-child {
    border-bottom: none;
}

.hot-rank {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hot-rank-top {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
}

.hot-post-link {
    flex: 1;
    min-width: 0;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}

.hot-post-link:hover {
    color: var(--color-primary);
}

.hot-post-views {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ========== 阅读进度条 ========== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    z-index: 200;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ========== 面包屑导航 ========== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.breadcrumb-sep {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.breadcrumb-current {
    color: var(--color-text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

/* 面包屑中的分类链接区域 */
.breadcrumb-categories {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.breadcrumb-categories a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* 分类内部的分隔符统一面包屑风格 */
.breadcrumb-categories .cat-sep {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ========== 阅读页两栏布局（文章 + TOC） ========== */
.read-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

.read-layout.has-toc {
    grid-template-columns: 1fr 220px;
}

/* ========== 文章目录导航 TOC ========== */
.toc-sidebar {
    display: none;
}

.toc-sidebar.has-toc {
    display: block;
    position: sticky;
    top: 20px;
}

.toc-widget {
    background: var(--color-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0,0,0,0.03);
    padding: 1.2rem;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.toc-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.8rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--color-border);
    position: relative;
}

.toc-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
}

.toc-nav {
    display: flex;
    flex-direction: column;
}

.toc-link {
    display: block;
    padding: 0.3rem 0;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    line-height: 1.4;
    border-left: 2px solid transparent;
    padding-left: 0.6rem;
    transition: color 0.2s, border-color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toc-link:hover {
    color: var(--color-primary);
}

.toc-link.active {
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    font-weight: 500;
}

.toc-level-1 { padding-left: 1.2rem; }
.toc-level-2 { padding-left: 1.8rem; }

/* ========== 代码复制按钮 + 语言标签 ========== */
.code-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    margin: 0;
    background: rgba(0,0,0,0.25);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px 10px 0 0;
    user-select: none;
}

.code-lang {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-mono);
}

.code-copy-btn {
    font-size: 0.78rem;
    padding: 0.2rem 0.5rem;
    min-height: 32px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.code-copy-btn:hover {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.25);
}

.code-copy-btn.copied {
    background: rgba(46,204,113,0.2);
    color: #2ecc71;
    border-color: rgba(46,204,113,0.4);
}

/* ====== Editor.md prettify 深色主题覆盖 ====== */
.editormd-preview pre.prettyprint,
pre.prettyprint {
    background: #1e1e2e !important;
    color: #cdd6f4 !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    border-radius: 10px;
    padding: 0 !important;
    overflow: hidden;
}

.editormd-preview pre.prettyprint .code-toolbar,
pre.prettyprint .code-toolbar {
    border-bottom-color: rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.2);
    margin: 0;
    padding: 0.4rem 0.8rem;
    border-radius: 10px 10px 0 0;
}

/* 行号列表 — 去除默认白色条纹 */
pre.prettyprint ol.linenums {
    margin: 0 !important;
    padding: 0.8em 0.8em 0.8em 3.5em !important;
    list-style-type: decimal !important;
    background: transparent !important;
    overflow-x: auto;
}

pre.prettyprint ol.linenums li {
    background: transparent !important;
    border-left: none !important;
    padding: 0 0.6em !important;
    line-height: 1.7 !important;
    color: #cdd6f4 !important;
    font-size: 0.88rem;
    list-style-position: outside;
}

/* 奇偶行条纹 — 统一用微弱深色 */
pre.prettyprint ol.linenums li:nth-child(odd) {
    background: rgba(255,255,255,0.02) !important;
}

pre.prettyprint ol.linenums li:nth-child(even) {
    background: transparent !important;
}

/* 行号颜色 */
pre.prettyprint ol.linenums li::marker {
    color: rgba(205,214,244,0.25);
}

/* ====== prettify 语法高亮色（Catppuccin Mocha 风格） ====== */
pre.prettyprint .pln { color: #cdd6f4; }
pre.prettyprint .str { color: #a6e3a1; }
pre.prettyprint .kwd { color: #cba6f7; }
pre.prettyprint .com { color: #6c7086; font-style: italic; }
pre.prettyprint .typ { color: #f9e2af; }
pre.prettyprint .lit { color: #fab387; }
pre.prettyprint .pun { color: #94e2d5; }
pre.prettyprint .opn { color: #94e2d5; }
pre.prettyprint .clo { color: #94e2d5; }
pre.prettyprint .tag { color: #f38ba8; }
pre.prettyprint .atn { color: #fab387; }
pre.prettyprint .atv { color: #a6e3a1; }
pre.prettyprint .dec { color: #fab387; }
pre.prettyprint .var { color: #f38ba8; }
pre.prettyprint .fun { color: #89b4fa; }

/* editormd code 容器内 */
.editormd-preview pre.prettyprint code,
.editormd-preview code {
    color: #cdd6f4;
    background: transparent;
}

/* ========== 相关文章推荐 ========== */
.related-posts {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-border);
}

.related-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1.2rem;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    border-radius: 12px;
    text-decoration: none;
    background: var(--color-card);
    border: 1px solid rgba(0,0,0,0.04);
    transition: box-shadow 0.2s, transform 0.2s;
}

.related-item:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

.related-cover {
    width: 80px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.related-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.related-item-title {
    font-size: 0.9rem;
    color: var(--color-text);
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-item-meta {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* ========== 文章详情页（单栏 780px） ========== */
.post-detail {
    background: var(--color-card);
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0,0,0,0.03);
}

/* Hero 封面图 */
.post-hero-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: var(--radius-card);
    margin-bottom: 2rem;
    display: block;
}

.post-header {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.post-header .post-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.4;
    margin-bottom: 1rem;
    font-family: var(--font-body);
    word-break: break-word;
    overflow-wrap: break-word;
}

.post-header .post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.8rem;
}

.post-header .post-meta .post-date,
.post-header .post-meta .post-category,
.post-header .post-meta .post-views {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.post-header .post-meta span + span::before {
    content: "·";
    margin-right: 0.5rem;
    color: var(--color-text-muted);
}

.post-header .post-meta .post-date {
    color: var(--color-text-muted);
}

.post-header .post-meta .post-views {
    color: var(--color-text-muted);
}

/* 分类链接 */
.post-category {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.post-category a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.post-category a:hover {
    color: var(--color-primary-hover);
}

.post-category .cat-sep {
    color: #ccc;
    margin: 0 0.15rem;
    font-size: 0.75rem;
    user-select: none;
}

.post-content {
    line-height: 1.85;
    font-size: 1.05rem;
    color: var(--color-text);
    font-family: var(--font-body);
}

.post-content p {
    margin-bottom: 1.5em;
}

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5em;
    margin-bottom: 0.8em;
    color: var(--color-text);
    font-family: var(--font-heading);
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2em;
    margin-bottom: 0.6em;
    font-family: var(--font-heading);
}

.post-content blockquote {
    border-left: 3px solid var(--color-primary);
    padding: 0.8em 1.2em;
    margin: 1.5em 0;
    color: var(--color-text-secondary);
    background: rgba(0,0,0,0.02);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.post-content pre {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    margin: 1.5em 0;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.65;
    border: 1px solid rgba(255,255,255,0.06);
}

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.88em;
}

/* pre 内的 code 块（非 prettify） — 需要内边距 */
.post-content pre > code {
    display: block;
    padding: 0.8em 1em;
    overflow-x: auto;
    color: #cdd6f4;
    background: transparent;
}

/* 行内代码（非 pre 内的 code） */
.post-content :not(pre) > code {
    background: rgba(230,126,34,0.08);
    color: var(--color-primary-hover);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.85em;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5em auto;
    display: block;
}

.post-footer {
    display: none; /* 底部导航移至 FAB 悬浮按钮 */
}

/* 悬浮操作按钮组（右下角） */
.fab-group {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    z-index: 50;
}

.fab-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.fab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}

.fab-btn-home {
    background: var(--color-card);
    color: var(--color-text-secondary);
}

.fab-btn-home:hover {
    color: var(--color-primary);
}

.fab-btn-edit {
    background: var(--color-primary);
    color: #fff;
}

.fab-btn-edit:hover {
    background: var(--color-primary-hover);
}

/* ========== 归档页面样式 ========== */

.archive-page {
    /* 宽度由 blog-container grid 布局控制 */
}

.archive-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.archive-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.3rem;
    font-family: var(--font-body);
}

.archive-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.archive-year-group {
    margin-bottom: 1.5rem;
}

.archive-year {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.archive-year-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-body);
}

.archive-year-count {
    font-size: 0.78rem;
    color: var(--color-primary);
    background: var(--color-primary-bg);
    padding: 0.15rem 0.6rem;
    border-radius: 10px;
    font-weight: 500;
}

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

.archive-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem 0;
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    transition: background 0.2s;
}

.archive-item:last-child {
    border-bottom: none;
}

.archive-item:hover {
    background: var(--color-primary-bg);
    border-radius: 6px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.archive-date {
    flex-shrink: 0;
    width: 3.5rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.archive-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.archive-item-title {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    transition: color 0.2s;
}

.archive-item-title:hover {
    color: var(--color-primary);
}

.archive-item-category {
    font-size: 0.75rem;
    color: var(--color-primary);
    background: var(--color-primary-bg);
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-tag);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========== 搜索页面样式 ========== */

/* 搜索框 */
.search-box {
    margin-bottom: 1.8rem;
}

.search-form {
    display: flex;
    gap: 0;
    background: var(--color-card);
    border-radius: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 2px solid var(--color-border);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-form:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 2px 16px rgba(230, 126, 34, 0.12);
}

.search-input {
    flex: 1;
    border: none;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: var(--color-text);
}

.search-input::placeholder {
    color: var(--color-text-muted);
}

.search-btn {
    border: none;
    background: var(--color-primary);
    color: #fff;
    padding: 0.85rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: 0 22px 22px 0;
    transition: background 0.3s;
}

.search-btn:hover {
    background: var(--color-primary-hover);
}

/* 搜索上下文 */
.search-context {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--color-border);
}

.search-context-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.search-context-count {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

/* 搜索空状态 */
.search-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.search-empty-icon {
    margin-bottom: 1.5rem;
}

.search-empty-text {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.search-empty-hint {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.search-empty-back {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.search-empty-back:hover {
    background: var(--color-primary);
    color: #fff;
}

/* 当前激活的标签 */
.tag-active {
    background: var(--color-primary) !important;
    color: #fff !important;
}

/* ========== 关于页面样式 ========== */

.about-page {
    /* 宽度由 blog-container grid 布局控制 */
}

/* 博主信息卡片 */
.about-profile-card {
    background: var(--color-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.03);
    padding: 2.5rem 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.about-avatar {
    margin-bottom: 1rem;
}

.about-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e8e8e8;
    transition: transform 0.3s;
}

.about-avatar img:hover {
    transform: scale(1.05);
}

.about-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.about-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0.5rem 0;
}

.about-bio {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.about-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.about-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #555;
    transition: all 0.3s;
}

.about-social-link:hover {
    background: #333;
    color: #fff;
    transform: translateY(-2px);
}

/* 博客统计 */
.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.about-stat-item {
    background: var(--color-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.03);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: transform 0.3s;
}

.about-stat-item:hover {
    transform: translateY(-3px);
}

.about-stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.about-stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 0.3rem;
}

/* 通用内容区块 */
.about-section {
    background: var(--color-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.03);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.about-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.about-section-title::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--color-primary);
}

.about-section-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    font-family: var(--font-body);
}

/* 技能标签 */
.about-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.about-skill-tag {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-tag);
    font-size: 0.85rem;
    font-weight: 500;
    transition: transform 0.2s;
}

.about-skill-tag:hover {
    transform: scale(1.05);
}

/* 时间线 */
.about-timeline {
    position: relative;
    padding-left: 2rem;
}

.about-timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--color-border);
}

.about-timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
}

.about-timeline-item:last-child {
    padding-bottom: 0;
}

.about-timeline-dot {
    position: absolute;
    left: -2rem;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-card);
    border: 3px solid var(--color-primary);
    z-index: 1;
}

.about-timeline-content {
    flex: 1;
}

.about-timeline-year {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: var(--color-primary);
    padding: 0.15rem 0.7rem;
    border-radius: 10px;
    margin-bottom: 0.3rem;
}

.about-timeline-event {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-top: 0.3rem;
    line-height: 1.6;
}

/* ========== 评论区样式 ========== */

.comment-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--color-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.comment-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.8rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
}

.comment-section-title svg {
    flex-shrink: 0;
}

.comment-count {
    font-size: 0.82rem;
    font-weight: 500;
    color: #fff;
    background: var(--color-primary);
    padding: 0.1rem 0.55rem;
    border-radius: 10px;
    margin-left: 0.2rem;
    line-height: 1.4;
}

/* 评论表单 */
.comment-form {
    margin-bottom: 2rem;
    background: var(--color-bg);
    border-radius: 12px;
    padding: 1.2rem;
}

.comment-user-info {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.comment-user-info input {
    padding: 0.65rem 1rem;
    border: 1.5px solid transparent;
    border-radius: 10px;
    font-size: 0.88rem;
    color: var(--color-text);
    background: var(--color-card);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-user-info input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.comment-user-info input::placeholder {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.comment-editor {
    position: relative;
}

.comment-editor textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1.5px solid transparent;
    border-radius: 10px;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-card);
    outline: none;
    resize: vertical;
    min-height: 110px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-editor textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.comment-editor textarea::placeholder {
    color: var(--color-text-muted);
}

.comment-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.8rem;
}

.comment-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.emoji-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0.4rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: color 0.2s, background 0.2s;
}

.emoji-toggle:hover {
    color: var(--color-primary);
    background: var(--color-primary-bg);
}

.comment-char-count {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.comment-submit {
    padding: 0.6rem 2rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
}

.comment-submit:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
    transform: translateY(-1px);
}

.comment-submit:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 1px 4px rgba(230, 126, 34, 0.3);
}

.comment-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 表情面板 */
.emoji-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 0.3rem);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 0.8rem;
    width: 320px;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    z-index: 50;
}

.emoji-item {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s, transform 0.15s;
}

.emoji-item:hover {
    background: var(--color-primary-bg);
    transform: scale(1.2);
}

/* 回复提示条 */
.comment-reply-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(230, 126, 34, 0.06);
    border: 1px solid rgba(230, 126, 34, 0.15);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
    color: var(--color-text-secondary);
}

.comment-reply-bar strong {
    color: var(--color-primary);
}

.reply-cancel {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.82rem;
    padding: 0.25rem 0.7rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.reply-cancel:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.08);
}

/* 评论列表 */
.comment-list {
    margin-top: 0.5rem;
}

.comment-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.comment-empty::before {
    content: '💬';
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    opacity: 0.4;
}

.comment-loading {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--color-text-muted);
    font-size: 0.88rem;
}

/* 单条评论 */
.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.2s;
}

.comment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.comment-item:first-child {
    padding-top: 0;
}

.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.comment-author {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--color-text);
}

.comment-author-link {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.comment-author-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.comment-reply-to {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.comment-reply-to strong {
    color: var(--color-primary);
    font-weight: 500;
}

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

.comment-text {
    font-size: 0.93rem;
    line-height: 1.75;
    color: var(--color-text);
    word-break: break-word;
}

.comment-actions {
    margin-top: 0.4rem;
}

.comment-reply-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.comment-reply-btn:hover {
    color: var(--color-primary);
    background: var(--color-primary-bg);
}

/* 子评论缩进 */
.comment-children {
    margin-left: 3.2rem;
    border-left: 2px solid rgba(230, 126, 34, 0.2);
    padding-left: 1.2rem;
}

.comment-child .comment-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.82rem;
}

/* ========== 页脚 ========== */

.site-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #3d566e 100%);
    color: rgba(255,255,255,0.55);
    margin-top: 3rem;
    padding: 1.5rem 0;
    font-size: 0.88rem;
    letter-spacing: 0.3px;
    position: relative;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light), var(--color-accent));
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    margin: 0;
}

.footer-icp {
    width: 100%;
    text-align: center;
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
    opacity: 0.7;
}

.footer-icp a {
    color: rgba(255,255,255,0.6) !important;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-nav a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #fff;
}

.site-footer a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ========== 旧模板样式（pub_inc 模板系统） ========== */

/* 头部 */
#header {
    background: #fff;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 0;
    z-index: 100;
}

#header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#header-left #title a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
    text-decoration: none;
}

#header-left #subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

#header-right ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

#header-right ul li a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

#header-right ul li a:hover {
    color: var(--color-primary);
}

/* 主内容区 */
#main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
    min-height: calc(100vh - 180px);
}

#main-inner {
    background: var(--color-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 2rem;
}

/* 云块（通用内容块） */
.clouds {
    margin-bottom: 2rem;
}

.clouds-title {
    font-size: 1.3rem;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.clouds-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--color-primary);
}

/* 关于页面 */
.about {
    line-height: 1.8;
    font-size: 1rem;
    color: #555;
}

.about p {
    margin-bottom: 1rem;
}

.about a {
    color: var(--color-primary);
    text-decoration: none;
}

.about a:hover {
    text-decoration: underline;
}

/* 归档页面 */
#archive-cloud h2 {
    font-size: 1.4rem;
    color: var(--color-text);
    margin: 1.5rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #eee;
}

#archive-cloud h3 {
    padding: 0.4rem 0;
    font-size: 0.95rem;
    font-weight: normal;
}

#archive-cloud h3 .date {
    display: inline-block;
    width: 50px;
    color: var(--color-text-muted);
    margin-right: 10px;
}

#archive-cloud h3 a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s;
}

#archive-cloud h3 a:hover {
    color: var(--color-primary);
}

/* 分页器（旧模板） */
.pager {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 2rem;
    padding-top: 1rem;
}

.pager a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: var(--color-card);
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.pager a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pager .current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 8px;
    font-size: 0.88rem;
}

/* 底部 */
#footer {
    background: #2c3e50;
    color: var(--color-text-muted);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    font-size: 0.85rem;
}

#footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

#footer-inner a {
    color: #aaa;
    text-decoration: none;
    margin: 0 8px;
    font-size: 0.9rem;
}

#footer-inner a:hover {
    color: #fff;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    /* --- 导航栏：汉堡菜单 + 侧滑抽屉 --- */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 72vw;
        max-width: 320px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        padding: 3.5rem 1.5rem 2rem;
        gap: 0;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        /* 必须高于遮罩层，否则部分浏览器只显示灰屏 */
        z-index: 9999;
        overflow-y: auto;
        transform: translateX(100%);
    }

    .nav-menu.open {
        transform: translateX(0);
    }

    .nav-menu li {
        border-bottom: 1px solid var(--color-border);
    }

    .nav-menu a {
        display: block;
        padding: 1rem 0.5rem;
        font-size: 1.05rem;
        color: var(--color-text);
        border-radius: 0;
        transition: color 0.2s, background 0.2s;
    }

    .nav-menu a:hover,
    .nav-menu a:active {
        color: var(--color-primary);
        background: var(--color-primary-bg);
    }

    /* 汉堡动画 → X */
    .nav-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* 遮罩层 */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 9997;
    }

    .nav-overlay.show {
        display: block;
    }

    /* --- 容器 --- */
    .container {
        padding: 0 1rem;
    }

    main {
        padding: 1rem 0;
    }

    /* --- 两栏→单栏 --- */
    .blog-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.2rem;
    }

    .main-content,
    .sidebar {
        min-width: 0;
    }

    .sidebar {
        position: static;
    }

    /* --- 文章卡片 --- */
    .post-item {
        padding: 1.2rem 1rem;
        border-radius: 12px;
    }

    .post-title {
        margin-bottom: 0.5rem;
    }

    .post-title a {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .post-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem 0.8rem;
        font-size: 0.8rem;
        margin-bottom: 0.6rem;
    }

    .post-excerpt {
        font-size: 0.88rem;
        line-height: 1.65;
        margin-bottom: 0.8rem;
    }

    .post-footer-bar {
        padding-top: 0.6rem;
    }

    .post-readmore {
        font-size: 0.82rem;
    }

    .tag {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }

    /* --- 分类链接 --- */
    .post-category a {
        font-size: 0.78rem;
        padding: 0.15rem 0.5rem;
    }

    /* --- 分页 --- */
    .pagination {
        margin-top: 1.2rem;
        gap: 0.3rem;
    }

    .pagination a {
        min-width: 34px;
        height: 34px;
        font-size: 0.82rem;
    }

    /* --- 侧边栏 --- */
    .widget {
        padding: 1.2rem 1rem;
    }

    /* --- 阅读页布局：移动端单栏，隐藏 TOC --- */
    .read-layout {
        grid-template-columns: 1fr;
    }

    .toc-sidebar {
        display: none !important;
    }

    .breadcrumb-current {
        max-width: 200px;
    }

    .related-item { padding: 0.6rem; }
    .related-cover { width: 64px; height: 44px; }

    /* --- 文章详情页 --- */
    .post-detail {
        padding: 0.8rem;
        border-radius: 12px;
        box-shadow: 0 1px 8px rgba(0,0,0,0.04);
    }

    .post-tags .tag {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }

    .post-header {
        padding: 1rem 0;
    }

    .post-header .post-title {
        font-size: 1.3rem;
        line-height: 1.5;
        word-break: break-word;
    }

    .post-header .post-meta {
        font-size: 0.78rem;
        gap: 0.3rem;
    }

    .post-header .post-meta span + span::before {
        margin-right: 0.3rem;
    }

    .post-content {
        font-size: 0.92rem;
        line-height: 1.75;
    }

    .post-content pre {
        font-size: 0.82rem;
        padding: 0.8rem;
        border-radius: 8px;
        overflow-x: auto;
    }

    .post-content table {
        font-size: 0.82rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .post-content img {
        max-width: 100%;
        height: auto;
        border-radius: 6px;
    }

    /* --- 归档页 --- */
    .archive-header {
        padding: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .archive-title {
        font-size: 1.4rem;
    }

    .archive-desc {
        font-size: 0.85rem;
    }

    .archive-item {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.3rem 0.6rem;
        padding: 0.7rem 0.8rem 0.7rem 1.5rem;
        align-items: baseline;
    }

    /* 时间线竖线：移到左侧 */
    .archive-item::before {
        left: 0.4rem;
    }

    /* 时间线圆点：移到左侧 */
    .archive-item::after {
        left: calc(0.4rem - 3px);
        width: 8px;
        height: 8px;
    }

    .archive-date {
        width: auto;
        font-size: 0.75rem;
        color: #aaa;
        flex-shrink: 0;
    }

    .archive-item-content {
        padding-left: 0;
        flex: 1;
        min-width: 0;
    }

    .archive-item-title {
        font-size: 0.9rem;
        word-break: break-word;
    }

    .archive-item-category { font-size: 0.75rem; }

    .archive-year-text {
        font-size: 1.2rem;
    }

    /* --- 搜索页 --- */
    .search-form {
        flex-direction: row;
        border-radius: 16px;
    }

    .search-input {
        padding: 0.7rem 0.8rem;
        font-size: 0.9rem;
        min-width: 0;
    }

    .search-btn {
        border-radius: 0 14px 14px 0;
        padding: 0.65rem 1rem;
        flex-shrink: 0;
    }

    .search-context {
        margin-bottom: 0.8rem;
    }

    .search-context-title {
        font-size: 0.95rem;
    }

    .search-context-count {
        font-size: 0.78rem;
    }

    /* --- 关于页面 --- */
    .about-page {
        padding: 0.5rem 0;
    }

    .about-profile-card {
        padding: 1.5rem 1rem;
    }

    .about-avatar img,
    .about-avatar-placeholder {
        width: 100px;
        height: 100px;
    }

    .about-name {
        font-size: 1.4rem;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .about-stat-item {
        padding: 1rem 0.5rem;
    }

    .about-stat-num {
        font-size: 1.5rem;
    }

    .about-section {
        padding: 1.2rem;
    }

    /* --- 旧模板兼容 --- */
    #header-inner {
        flex-direction: column;
        gap: 0.5rem;
    }

    #header-right ul {
        gap: 1rem;
    }

    /* --- 评论区 --- */
    .comment-section {
        padding: 1.2rem;
        margin-top: 2rem;
    }

    .comment-section-title {
        font-size: 1.05rem;
        margin-bottom: 1.2rem;
        padding-bottom: 0.8rem;
    }

    .comment-form {
        padding: 1rem;
    }

    .comment-user-info {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .comment-children {
        margin-left: 1.5rem;
        padding-left: 0.8rem;
    }

    .comment-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .comment-child .comment-avatar {
        width: 30px;
        height: 30px;
    }

    .emoji-panel {
        width: 280px;
    }

    .comment-submit {
        padding: 0.55rem 1.5rem;
    }

    /* --- 页脚 --- */
    .site-footer {
        font-size: 0.82rem;
        padding: 1.5rem 0;
    }

    .footer-inner {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .footer-nav {
        gap: 1rem;
    }
}

/* ====== 悬浮编辑按钮（已弃用，改用 .fab-group） ====== */
.fab-edit { display: none; }

/* ========== 超小屏（≤480px） ========== */
@media (max-width: 480px) {
    .logo {
        font-size: 1.15rem;
    }

    nav {
        padding: 0.5rem 0;
    }

    .post-item {
        padding: 1rem;
        border-radius: 10px;
    }

    .post-title a {
        font-size: 1rem;
    }

    .post-meta {
        font-size: 0.75rem;
    }

    .post-excerpt {
        font-size: 0.84rem;
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .tag {
        font-size: 0.75rem;
        padding: 0.12rem 0.4rem;
    }

    .post-detail {
        padding: 1rem 0.8rem;
    }

    .post-header .post-title {
        font-size: 1.15rem;
    }

    .post-content {
        font-size: 0.88rem;
    }

    .post-content pre {
        font-size: 0.78rem;
        padding: 0.6rem;
    }

    .archive-header {
        padding: 1rem;
    }

    .archive-title {
        font-size: 1.2rem;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .pagination a {
        min-width: 30px;
        height: 30px;
        font-size: 0.78rem;
    }

    /* 超小屏封面图进一步缩小 */
    .post-cover-img {
        width: 110px;
        height: 80px;
    }
}

/* ====== 带封面图的文章卡片 ====== */
.post-item-with-cover {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.post-cover-link {
    flex-shrink: 0;
    display: block;
    order: 1; /* 封面图放右侧 */
}
/* 单张 AI 封面图 */
.post-cover-img {
    width: 200px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.post-cover-link:hover .post-cover-img {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* ====== 首篇文章杂志头条风格 ====== */
.post-item:first-child.post-item-with-cover {
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
}
.post-item:first-child.post-item-with-cover .post-cover-link {
    order: -1; /* 封面图在上方 */
    width: 100%;
}
.post-item:first-child.post-item-with-cover .post-cover-img {
    width: 100%;
    height: 300px;
    border-radius: 0;
}
.post-item:first-child.post-item-with-cover .post-item-body {
    padding: 1.5rem 1.8rem 1.8rem;
}
.post-item:first-child.post-item-with-cover .post-title a {
    font-size: 1.5rem;
    font-family: var(--font-body);
}
.post-item:first-child.post-item-with-cover .post-excerpt {
    font-size: 0.95rem;
}
/* 首篇有层叠图集封面时，回退为常规布局 */
.post-item:first-child.post-item-with-cover:has(.post-cover-stack) {
    flex-direction: row;
    gap: 1.5rem;
    padding: 1.8rem;
    overflow: visible;
}
.post-item:first-child.post-item-with-cover:has(.post-cover-stack) .post-cover-link {
    order: 1;
    width: auto;
}
.post-item:first-child.post-item-with-cover:has(.post-cover-stack) .post-item-body {
    padding: 0;
}
/* 层叠图片容器 */
.post-cover-stack {
    position: relative;
    width: 80px;
    height: 80px;
}
/* 多图时扩大容器以容纳偏移（上下拉开、左右紧凑） */
.post-cover-count-2 { width: 92px; height: 100px; }
.post-cover-count-3 { width: 100px; height: 116px; }
.post-cover-count-4 { width: 108px; height: 132px; }

/* 所有层叠图片的基础样式 */
.post-cover-stack .stack-img {
    position: absolute;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1), box-shadow 0.35s ease;
}

/* 单图：无偏移 */
.post-cover-count-1 .stack-img-0 {
    top: 0; left: 0;
    z-index: 4;
}

/* 多图层叠效果：上下间距拉大、左右紧凑 */
.stack-img-0 {
    top: 0; left: 0;
    z-index: 4;
}
.stack-img-1 {
    top: 12px; left: 8px;
    z-index: 3;
    transform: rotate(3deg);
}
.stack-img-2 {
    top: 24px; left: 16px;
    z-index: 2;
    transform: rotate(-2deg);
}
.stack-img-3 {
    top: 36px; left: 24px;
    z-index: 1;
    transform: rotate(4deg);
}

/* hover 展开效果 */
.post-cover-link:hover .stack-img-0 {
    transform: translate(-4px, -4px) rotate(-2deg);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.post-cover-link:hover .stack-img-1 {
    transform: translate(0px, 2px) rotate(0deg);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.post-cover-link:hover .stack-img-2 {
    transform: translate(4px, 8px) rotate(2deg);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.post-cover-link:hover .stack-img-3 {
    transform: translate(8px, 14px) rotate(-1deg);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.post-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.post-item-body .post-excerpt {
    flex: 1;
}

@media (max-width: 768px) {
    /* 首篇头条卡片移动端适配 */
    .post-item:first-child.post-item-with-cover .post-cover-img {
        height: 200px;
    }
    .post-item:first-child.post-item-with-cover .post-item-body {
        padding: 1rem 1.2rem 1.2rem;
    }
    .post-item:first-child.post-item-with-cover .post-title a {
        font-size: 1.2rem;
    }

    .post-item-with-cover {
        gap: 1rem;
    }
    .post-cover-img {
        width: 140px;
        height: 100px;
    }
    .post-cover-stack,
    .post-cover-count-2,
    .post-cover-count-3,
    .post-cover-count-4 {
        width: 70px;
        height: 70px;
    }
    .post-cover-stack .stack-img {
        width: 70px;
        height: 70px;
    }
    /* 移动端简化层叠 */
    .stack-img-1 { top: 8px; left: 6px; }
    .stack-img-2 { top: 16px; left: 12px; }
    .stack-img-3 { top: 24px; left: 18px; }
    .post-cover-count-2 { width: 80px; height: 82px; }
    .post-cover-count-3 { width: 86px; height: 92px; }
    .post-cover-count-4 { width: 92px; height: 100px; }
}

/* ====== 前台图集展示 ====== */
.gallery-content {
    padding: 0 !important;
}
.gallery-read-item {
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
}
.gallery-read-img-wrap {
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
    line-height: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}
.gallery-read-img-wrap:hover {
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}
.gallery-read-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s;
}
.gallery-read-img-wrap:hover img {
    opacity: 0.95;
}
.gallery-read-desc {
    padding: 0.8rem 0.2rem;
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    text-align: center;
}
.gallery-empty-read {
    text-align: center;
    padding: 3rem;
    color: #ccc;
    font-size: 1rem;
}

/* ====== Lightbox ====== */
.lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.88);
}
.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
.lightbox-desc {
    color: #ddd;
    font-size: 0.92rem;
    margin-top: 0.8rem;
    text-align: center;
    max-width: 600px;
    line-height: 1.5;
}
.lightbox-close {
    position: absolute;
    top: -40px;
    right: -10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 2.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.2s;
    line-height: 1;
}
.lightbox-prev:hover, .lightbox-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
}
.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }
.lightbox-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: -35px; right: 5px; }
    .lightbox-prev, .lightbox-next { width: 36px; height: 36px; font-size: 1.8rem; }
}

/* ========== 首页 Hero 区域 ========== */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 35%, #0f3460 65%, #e67e22 100%);
    border-radius: var(--radius-card);
    padding: 3.5rem 3rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    color: #fff;
}

/* 装饰性光效 */
.hero-section::before {
    content: "";
    position: absolute;
    top: -60%;
    right: -15%;
    width: 55%;
    height: 220%;
    background: radial-gradient(ellipse, rgba(230,126,34,0.3) 0%, transparent 65%);
    pointer-events: none;
    animation: heroGlow 8s ease-in-out infinite alternate;
}

.hero-section::after {
    content: "";
    position: absolute;
    bottom: -40%;
    left: -8%;
    width: 45%;
    height: 180%;
    background: radial-gradient(ellipse, rgba(52,152,219,0.2) 0%, transparent 65%);
    pointer-events: none;
    animation: heroGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes heroGlow {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    font-family: var(--font-heading);
    margin-bottom: 0.6rem;
    letter-spacing: 2px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.25);
    background: linear-gradient(to right, #fff, rgba(255,255,255,0.85));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.05rem;
    opacity: 0.75;
    margin-bottom: 2.2rem;
    letter-spacing: 1px;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 1rem;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem 1.8rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.3s, transform 0.3s;
    min-width: 100px;
}

.hero-stat:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.hero-stat-num {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    line-height: 1;
    background: linear-gradient(135deg, #fff 30%, var(--color-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    font-size: 0.78rem;
    opacity: 0.6;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
}

.hero-stat-divider {
    display: none;
}

/* Hero 响应式 */
@media (max-width: 768px) {
    .hero-section {
        padding: 2.2rem 1.5rem;
        margin-bottom: 1.2rem;
        border-radius: 0;
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }
    .hero-title { font-size: 1.6rem; letter-spacing: 1px; }
    .hero-desc { font-size: 0.9rem; margin-bottom: 1.5rem; }
    .hero-stats { gap: 0.6rem; }
    .hero-stat {
        padding: 0.7rem 1rem;
        min-width: 0;
        flex: 1;
        border-radius: 10px;
    }
    .hero-stat-num { font-size: 1.35rem; }
    .hero-stat-label { font-size: 0.75rem; letter-spacing: 0.5px; }
}

@media (max-width: 480px) {
    .hero-section { padding: 1.8rem 1rem; }
    .hero-title { font-size: 1.35rem; }
    .hero-stat { padding: 0.6rem 0.5rem; }
    .hero-stat-num { font-size: 1.15rem; }
}

/* ========== 返回顶部按钮 ========== */
/* 返回顶部按钮 — 独立模式（非阅读页） */
.back-to-top {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--color-card);
    color: var(--color-text-secondary);
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s, color 0.2s;
    z-index: 90;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 18px rgba(230,126,34,0.3);
}

/* 返回顶部按钮 — FAB 组内模式（阅读页） */
.fab-group .back-to-top {
    position: static;
    width: 46px;
    height: 46px;
    border: none;
    z-index: auto;
    display: none;
    transform: none;
}

.fab-group .back-to-top.visible {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: none;
    animation: fabBtnFadeIn 0.3s ease;
}

@keyframes fabBtnFadeIn {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
    .back-to-top {
        right: 1rem;
        bottom: 1.5rem;
        width: 42px;
        height: 42px;
    }
}

/* 文章摘要 */
.post-summary {
    margin: 0 1.5rem 2rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(230,126,34,0.06), rgba(230,126,34,0.02));
    border-left: 3px solid var(--color-primary);
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}
