/* ===== 全局基础样式 ===== */

/* 基础重置和布局 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    margin: 0;
    color: #333;
    background-color: #fdfdfd;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-wrapper {
    flex-grow: 1;
}

/* 基础排版 */
h1, h2, h3 {
    color: #111;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 文章摘要 */
.article-summary {
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid #eee;
}

.article-summary:last-child {
    border-bottom: none;
}

/* 首页特殊样式 */
.home-intro {
    padding-left: 15px!important;
    padding-top: 10px!important;
}

.home-title {
    color: #230632!important;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}


/* 全局容器 */
.container {
    width: 90%;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* ===== 页眉和导航样式 ===== */
.site-header {
    /* background: linear-gradient(135deg, #4da8cb 0%, #446585 30%, #667eea 70%, #764ba2 100%); */
    background-color: #333E46;
    color: #ecf0f1; /* 浅灰色文字 */
    padding: 0;
    border-bottom: 3px solid transparent;
    /* border-image: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%) 1; */

    /* 新增用于固定顶部的样式 */
    position: sticky; /* 或者使用 position: fixed; */
    top: 0;
    left: 0; /* (如果使用 fixed) */
    right: 0; /* (如果使用 fixed) */
    z-index: 1000; /* 确保它在其他内容之上 */
    width: 100%; /* (如果使用 fixed) 确保它横跨整个视口 */

    /* 添加微妙的阴影效果 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container { /* 用于页眉内部元素的布局 */
    display: flex;
    justify-content: space-between; /* Logo 居左，导航居右 */
    align-items: center;
}

.site-logo {
    font-size: 1.8em;
    font-weight: bold;
    color: #fff; /* Logo 强制白色，覆盖默认 a 标签颜色 */
    text-decoration: none;
}
.nav-container .site-logo:hover {
    text-decoration: none;
    color: #e0e0e0; /* 鼠标悬停时稍暗 */
}

.nav-container a:focus {
    outline: none;
}

/* 导航菜单基础样式 */
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-item {
    position: relative;
    /* margin-left: 1.5em; */
}

.nav-link {
    color: #fff;
    text-decoration: none;
    padding: 0.75em 0.85em;
    display: flex;
    align-items: center;
    gap: 0.25em;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
}

.nav-item.active .nav-link {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.nav-icon {
    font-size: 1.1em;
    display: inline-block;
}

.nav-text {
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 0.8em;
    transition: transform 0.3s ease;
    margin-left: 0.25em;
}

/* 下拉菜单样式 */
.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-content {
    padding: 0;
}

/* 网格布局 - 动态宽度 */
.dropdown-grid {
    display: grid;
}

/* 单列布局 */
.dropdown-grid-1 {
    grid-template-columns: 1fr;
    min-width: 280px;
    max-width: 320px;
}

/* 双列布局 */
.dropdown-grid-2 {
    grid-template-columns: repeat(2, 1fr);
    min-width: 480px;
    max-width: 560px;
}

/* 三列布局 */
.dropdown-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    min-width: 720px;
    max-width: 800px;
}

/* 四列布局（预留） */
.dropdown-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    min-width: 960px;
    max-width: 1040px;
}

.dropdown-column {
    padding: 24px 20px;
    border-right: 1px solid #f0f0f0;
}

.dropdown-column:last-child {
    border-right: none;
}

.dropdown-column-title {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.dropdown-item {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.dropdown-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.dropdown-item-content h5 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    transition: color 0.2s ease;
}

.dropdown-item-content p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.dropdown-item:hover .dropdown-item-content h5 {
    color: #4f46e5;
}

.dropdown-item:hover .dropdown-item-content p {
    color: #374151;
}

/* 导航加载状态 */
.nav-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.nav-loading p {
    margin: 0;
    color: #666;
    font-size: 14px;
    opacity: 0.7;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5em;
    gap: 0.25em;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
    border-radius: 1px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #4da8cb 0%, #446585 30%, #667eea 70%, #764ba2 100%);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .site-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-menu {
        flex-direction: column;
        padding: 1em 0;
    }

    .nav-item {
        margin: 0;
        width: 100%;
    }

    .nav-link {
        padding: 1em 1.5em;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        background: rgba(255, 255, 255, 0.1);
        margin: 0;
        min-width: auto;
        max-width: none;
        border-radius: 0;
    }

    .dropdown-content {
        padding: 0;
    }

    .dropdown-grid,
    .dropdown-grid-1,
    .dropdown-grid-2,
    .dropdown-grid-3,
    .dropdown-grid-4 {
        display: block;
        min-width: auto;
        max-width: none;
    }

    .dropdown-column {
        padding: 0;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .dropdown-column:last-child {
        border-bottom: none;
    }

    .dropdown-column-title {
        padding: 1em 1.5em 0.5em;
        margin-bottom: 0;
        color: #fff;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 12px;
    }

    .dropdown-item {
        padding: 0.75em 2em;
        border-radius: 0;
        margin-bottom: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: none;
    }

    .dropdown-item-content h5,
    .dropdown-item-content p {
        color: #fff;
    }

    .dropdown-item:hover .dropdown-item-content h5,
    .dropdown-item:hover .dropdown-item-content p {
        color: #fff;
    }
}


/* ===== 页脚样式 ===== */
.site-footer {
    /* background: linear-gradient(135deg, #764ba2 0%, #667eea 30%, #758a9f 70%, #86a7d1 100%); */
    background-color: #000e18cc;
    color: #bdc3c7; /* 页脚文字颜色 */
    padding: 2em 0;
    text-align: center;
    margin-top: 2rem; /* 与主内容区域的间距 */
    border-top: 3px solid transparent;
    /* border-image: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%) 1; */
    font-size: 0.9em;

    /* 添加微妙的阴影效果 */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.site-footer p {
    margin: 0;
}

/* 主内容区域的基本边距 */
.main-content {
    /* padding-top: 1.5rem; */
    padding-bottom: 1.5rem;
}

/* ===== 文章列表和卡片样式 ===== */
.section-posts-list .list-header,
.term-posts-list .list-header { /* (term-posts-list 用于阶段五) */
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}
.section-posts-list .list-header h1,
.term-posts-list .list-header h1 {
    margin-top: 0;
}
.section-description,
.term-description { /* (term-description 用于阶段五) */
    font-size: 1.1em;
    color: #555;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.post-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1rem;
    display: flex;
    flex-direction: column; /* 重要：使卡片内部元素垂直排列 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    /* overflow: hidden; */ /* 如果内容确实需要隐藏而不是截断，可以考虑这个，但通常文本截断更好 */
}

.post-card-title {
    font-size: 1.5em; 
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0.5rem;
    line-height: 1.3; /* 控制标题行高 */
}
.post-card-title a {
    color: #10064c;
}

.post-card-meta {
    font-size: 0.85em;
    color: #777;
    /* margin-bottom: 1rem; */
    flex-shrink: 0; /* 防止元信息在空间不足时被压缩 */
}

.post-card-summary {
    margin: 0.5rem 0;
    color: #444;
    font-size: 0.95em;
    flex-grow: 0; /* 让摘要区域占据多余的垂直空间 */

    /* 多行文本截断关键样式 */
    display: -webkit-box; /*  将对象作为弹性伸缩盒子模型显示  */
    -webkit-line-clamp: 3; /*  限制在一个块元素显示的文本的行数 */
    line-clamp: 3; 
    -webkit-box-orient: vertical; /*  设置或检索伸缩盒对象的子元素的排列方式  */
    overflow: hidden; /*  文本溢出限定的宽度就隐藏内容 */
    text-overflow: ellipsis; /*  文本溢出隐藏部分显示省略号 */
    height: 5em; 
}

.read-more-link {
    font-size: 0.9em;
    font-weight: bold;
    color: var(--primary-color, #007bff);
    align-self: flex-start; /* 链接在卡片底部左对齐 */
    margin-top: auto; /* 将“阅读更多”推到底部，如果摘要内容不足3行 */
    flex-shrink: 0; /* 防止链接被压缩 */
}



/* ===== 单篇文章页样式 ===== */
.single-post .single-post-header {
    /* margin-bottom: 1.5rem; */
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}
.single-post .single-post-header h1 {
    font-size: 2.2em; /* 更大的标题 */
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
}
/* 文章元信息样式 */
.post-meta {
    font-size: 0.9em;
    color: #666;
    padding-bottom: 0.2rem;
    margin-bottom: 0;
}

.single-post .post-meta {
    border-top: 1px solid #eee;
    padding-top: 5px;
}

.single-post .single-post-content {
    font-size: 1.05em; /* 内容区域稍大字体 */
    line-height: 1.7;
}
.single-post .single-post-content h2 { margin-top: 1.5rem; margin-bottom: 1rem; padding-bottom: 0; border-bottom: 1px double #c3e0e2; color: #10064c;}
.single-post .single-post-content h3 { margin-top: 1.2em; margin-bottom: 0.2rem; border-bottom: 1px dashed #ccd5e1; color: #742f87;}
.single-post .single-post-content h4 { margin-top: 1.2em; margin-bottom: 0; color: #202ab6;}
.single-post .single-post-content p { margin: 0.3em 0; }
.single-post .single-post-content ul,
.single-post .single-post-content ol { margin-bottom: 1.2em; padding-left: 1.8em; }
.single-post .single-post-content blockquote {
    border-left: 3px solid #007bff;
    padding-left: 1em;
    margin-left: 0;
    font-style: italic;
    color: #555;
}
/* 代码块复制功能样式 */
.codeblock-wrapper {
    position: relative;
    margin: 1.5em 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d6d0bf;
    background-color: #eee8d5;
    transition: all 0.2s ease;
}

.codeblock-wrapper:hover {
    border-color: #93a1a1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.codeblock-wrapper:hover .copy-code-button {
    opacity: 1;
    transform: translateY(0);
}

.codeblock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #fdf6e3 0%, #eee8d5 100%);
    border-bottom: 1px solid #d6d0bf;
    font-size: 0.875rem;
}

.codeblock-language {
    font-weight: 600;
    color: #586e75;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.copy-code-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 6px;
    color: #5f6368;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    opacity: 0.7;
    transform: translateY(2px);
}

.copy-code-button:hover {
    background: #f8f9fa;
    border-color: #5f6368;
    color: #202124;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.copy-code-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.copy-code-button.copied {
    background: #e8f5e8;
    border-color: #34a853;
    color: #137333;
}

.copy-icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.copy-code-button:hover .copy-icon {
    transform: scale(1.1);
}

.codeblock-content {
    position: relative;
}

.codeblock-content pre {
    margin: 0 !important;
    padding: 1.25rem !important;
    border: none !important;
    border-radius: 0 !important;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.codeblock-content code {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* 确保语法高亮的颜色不被覆盖 - 移除强制白色背景，使用主题背景色 */

.codeblock-content .chroma code {
    color: inherit;
    background: transparent !important;
}

/* 保持原有的行内代码样式 */
.single-post .single-post-content code:not(.codeblock-content code) { /* 行内代码 */
    background-color: #f0f0f0;
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-size: 0.9em;
}

/* 兼容性：保持原有pre样式作为后备 */
.single-post .single-post-content pre:not(.codeblock-content pre) {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    padding: 1em;
    overflow-x: auto; /* 代码块横向滚动 */
    border-radius: 4px;
}



/* 深色主题支持（可选） */
@media (prefers-color-scheme: dark) {
    .codeblock-wrapper {
        background-color: #002b36;
        border-color: #073642;
    }

    .codeblock-header {
        background: linear-gradient(135deg, #073642 0%, #002b36 100%);
        border-bottom-color: #073642;
    }

    .codeblock-language {
        color: #839496;
    }

    .copy-code-button {
        background: #073642;
        border-color: #586e75;
        color: #839496;
    }

    .copy-code-button:hover {
        background: #586e75;
        border-color: #93a1a1;
        color: #fdf6e3;
    }

    .codeblock-content pre {
        background: #002b36 !important;
        color: #839496 !important;
    }
}
.single-post .single-post-content img { max-width: 100%; height: auto; border-radius: 4px; display: block; margin: 0.5em auto; }


/* ===== 分页样式 ===== */
.pagination {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.pagination-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center; /* 页码居中 */
    align-items: center;
}
.pagination-list li {
    margin: 0 0.25rem; /* 页码间距 */
}
.pagination-link,
.pagination-previous,
.pagination-next,
.pagination-ellipsis {
    display: inline-block;
    padding: 0.6em 1em; /* 页码内边距 */
    border: 1px solid #dee2e6; /* 边框颜色 */
    color: var(--primary-color, #007bff);
    border-radius: 0.25rem; /* 圆角 */
    min-width: 2.75em; /* 最小宽度，使方形页码好看 */
    text-align: center;
    line-height: 1.25; /* 确保数字垂直居中 */
    font-size: 0.9em;
}
.pagination-link:hover,
.pagination-previous:not([aria-disabled="true"]):hover,
.pagination-next:not([aria-disabled="true"]):hover {
    background-color: #e9ecef; /* 悬停背景色 */
    border-color: #adb5bd;
    text-decoration: none;
}
.pagination-link.is-current {
    background-color: var(--primary-color, #007bff);
    color: #fff;
    border-color: var(--primary-color, #007bff);
    font-weight: bold;
    z-index: 1; /* 确保当前页码在最上层 (如果边框重叠) */
}
.pagination-previous[aria-disabled="true"],
.pagination-next[aria-disabled="true"] {
    color: #6c757d; /* 禁用状态颜色 */
    cursor: not-allowed;
    background-color: #fff;
    border-color: #dee2e6;
}
.pagination-ellipsis {
    border: none;
    padding: 0.6em 0.4em; /* 调整省略号的间距 */
    color: #6c757d;
}





.article-list li.article-summary-item {
    margin-bottom: 1.5rem;
    padding-bottom: 6rem;
    border-bottom: 1px dashed #1f0e44; /* 使用虚线分隔 */

    font-size: 0.95em;
    line-height: 1.6; /* 确保行高一致，方便计算截断高度 */

    /* 多行文本截断关键样式 */
    overflow: hidden;
    text-overflow: ellipsis;

    /* 这个值需要根据你的实际字体和行高进行仔细调试 */
    /* height: 8.5em;  */
    /* 或者使用 max-height，如果希望内容少于3行时元素不高耸 */
    max-height: 15em;
}
.article-list li.article-summary-item:last-child {
    border-bottom: none; /* 最后一个列表项通常不需要底部分隔线 */
}

/* 文章页面三栏布局 */
.article-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 30px;
    align-items: flex-start;
}

/* 左侧边栏 */
.sidebar-left {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 100px; /* 考虑到固定头部的高度 */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 主要内容区域 */
.article-layout .single-post {
    flex: 1;
    min-width: 0; /* 防止 flex 项目溢出 */
    max-width: 800px;
}

/* 右侧目录 */
.sidebar-right {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 侧边栏内容样式 */
.sidebar-content,
.toc-content {
    font-size: 0.9em;
}

.sidebar-title,
.toc-title {
    font-size: 1.1em;
    font-weight: bold;
    margin: 0 0 15px 0;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section-title {
    font-size: 1em;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #555;
}

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

.sidebar-nav-item {
    margin-bottom: 5px;
}

.sidebar-nav-link {
    display: block;
    padding: 6px 12px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.9em;
}

.sidebar-nav-link:hover {
    background-color: #e9ecef;
    color: #007bff;
    text-decoration: none;
}

.sidebar-nav-item.active .sidebar-nav-link {
    background-color: #007bff93;
    color: white;
    font-weight: 500;
}

/* 目录样式 */
.toc-nav {
    line-height: 1.6;
}

.toc-nav ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc-nav ul ul {
    padding-left: 20px;
    margin-top: 5px;
}

.toc-nav li {
    margin-bottom: 5px;
}

.toc-nav a {
    display: block;
    padding: 4px 8px;
    color: #666;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.2s ease;
    font-size: 0.85em;
}

.toc-nav a:hover {
    background-color: #e9ecef;
    color: #007bff;
    text-decoration: none;
}

.toc-nav a.active {
    background-color: #007bff;
    color: white;
    font-weight: 500;
}

.toc-empty {
    color: #999;
    font-style: italic;
    margin: 0;
}

.toc-actions {
    margin-bottom: 20px;
    padding-top: 5px;
    border-top: 1px solid #e9ecef;
}

.back-to-top {
    width: 100%;
    padding: 8px 12px;
    background-color: #778ea7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.2s ease;
}

.back-to-top:hover {
    background-color: #0056b3;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .article-layout {
        max-width: 1000px;
    }

    .sidebar-left,
    .sidebar-right {
        width: 200px;
    }
}

@media (max-width: 992px) {
    .article-layout {
        flex-direction: column;
        max-width: 800px;
    }

    .sidebar-left,
    .sidebar-right {
        position: static;
        width: 100%;
        max-height: none;
        margin-bottom: 20px;
    }

    .sidebar-left {
        order: -1; /* 在移动端将侧边栏移到顶部 */
    }

    .sidebar-right {
        order: 1; /* 目录在内容后面 */
    }
}



/* ===== 滚动条样式 ===== */

/* 侧边栏滚动条样式 - 更细，平时隐藏 */
.home-sidebar-left,
.home-sidebar-right,
.home-sidebar,
.sidebar-left,
.sidebar-right {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 0.3s ease;
}

.home-sidebar-left:hover,
.home-sidebar-right:hover,
.home-sidebar:hover,
.sidebar-left:hover,
.sidebar-right:hover {
    scrollbar-color: rgba(102, 126, 234, 0.6) transparent;
}

/* Webkit滚动条样式 */
.home-sidebar-left::-webkit-scrollbar,
.home-sidebar-right::-webkit-scrollbar,
.home-sidebar::-webkit-scrollbar,
.sidebar-left::-webkit-scrollbar,
.sidebar-right::-webkit-scrollbar {
    width: 4px;
}

.home-sidebar-left::-webkit-scrollbar-track,
.home-sidebar-right::-webkit-scrollbar-track,
.home-sidebar::-webkit-scrollbar-track,
.sidebar-left::-webkit-scrollbar-track,
.sidebar-right::-webkit-scrollbar-track {
    background: transparent;
}

.home-sidebar-left::-webkit-scrollbar-thumb,
.home-sidebar-right::-webkit-scrollbar-thumb,
.home-sidebar::-webkit-scrollbar-thumb,
.sidebar-left::-webkit-scrollbar-thumb,
.sidebar-right::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.home-sidebar-left:hover::-webkit-scrollbar-thumb,
.home-sidebar-right:hover::-webkit-scrollbar-thumb,
.home-sidebar:hover::-webkit-scrollbar-thumb,
.sidebar-left:hover::-webkit-scrollbar-thumb,
.sidebar-right:hover::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.6);
}

.home-sidebar-left::-webkit-scrollbar-thumb:hover,
.home-sidebar-right::-webkit-scrollbar-thumb:hover,
.home-sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-left::-webkit-scrollbar-thumb:hover,
.sidebar-right::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.8);
}

/* 隐藏滚动条样式 */
.tab-header,
.codetab-header {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-header::-webkit-scrollbar,
.codetab-header::-webkit-scrollbar {
    display: none;
}

/* ===== 首页布局样式 ===== */
.home-layout {
    padding: 2px 0;
}

.home-header {
    margin-bottom: 10px;
}

.home-intro h1 {
    font-size: 2em;
    color: #333;
    margin-bottom: 8px;
}

.home-intro a:hover {
    text-decoration: none;
    color: #0056b3!important;
}

.home-description {
    font-size: 1.05em;
    color: #666;
    margin: 0;
}

.home-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.home-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: flex-start;
}

/* 首页侧边栏 */
.home-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.sidebar-section h3 {
    font-size: 0.9em;
    color: #666;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

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

.directories-list li,
.archive-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.directories-list li:last-child,
.archive-list li:last-child {
    border-bottom: none;
}

.directories-list a,
.archive-list a {
    color: #555;
    text-decoration: none;
    font-size: 0.9em;
}

.directories-list a:hover,
.archive-list a:hover {
    color: #667eea;
}

.count {
    background-color: #f8f9fa;
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
}

.profile-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.profile-avatar {
    margin-bottom: 20px;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.avatar-icon {
    font-size: 2em;
    color: white;
}

.profile-name {
    font-size: 1.4em;
    font-weight: bold;
    margin: 15px 0 5px 0;
    color: #333;
}

.profile-title {
    color: #666;
    margin: 0 0 5px 0;
    font-size: 0.95em;
}

.profile-location {
    color: #888;
    margin: 0 0 20px 0;
    font-size: 0.9em;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.stat-item {
    text-align: center;
}

.stat-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 8px;
    position: relative;
    overflow: hidden;
}

.stat-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.stat-link:hover::before {
    opacity: 1;
}

.stat-link:hover {
    background: rgba(102, 126, 234, 0.08);
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.stat-number {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.stat-link:hover .stat-number {
    color: #1a252f;
}

.stat-label {
    display: block;
    font-size: 0.75em;
    color: #667eea;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.stat-link:hover .stat-label {
    color: #5a67d8;
}

.follow-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    margin: 15px 0 25px 0;
    transition: transform 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.follow-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

.profile-categories {
    text-align: left;
    margin-top: 25px;
}

.profile-categories h3 {
    font-size: 0.9em;
    color: #666;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

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

.profile-categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.profile-categories li:last-child {
    border-bottom: none;
}

.profile-categories a {
    color: #555;
    text-decoration: none;
    font-size: 0.9em;
}

.profile-categories a:hover {
    color: #007bff;
}

.category-count {
    background-color: #f8f9fa;
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
}

/* 首页主内容区域 */
.home-main {
    min-width: 0;
}

.featured-posts .starred-posts-title {
    font-size: 1.4em;
    color: #333;
    /* margin-bottom: 15px; */
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 5px;
}

.view-all {
    text-align: center;
    margin-top: 30px;
}

.featured-post {
    background-color: #fff;
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 480px; /* 统一最小高度 */
}

.featured-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.featured-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-post:hover::before {
    opacity: 1;
}

.post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2em;
}

.post-image-placeholder::before {
    content: "📷";
    font-size: 2em;
}

.post-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1; /* 占据剩余空间 */
}

/* 首页文章元信息特殊样式 */
.featured-post .post-meta {
    font-size: 0.8em;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 0.5px dashed #b4abab;
}

.featured-post .post-meta span,
.post-meta span {
    margin-right: 15px;
}

.star-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #333;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
}

.post-title {
    margin: 0 0 15px 0;
    font-size: 1.4em;
    line-height: 1.3;
}

.post-title a {
    color: #333;
    text-decoration: none;
}

.post-title a:hover {
    color: #007bff;
}

.post-summary {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95em;
    flex: 1; /* 占据剩余空间 */

    /* 限制显示行数 */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 最多显示4行 */
    line-clamp: 3; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.read-more {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto; /* 推到底部 */
    align-self: flex-start; /* 左对齐 */
}

.read-more:hover {
    text-decoration: underline;
}

/* 右侧边栏 */
.home-sidebar-right {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.recent-posts,
.site-archive {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.recent-posts::before,
.site-archive::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.recent-posts h3,
.site-archive h3 {
    font-size: 0.9em;
    color: #666;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.recent-post-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
}

.recent-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-post-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8em;
}

.recent-post-image-placeholder::before {
    content: "📄";
    font-size: 1.5em;
}

.recent-post-content {
    flex: 1;
    min-width: 0;
}

.recent-post-date {
    font-size: 0.75em;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 5px;
}

.recent-post-content h4 {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.4;
}

.recent-post-content h4 a {
    color: #333;
    text-decoration: none;
}

.recent-post-content h4 a:hover {
    color: #007bff;
}

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

.site-archive li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

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

.site-archive a {
    color: #555;
    text-decoration: none;
    font-size: 0.9em;
}

.site-archive a:hover {
    color: #007bff;
}

.archive-count {
    background-color: #f8f9fa;
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
}

/* 首页响应式设计 */
@media (max-width: 1200px) {
    .home-layout {
        max-width: 1000px;
    }

    .home-sidebar-left,
    .home-sidebar-right {
        width: 240px;
    }
}

@media (max-width: 992px) {
    .home-layout {
        flex-direction: column;
        max-width: 800px;
        gap: 20px;
    }

    .home-sidebar-left,
    .home-sidebar-right {
        position: static;
        width: 100%;
        max-height: none;
        margin-bottom: 20px;
    }

    .home-sidebar-left {
        order: -1;
    }

    .home-sidebar-right {
        order: 1;
    }

    .home-main-content {
        max-width: none;
    }
}



@media (max-width: 480px) {
    .home-layout {
        padding: 10px;
    }

    .profile-card,
    .recent-posts,
    .site-archive {
        padding: 15px;
    }

    .post-content {
        padding: 15px;
    }

    .avatar-placeholder {
        width: 60px;
        height: 60px;
    }

    .avatar-icon {
        font-size: 1.5em;
    }

    .profile-name {
        font-size: 1.2em;
    }
}

/* ===== Posts页面布局样式 ===== */
.posts-layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
    align-items: flex-start;
}

/* Posts页面左侧筛选面板 */
.posts-sidebar-left {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Posts页面主要内容区域 */
.posts-main-content {
    flex: 1;
    min-width: 0;
    max-width: none;
}

.posts-header {
    margin-bottom: 30px;
    text-align: center;
}

.posts-header h1 {
    font-size: 2.5em;
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    color: #666;
    font-size: 1.1em;
    line-height: 1.6;
}

.posts-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.no-posts {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}



/* 筛选面板样式 */
.filter-panel {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 16px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    position: relative;
}

.filter-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* 筛选标签页 */
.filter-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin-top: 4px;
}

.filter-tab {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.85em;
    color: #666;
}

.filter-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.filter-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 500;
}

.tab-icon {
    font-size: 1.2em;
}

.tab-text {
    font-size: 0.8em;
    font-weight: 500;
}

/* 筛选内容面板 */
.filter-content {
    display: none;
    padding: 20px;
}

.filter-content.active {
    display: block;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 时间线筛选按钮 - 垂直布局 */
.timeline-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-btn {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85em;
    color: #666;
}

.timeline-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.timeline-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}



/* 筛选项目 */
.filter-items {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.filter-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 6px;
    border: 1px solid #e9ecef;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.filter-item:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.filter-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.item-name {
    font-size: 0.9em;
    font-weight: 500;
}

.item-count {
    background: rgba(0,0,0,0.1);
    color: inherit;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.filter-item.active .item-count {
    background: rgba(255,255,255,0.2);
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 8px;
}

#search-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9em;
    transition: border-color 0.2s ease;
}

#search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
    padding: 10px 12px;
    border: 1px solid #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 筛选操作 */
.filter-actions {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.clear-filters-btn {
    width: 100%;
    padding: 10px;
    border: 1px solid #dc3545;
    background: white;
    color: #dc3545;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.clear-filters-btn:hover {
    background: #dc3545;
    color: white;
}

/* Posts页面响应式设计 */
@media (max-width: 1200px) {
    .posts-layout {
        max-width: 1000px;
    }

    .posts-sidebar-left {
        width: 240px;
    }
}

@media (max-width: 992px) {
    .posts-layout {
        flex-direction: column;
        max-width: 800px;
        gap: 20px;
    }

    .posts-sidebar-left {
        position: static;
        width: 100%;
        max-height: none;
        margin-bottom: 20px;
        order: -1;
    }

    .posts-main-content {
        max-width: none;
    }

    .posts-header h1 {
        font-size: 2em;
    }
}



@media (max-width: 480px) {
    .posts-layout {
        padding: 10px;
    }

    .posts-sidebar-left {
        padding: 15px;
    }

    .filter-panel {
        border-radius: 12px;
    }

    .posts-header h1 {
        font-size: 1.5em;
    }
}



/* 面包屑导航 */
.breadcrumb {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

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

.breadcrumb .separator {
    margin: 0 8px;
    color: #ccc;
}

.breadcrumb .current {
    color: #333;
    font-weight: 500;
}

/* Section布局 */
.section-layout {
    padding: 40px 0;
}

.section-header {
    margin-bottom: 10px;
}

/* 头部行布局 */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0;
    border-bottom: 1px solid #e9ecef;
}

.section-title {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 15px;
}

.section-description {
    font-size: 1.1em;
    color: #666;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 20px;
}

.section-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.section-stats .stat-item {
    font-size: 0.9em;
    color: #888;
}

.section-stats strong {
    color: #667eea;
    font-weight: 600;
}

/* 子分类网格 */
.subsections {
    margin-bottom: 40px;
}

.subsections h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.subsections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.subsection-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    overflow: hidden;
}

.subsection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.subsection-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.subsection-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subsection-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.subsection-card:hover .subsection-image img {
    transform: scale(1.05);
}

.default-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.default-icon {
    font-size: 3em;
    opacity: 0.6;
}

.subsection-content {
    padding: 20px;
}

.subsection-title {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 8px;
}

.subsection-count {
    font-size: 0.9em;
    color: #667eea;
    margin-bottom: 10px;
}

.subsection-summary {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

/* 文章网格 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.section-posts .article-list {
    font-size: 1.5em;
    color: #333;
    /* margin-bottom: 20px; */
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    padding-left: 5px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 分类法模板样式 */
.taxonomy-layout {
    padding: 40px 0;
}

.taxonomy-header {
    margin-bottom: 40px;
}

.taxonomy-title {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 15px;
}

.taxonomy-description {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 20px;
}

.taxonomy-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.taxonomy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.taxonomy-item {
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.taxonomy-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.taxonomy-link {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.taxonomy-name {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 8px;
}

.taxonomy-count {
    font-size: 0.9em;
    color: #667eea;
    margin-bottom: 10px;
}

.taxonomy-summary {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

/* 词条模板样式 */
.term-layout {
    padding: 40px 0;
}

.term-header {
    margin-bottom: 40px;
}

.term-title {
    font-size: 2.2em;
    color: #333;
    margin-bottom: 15px;
}

.term-description {
    font-size: 1.1em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.term-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    font-size: 0.9em;
    color: #888;
}

.term-content {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
}

.term-posts {
    width: 100%;
}

.term-sidebar {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
}

.related-terms h3 {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 15px;
}

.term-list {
    list-style: none;
    padding: 0;
}

.term-list li {
    margin-bottom: 8px;
}

.term-list a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9em;
}

.term-list a:hover {
    text-decoration: underline;
}

.term-list .count {
    color: #888;
    font-size: 0.8em;
}

/* 单页文章样式 */
.single-layout {
    padding: 40px 0;
}

.post {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 40px;
}

.post-title {
    font-size: 2.2em;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
}

/* 文章元信息子元素样式 */
.post-meta > div {
    margin-bottom: 8px;
}

.post-meta > div:last-child {
    margin-bottom: 0;
}

/* 文章元信息时间样式 */
.post-meta time {
    color: #667eea;
}

.post-meta .last-updated {
    color: #f59e0b;
    font-style: italic;
}

.post-meta .last-updated::before {
    content: "🔄 ";
    margin-right: 2px;
}

.meta-label {
    font-weight: 500;
    color: #333;
}

.category-tag, .tag {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.category-tag:hover, .tag:hover {
    text-decoration: underline;
}

.post-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.post-content {
    font-size: 1.1em;
    line-height: 1.7;
    color: #333;
    margin-bottom: 40px;
}

.post-footer {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.post-nav-prev, .post-nav-next {
    display: block;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.post-nav-prev:hover, .post-nav-next:hover {
    background: #e9ecef;
}

.post-nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 0.8em;
    color: #888;
    margin-bottom: 5px;
}

.nav-title {
    display: block;
    font-weight: 500;
    color: #333;
}

.post-related h3 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 15px;
}

.related-posts {
    list-style: none;
    padding: 0;
}

.related-posts li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.related-posts a {
    color: #667eea;
    text-decoration: none;
    flex: 1;
}

.related-posts a:hover {
    text-decoration: underline;
}

.related-posts time {
    font-size: 0.8em;
    color: #888;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .term-content {
        grid-template-columns: 1fr;
    }

    .term-sidebar {
        order: -1;
    }

    .subsections-grid {
        grid-template-columns: 1fr;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .section-stats, .taxonomy-stats {
        justify-content: flex-start;
    }
}




/* 行内代码块样式 */
code {
    color: #ce6060;
    font: italic bold 16px/1.5 "Arial", sans-serif;
}

/* 代码块样式 */
div.highlight pre code {
    font-family: Menlo, Consolas, monospace, "Courier New";
    font-style: normal;
    font-weight: 400;
    font-size: 1rem; /* 确保代码块的字体大小 */
}

/* ===== 表格样式 ===== */
/* 通用表格样式 */
table,
.single-post .single-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
}

/* 表头样式 */
table thead,
.single-post .single-post-content table thead {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
}

table thead th,
.single-post .single-post-content table thead th {
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 16px 20px;
    font-size: 0.95em;
    letter-spacing: 0.5px;
    border: none;
    position: relative;
}

table thead th:not(:last-child)::after,
.single-post .single-post-content table thead th:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* 表格主体样式 */
table tbody tr,
.single-post .single-post-content table tbody tr {
    transition: background-color 0.2s ease;
}

table tbody tr:nth-child(even),
.single-post .single-post-content table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

table tbody tr:hover,
.single-post .single-post-content table tbody tr:hover {
    background-color: #e3f2fd;
}

/* 表格单元格样式 */
table td,
.single-post .single-post-content table td {
    padding: 14px 20px;
    border-bottom: 1px solid #e1e8ed;
    color: #333;
    font-size: 0.9em;
    line-height: 1.5;
}

table tbody tr:last-child td,
.single-post .single-post-content table tbody tr:last-child td {
    border-bottom: none;
}

/* 表格单元格垂直分隔线 */
table td:not(:last-child),
.single-post .single-post-content table td:not(:last-child) {
    border-right: 1px solid #f0f0f0;
}



@media (max-width: 480px) {
    .single-post .single-post-content table {
        font-size: 0.8em;
    }

    .single-post .single-post-content table thead th,
    .single-post .single-post-content table td {
        padding: 10px 12px;
    }
}



/* ===== HintBox 提示框样式 ===== */
.hintbox {
    margin: 1.5em 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.hintbox:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hintbox-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    font-weight: 600;
    color: white;
    position: relative;
    gap: 10px;
}

.hintbox-icon {
    font-size: 1.1em;
    flex-shrink: 0;
}

.hintbox-title {
    flex: 1;
    font-size: 0.95em;
    letter-spacing: 0.5px;
}

.hintbox-content {
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    line-height: 1.6;
}

.hintbox-content p:first-child {
    margin-top: 0;
}

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

/* Important 类型 - 紫色渐变 */
.hintbox-important .hintbox-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #9333ea 100%);
}

.hintbox-important {
    border-left: 4px solid #8b5cf6;
}

/* Info 类型 - 蓝色渐变 */
.hintbox-info .hintbox-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
}

.hintbox-info {
    border-left: 4px solid #3b82f6;
}

/* Note 类型 - 灰色渐变 */
.hintbox-note .hintbox-header {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #374151 100%);
}

.hintbox-note {
    border-left: 4px solid #6b7280;
}

/* Tips 类型 - 绿色渐变 */
.hintbox-tips .hintbox-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
}

.hintbox-tips {
    border-left: 4px solid #10b981;
}

/* Warning 类型 - 橙色渐变 */
.hintbox-warning .hintbox-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
}

.hintbox-warning {
    border-left: 4px solid #f59e0b;
}

/* Caution 类型 - 红色渐变 */
.hintbox-caution .hintbox-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
}

.hintbox-caution {
    border-left: 4px solid #ef4444;
}



/* ===== Tab 标签页样式 ===== */
.tab-container {
    margin: 1.5em 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
    background: white;
}

.tab-header {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e8ed;
    overflow-x: auto;
}

.tab-button {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tab-button:hover {
    background: rgba(102, 126, 234, 0.05);
    color: #333;
}

.tab-button.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.tab-content {
    position: relative;
    min-height: 100px;
}

.tab-panel {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== CodeTab 代码标签页样式 ===== */
.codetab-container {
    margin: 1.5em 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #d6d0bf;
    background: #eee8d5;
}

.codetab-header {
    display: flex;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #d6d0bf;
    overflow-x: auto;
}

.codetab-button {
    flex: 1;
    min-width: 80px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #586e75;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.codetab-button:hover {
    background: rgba(88, 110, 117, 0.1);
    color: #073642;
}

.codetab-button.active {
    background: #eee8d5;
    color: #073642;
    border-bottom-color: #586e75;
    font-weight: 600;
}

.codetab-content {
    position: relative;
    background: #eee8d5;
}

.codetab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.codetab-panel.active {
    display: block;
}

/* CodeTab 内的代码块样式调整 */
.codetab-panel .codeblock-wrapper {
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.codetab-panel .codeblock-header {
    display: none;
}

.codetab-panel .codeblock-content {
    background: #eee8d5;
}

.codetab-panel .codeblock-content pre {
    margin: 0;
    border-radius: 0;
    background: #eee8d5 !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tab-button, .codetab-button {
        min-width: 80px;
        padding: 10px 12px;
        font-size: 0.8em;
    }

    .tab-panel {
        padding: 16px;
    }

    .tab-container, .codetab-container {
        margin: 1em 0;
        border-radius: 6px;
    }
}



/* ===== 响应式设计 ===== */

/* 768px及以下设备 */
@media (max-width: 768px) {
    /* 代码块响应式 */
    .codeblock-header {
        padding: 0.5rem 0.75rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .copy-code-button {
        padding: 0.375rem 0.5rem;
        font-size: 0.7rem;
        gap: 0.25rem;
    }

    .copy-icon {
        width: 14px;
        height: 14px;
    }

    .codeblock-content pre {
        padding: 1rem !important;
        font-size: 0.8rem;
    }

    .codeblock-language {
        font-size: 0.7rem;
    }

    /* 文章布局响应式 */
    .article-layout {
        padding: 0 15px;
        gap: 20px;
    }

    .sidebar-left,
    .sidebar-right {
        padding: 15px;
    }

    /* 首页布局响应式 */
    .home-layout {
        padding: 15px;
        gap: 15px;
    }

    .profile-card,
    .recent-posts,
    .site-archive {
        padding: 20px;
    }

    .featured-post {
        margin-bottom: 20px;
    }

    .post-content {
        padding: 20px;
    }

    .post-title {
        font-size: 1.2em;
    }

    .profile-stats {
        flex-direction: column;
        gap: 10px;
    }

    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
    }

    .stat-number,
    .stat-label {
        display: inline;
    }

    /* Posts页面响应式 */
    .posts-layout {
        padding: 15px;
        gap: 15px;
    }

    .posts-sidebar-left {
        padding: 20px;
    }

    .filter-tabs {
        flex-direction: column;
    }

    .filter-tab {
        flex-direction: row;
        justify-content: center;
        padding: 10px;
    }

    .tab-icon {
        margin-right: 8px;
    }

    .posts-header h1 {
        font-size: 1.8em;
    }

    /* 统计信息响应式 */
    .section-stats,
    .taxonomy-stats,
    .term-stats {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    /* 表格响应式 */
    .single-post .single-post-content table {
        font-size: 0.85em;
        margin: 1em 0;
    }

    .single-post .single-post-content table th,
    .single-post .single-post-content table td {
        padding: 8px 6px;
    }

    /* HintBox响应式 */
    .hintbox {
        margin: 1em 0;
        border-radius: 8px;
    }

    .hintbox-header {
        padding: 10px 12px;
        font-size: 0.85em;
    }

    .hintbox-content {
        padding: 12px;
        font-size: 0.9em;
    }

    /* 标签页响应式 */
    .tab-button,
    .codetab-button {
        min-width: 80px;
        padding: 10px 12px;
        font-size: 0.8em;
    }

    .tab-content,
    .codetab-content {
        border-radius: 0 0 6px 6px;
    }

    /* 文章元信息响应式 */
    .post-meta {
        flex-direction: column;
        gap: 4px;
    }

    .post-meta span {
        display: block;
    }
}