@charset "utf-8";

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

body 
{
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.search-container input,
textarea 
{
    user-select: text; /* 允许搜索框和文本区域选择 */
}

/* 主内容包裹容器 */
.main-wrapper 
{
    display: flex;
    align-items: flex-start;
}

/* 容器 */
.container 
{
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 主内容容器，确保紧贴侧边栏 */
main .container 
{
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* 主内容区域 */
.content 
{
    padding: 2px 10px 0px 10px;
    background: white;
    /* 移除 min-height，让内容高度自适应 */
}

/* doc 模式下主内容区域调整 */
body.doc-mode .content 
{
    padding: 2px 20px 20px 20px; /* PC 模式下增加 padding-bottom，调整间距一 */
}

/* doc 模式下分页区域调整 */
body.doc-mode .pagination 
{
    margin-top: 0px; /* PC 模式下增加 margin-top，调整间距一 */
    margin-bottom: 0px;
    font-size: 18px;
}

/* 问题 3：为 blog 模式减小顶部间距 */
body.blog-mode .content 
{
    padding-top: 0px;
}

/* 调整 blog 模式间距：为 blog 模式调整底部间距 */
body.blog-mode .content 
{
    padding-bottom: 10px;
}

/* 调整 blog 模式 min-height：进一步优化 blog 模式下的空白 */
body.blog-mode .content 
{
    min-height: calc(100vh - 600px); /* 针对 blog 模式，进一步减小空白 */
}

/* 调整 blog 模式间距：确保分页顶部无额外间距 */
body.blog-mode .pagination 
{
    margin-top: 0;
}

/* 横幅广告容器 */
.banner-container 
{
    width: 100%;
    margin: 0;
    margin-top: 10px;
    padding: 0;
    background: white;
}

/* 横幅广告 */
.banner 
{
    margin-left: 10px;
    margin-bottom: 5px;
    max-width: 900px;
}

/* 横幅广告图片 - 选项 1（推荐）：限制最大宽度 */
.banner img 
{
    max-width: 900px;
    width: 100%;
    height: auto;
    display: block;
    margin-left: 0;
}

/* 横幅广告图片 - 选项 2（按原始宽度，注释中） */
/*
.banner img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    margin-left: 0;
}
*/

/* 顶部 */
header 
{
    background: #003087;
    color: white;
    position: fixed;
    width: 100%;
    top: 0;
    height: 80px;
    z-index: 1000;
}

header .container 
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    max-width: none;
}

.logo 
{
    display: flex;
    align-items: center;
    margin: 0;
    margin-left: 15px;
    padding: 0;
}

.logo a 
{
    color: white;
    text-decoration: none;
    font-size: 24px;
    margin: 0;
    padding: 0;
}

.logo img 
{
    display: block;
    vertical-align: middle;
    margin: 0 auto;
    padding: 0;
}

.top-menu 
{
    margin-right: 25px;
}

.top-menu ul 
{
    display: flex;
    list-style: none;
    flex-shrink: 0;
}

.top-menu li 
{
    margin-left: 20px;
}

.top-menu a 
{
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.top-menu a:hover 
{
    color: gold;
}

/* 手机模式三横菜单和搜索图标 */
.mobile-menu-toggle 
{
    display: none;
    cursor: pointer;
}

.menu-icon 
{
    font-size: 20px;
    color: white;
}

.search-icon 
{
    display: none; /* 默认隐藏，手机模式显示 */
    font-size: 20px;
    color: white;
    text-decoration: none;
}

.search-icon:hover 
{
    color: gold;
}

/* 侧边栏关闭叉叉 */
.sidebar-close 
{
    display: none; /* 默认隐藏，手机模式显示 */
}

/* 侧边栏 */
.sidebar 
{
    width: 250px;
    background: white;
    position: fixed;
    top: 80px;
    bottom: 60px;
    padding: 0;
    overflow-y: auto;
}

.sidebar-menu 
{
    position: relative; /* 为 .sidebar-close 提供定位上下文 */
}

.sidebar-menu ul 
{
    list-style: none;
}

.sidebar-menu > ul > li 
{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    background: #f8f9fa;
}

.sidebar-menu > ul > li > a 
{
    display: inline-block;
    padding: 10px 10px 10px 10px;
    text-decoration: none;
    font-weight: bold;
    color: #333;
    position: relative;
}

.sidebar-menu .sub-menu 
{
    display: block;
    width: 100%;
}

.sidebar-menu .sub-menu li a 
{
    display: block;
    padding: 8px 10px 8px 20px;
    text-decoration: none;
    color: #333;
    margin-left: 5px; /* 与手机模式现有样式一致 */
}

.sidebar-menu .sub-menu li a:hover 
{
    color: #007bff;
}

.toggle-icon 
{
    font-size: 15px;
    cursor: pointer;
    display: inline-block;
    padding: 2px 5px;
    position: relative;
    z-index: 1;
}

/* 高亮当前文章 */
.sidebar-menu .sub-menu li.active
{
    background-color: #e6f3ff; /* 浅蓝色背景 */
    font-weight: bold; /* 加粗 */
    border-left: 3px solid #007bff; /* 左侧蓝色边框 */
    padding-left: 10px; /* 适应边框，保持文字与非高亮对齐（原 padding-left: 20px - 3px） */
    margin-left: 8px; /* 适应边框，保持文字对齐（5px - 3px） */
}

/* 搜索框 */
.search-container form 
{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

.search-container input 
{
    flex: 2;
    height: 30px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size:18px;
    width: 150px;
}

.search-container button 
{
    flex: 1;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size:16px;
    width: 100px;
}

.search-container button:hover 
{
    background: #0056b3;
}

/* search.html 页面的搜索框样式 */
.search-page .search-container 
{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 0;
    width: auto;
    margin-left: 20px;
}

.search-page .search-container form 
{
    display: flex;
    align-items: center;
    gap: 10px;
    width: auto;
    padding-left: 0;
}

.search-page .search-container input 
{
    flex: 0 0 auto;
    width: 150px;
    height: 30px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.search-page .search-container button 
{
    flex: 0 0 80px;
    width: 100px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-page .search-container button:hover 
{
    background: #0056b3;
}

/* 搜索结果样式 */
#search-results 
{
    margin-left: 20px;
}

#search-results .category-article-list 
{
    list-style: none;
    padding: 0;
}

#search-results .category-article-list li 
{
    margin-bottom: 10px;
}

#search-results .category-article-list li a 
{
    color: #007bff;
    text-decoration: none;
    font-size: 18px;
}

#search-results .category-article-list li a:hover 
{
    text-decoration: underline;
}

.search-description-link 
{
    color: black !important; /* 强制设置为黑色 */
    text-decoration: none; /* 移除下划线 */
    cursor: pointer; /* 保持鼠标悬停时是手型，提示可点击 */
}

.search-description-link:hover 
{
    color: black !important; /* 强制设置为黑色 */
    text-decoration: none; /* 鼠标悬停时下划线也不出现 */
}

.search-result-desc 
{
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* 搜索结果计数样式 */
.search-results-count 
{
    margin-left: 0;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* 分页导航样式 */
.pagination 
{
    margin-top: 0px;
    margin-bottom: 0px;
    font-size: 18px;
}

/* 确保所有分页链接无下划线，添加边框和颜色样式 */
.pagination a,
.pagination a:any-link
{
    text-decoration: none !important;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    display: inline-block;
    text-align: center;
    min-width: 30px;
    color: #333;
    transition: background-color 0.2s ease;
    margin-right: 5px;
}

.pagination a:hover 
{
    background-color: #f0f0f0;
    text-decoration: none !important;
}

/* 搜索页面分页样式 */
.search-results .pagination 
{
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px; /* 增加间距，防止链接挨在一起 */
}

.search-results .pagination a 
{
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px; /* 长方形边框，略带圆角 */
    color: #333;
    text-decoration: none !important; /* 确保无下划线 */
    transition: background-color 0.2s ease;
    margin-right: 5px; /* 额外间距，确保链接分开 */
    min-width: 30px; /* 确保“上一页”“下一页”有足够宽度 */
    text-align: center; /* 文字居中 */
}

.search-results .pagination a:hover 
{
    background-color: #f0f0f0;
    text-decoration: none !important; /* 确保悬停时无下划线 */
}

.search-results .pagination a.current 
{
    background-color: #007bff; /* 当前页蓝色背景 */
    color: white;
    border-color: #007bff;
}

/* 针对 .search-pagination 类，增强特异性，确保分页链接间距生效 */
.search-results .pagination.search-pagination 
{
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px; /* 保持一致的间距 */
}

.search-results .pagination.search-pagination a 
{
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    text-decoration: none !important; /* 确保无下划线 */
    transition: background-color 0.2s ease;
    margin-right: 5px;
    min-width: 30px;
    text-align: center;
}

.search-results .pagination.search-pagination a:hover 
{
    background-color: #f0f0f0;
    text-decoration: none !important; /* 确保悬停时无下划线 */
}

.search-results .pagination.search-pagination a.current 
{
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* 使用 ID 选择器进一步增强特异性，确保分页样式生效 */
#search-results .pagination.search-pagination 
{
    display: flex !important;
    justify-content: space-between !important; /* 左右分布，中间自动调整 */
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important; /* 占满容器宽度 */
}

.search-results .pagination.search-pagination a 
{
    display: inline-block !important;
    padding: 8px 12px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    color: #333 !important;
    text-decoration: none !important; /* 确保无下划线 */
    transition: background-color 0.2s ease !important;
    min-width: 30px !important;
    text-align: center !important;
}

.search-results .pagination.search-pagination a:hover 
{
    background-color: #f0f0f0 !important;
    text-decoration: none !important; /* 确保悬停时无下划线 */
}

#search-results .pagination.search-pagination a.current 
{
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

/* 页码信息样式 */
#search-results .pagination.search-pagination .page-info 
{
    padding: 8px 12px;
    font-size: 18px;
    color: #333;
    text-align: center;
    flex-grow: 1; /* 占据剩余空间，居中 */
}

/* 主内容 */
main 
{
    flex: 1;
    margin-top: 80px;
    margin-bottom: 20px;
    margin-left: 250px;
}

/* 面包屑 */
.breadcrumb 
{
    margin-bottom: 5px;
    color: #666;
    padding-top: 10px; /* 向下偏移 10px，与侧边栏搜索框对齐 */
    font-size:18px;
}

/* 保持 h1 标题与原来相同的字体大小 */
.breadcrumb-title {
    font-size: inherit; /* 继承父元素的字体大小 */
    margin: 0; /* 重置 h1 的默认外边距 */
    font-weight: bold; /* 如果需要也可以重置字体粗细 */
    display: inline; /* 如果需要保持原来的行内表现 */
}

.breadcrumb a 
{
    color: #007bff;
    text-decoration: none;
    margin-right:5px;
}

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

.breadcrumb span 
{
    color: #333;
}

/* 文章标题和时间 */
.article-title 
{
    font-size: 1.8rem;
    font-weight: bold;
    text-align: left;
    margin: 10px 0 10px;
    color: #333;
}

.article-date 
{
    font-size: 18px;
    color: #666;
    text-align: left;
    margin-bottom: 10px;
}

/* 分类介绍 */
.category-desc 
{
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    overflow-wrap: break-word;
    max-width: 100%;
    margin-left: 0;
}

.category-article-count 
{
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

.category-article-list 
{
    list-style: none;
    padding: 0;
}

.category-article-list li 
{
    margin-bottom: 10px;
}

.category-article-list li a 
{
    color: #007bff;
    text-decoration: none;
    font-size: 18px;
}

.category-article-list li a:hover 
{
    text-decoration: underline;
}

/* 文章列表（博客模式） */
.article-list article 
{
    margin-bottom: 10px;
}

.article-list h2 
{
    font-size: 24px;
}

/* 博客模式首页文章标题链接样式 */
.article-list h2 a 
{
    color: #007bff;
    text-decoration: none;
}

.article-list h2 a:hover 
{
    color: #0056b3;
    text-decoration: none;
}

.article-list .date 
{
    color: #666;
    font-size: 18px;
    margin-bottom: 10px;
}

.article-list .abstract 
{
    color: #333;
    font-size: 18px;
}

.article-list .abstract-text
{
    color: #333;
    font-size: 18px;
}

.article-list .abstract-link
{
    text-decoration: none;
    color: inherit;
}

/* 文章内部导航 */
.toc 
{
    position: fixed;
    top: 310px;
    right: 80px; /* 调整位置，避免与浮动按钮重叠（按钮宽度约40px + 间隙） */
    width: 300px;
    background: #f8f9fa;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: none; /* 默认隐藏，等待浮动按钮点击显示 */
    z-index: 1000;
    font-size:18px;
    overflow-wrap: break-word;
}

.toc:not(.active) 
{
    min-height: 50px;
}

.toc.active 
{
    min-height: 100px;
}

.toc-header 
{
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    height: 40px;
}

.toc button 
{
    flex: 1;
    padding: 8px;
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 18px;
    text-align: center;
    display: block;
    width: 100%;
}

.toc button:hover 
{
    background: #0056b3;
}

.toc .toc-close 
{
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 35px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.toc .toc-close:hover 
{
    color: #ccc;
}

.toc ul 
{
    list-style: none;
    margin-top: 10px;
    display: none;
}

.toc.active ul 
{
    display: block;
}

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

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

/* TOC 锚点偏移 */
[name^="toc-"] 
{
    padding-top: 80px;
    margin-top: -80px;
    display: block;
}

/* 文章外部导航 */
.article-nav 
{
    margin-top: 5px;
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    font-size: 18px;
}

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

.article-nav a:hover 
{
    text-decoration: underline;
}

.cat-list-nav 
{
    padding: 10px 1px;
    font-size: 18px;
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: nowrap;
    margin-left: 0;
    width: auto;
    max-width: 100%;
    justify-content: center !important; 

}

.cat-list-nav a 
{
    text-decoration: none;
    color: #007bff;
    display: inline-block;
    padding: 3px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1.5;
    box-sizing: border-box;
}

.cat-list-nav a:hover 
{
    text-decoration: underline;
    background-color: #f0f0f0;
}

.cat-list-nav span 
{
    display: inline-block;
    padding: 3px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1.5;
    box-sizing: border-box;
}

/* 底部 */
footer 
{
    background: #343a40;
    color: white;
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 30px;
    font-size:18px;
}

footer .container 
{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0;
}

footer a 
{
    color: #fff;
    text-decoration: none;
}

footer a:hover 
{
    text-decoration: underline;
    color: #ddd;
}

/* 与markdown生成的html有关的css */

/* 表格样式 */
table 
{
    border-collapse: collapse;
    width: auto;
    max-width: 80%;
    margin: 20px auto;
    display: table;
    border: 1px solid #ddd;
}

th, td 
{
    border: 1px solid #ddd;
    padding: 12px 16px;
    text-align: center;
    vertical-align: middle;
    font-size:18px;
}

th 
{
    background-color: #f5f5f5;
    font-weight: bold;
}

tr:hover 
{
    background-color: #f9f9f9;
}

/* 图片样式 */
img 
{
    display: block;
    margin: 10px auto;
    max-width: 100%;
    height: auto;
}

/* 引用样式 */
blockquote 
{
    border-left: 4px solid #ddd;
    margin: 20px 0;
    padding: 10px 20px;
    background-color: #f9f9f9;
    color: #333;
    min-width: 300px;
    max-width: 100%;
    box-sizing: border-box;
}

/* 代码块样式 */
pre 
{
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    overflow-x: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    min-width: 300px;
    max-width: 100%;
    box-sizing: border-box;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 17px;
}

pre code 
{
    background: transparent;
    border: none;
    padding: 0;
    font-size: 17px;
}

ol 
{
  margin-left: 1em;  /* 整体左缩进 2em（可调整数值） */
}

h2 + ol 
{
  margin-left: 1em;  /* 整体左缩进 2em（可调整数值） */
}
h2 + ul 
{
  margin-left: 1em;  /* 整体左缩进 2em（可调整数值） */
}

h3 + ol 
{
  margin-left: 1em;  /* 整体左缩进 2em（可调整数值） */
}

h3 + ul 
{
  margin-left: 1em;  /* 整体左缩进 2em（可调整数值） */
}

h4 + ol 
{
  margin-left: 1em;  /* 整体左缩进 2em（可调整数值） */
}

h4 + ul 
{
  margin-left: 1em;  /* 整体左缩进 2em（可调整数值） */
}

#search-results ul
{
	 margin-left: 0em;  /* 整体左缩进 2em（可调整数值） */
}

.content ul
{
	 margin-left: 1.2em;  /* 整体左缩进 2em（可调整数值） */
}

.content ol
{
	 margin-left: 1.2em;  /* 整体左缩进 2em（可调整数值） */
}

ol li ul 
{
  font-size: 18px;
  padding-left: 1.5em;
  margin-left: 0;
  list-style-type: disc;
  list-style-position: outside;
}

/* Markdown 标题样式 */
h1 
{
    font-size: 1.75rem;
    font-weight: bold;
    margin: 10px 0 10px;
    color: #333;
}

h2 
{
    font-size: 1.5rem;
    font-weight: bold;
    margin: 10px 0 10px;
    color: #333;
}

h3 
{
    font-size: 1.25rem;
    font-weight: bold;
    margin: 10px 0 10px;
    color: #333;
}

h4 
{
    font-size: 1rem;
    font-weight: 600;
    margin: 10px 0 10px;
    color: #333;
}

h5 
{
    font-size: 0.875rem;
    font-weight: 600;
    margin: 10px 0 10px;
    color: #333;
}

h6 
{
    font-size: 0.75rem;
    font-weight: 600;
    margin: 10px 0 10px;
    color: #333;
}

/* 内链样式 */
.internal-link
{
    text-decoration: none;
    color: #0066cc;
}

.internal-link:hover
{
    color: #003366;
}

/* 浮动按钮和回顶按钮 */
.floating-buttons
{
    position: fixed;
    bottom: 90px; /* 提高位置，确保在回顶按钮上方 */
    right: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 101; /* 提高 z-index，防止被回顶按钮覆盖 */
}

.floating-goto-top-container
{
    position: fixed;
    bottom: 50px; /* 低于目录按钮 */
    right: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.floating-toc-button,
.floating-goto-top
{
    width: 32px;
    height: 32px;
    background-color: #e0e0e0;
    border-radius: 50%;
    border: none;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s;
}

.floating-toc-button:hover,
.floating-goto-top:hover
{
    background-color: #d0d0d0;
}

.floating-goto-top
{
    display: none; /* 默认隐藏，JS 动态控制 */
}

/* 响应式调整 */
@media (max-width: 768px) 
{
    blockquote, pre 
    {
        min-width: 200px;
    }

    .article-title 
    {
        font-size: 1.8rem;
    }

    h1 
    {
        font-size: 1.575rem;
    }

    h2 
    {
        font-size: 1.35rem;
    }

    h3 
    {
        font-size: 1.125rem;
    }

    h4 
    {
        font-size: 0.9rem;
    }

    h5 
    {
        font-size: 0.7875rem;
    }

    h6 
    {
        font-size: 0.675rem;
    }

    header .container 
    {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 4px 0;
        min-height: 120px;
    }

    .main-wrapper 
    {
        display: block;
    }

    .logo 
    {
        flex: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-left: 15px;
    }

    .mobile-menu-toggle 
    {
        display: flex;
        align-items: center;
        margin-right: 15px;
        gap: 10px;
    }

    .menu-icon 
    {
        font-size: 20px;
        white-space: nowrap;
    }

    .menu-icon strong 
    {
        font-weight: bold;
    }

    .search-icon 
    {
        display: inline;
        margin-right: 15px;
    }

    .top-menu 
    {
        display: block;
        width: 100%;
        background: #003087;
        text-align: center;
        margin-top: -18px;
        margin-left: 0;
        margin-right: 0;
        padding: 0;
        order: 1;
    }

    .top-menu ul 
    {
        flex-direction: row;
        justify-content: center;
        box-sizing: border-box;
    }

    .top-menu li 
    {
        margin: 0 10px;
        box-sizing: border-box;
    }

    .search-container 
    {
        display: flex;
        justify-content: center;
        margin: 10px 0;
    }

    .search-container form 
    {
        width: 100%;
        max-width: 600px;
    }

    .sidebar 
    {
        display: none;
        width: 250px;
        position: fixed;
        top: 100px;
        left: 0;
        height: calc(100% - 100px);
        padding: 0; /* 移除内边距，确保分页居中 */
        z-index: 999;
        animation: slideIn 0.3s ease-in-out;
    }

    .sidebar.active 
    {
        display: block;
    }

    .sidebar-close 
    {
        display: block;
        position: absolute;
        top: -5px;
        right: 12px;
        font-size: 40px;
        color: black;
        font-weight: bold;
        cursor: pointer;
        /* 替代方案：更紧密的间距 */
        /*
        top: 8px;
        right: 8px;
        */
    }

    .sidebar-close:hover 
    {
        color: #666;
    }

    .sidebar-menu 
    {
        padding-left: 0; /* 移除左侧内边距，确保分页居中 */

    }

    .sidebar-menu > ul 
    {
        margin-left: 0; /* 清除可能的左侧外边距 */
        padding-left: 0; /* 清除可能的左侧内边距 */
    }

    .sidebar-menu > ul > li 
    {
        margin-left: 0; /* 清除左侧外边距 */
        padding-left: 0; /* 清除左侧内边距 */
    }

    .sidebar-menu > ul > li > a 
    {
        margin-left: 5px;
    }

    .sidebar-menu .sub-menu 
    {
        margin-left: 0; /* 清除可能的左侧外边距 */
        padding-left: 0; /* 清除可能的左侧内边距 */
    }

    .sidebar-menu .sub-menu li a 
    {
        margin-left: 0; /* 移除左侧偏移 */
        padding-left: 10px; /* 调整内边距，确保文字对齐 */
    }

    .toggle-icon 
    {
        margin-left: 15px;
    }

    /* 高亮当前文章 - 手机模式 */
    .sidebar-menu .sub-menu li.active
    {
        background-color: #e6f3ff;
        font-weight: bold;
        border-left: 3px solid #007bff;
        padding-left: 7px; /* 调整内边距，适应边框 */
        margin-left: 0; /* 移除 margin-left，竖线更靠近侧边栏左边缘 */
    }

    @keyframes slideIn 
    {
        from 
        {
            left: -250px;
        }
        to 
        {
            left: 0;
        }
    }

    .sidebar .search-container form 
    {
        padding: 10px;
    }

    .sidebar .search-container input 
    {
        flex: 1.5;
        width: 150px;
    }

    .sidebar .search-container button 
    {
        flex: 1;
        width: 100px;
    }

    main 
    {
        margin-left: 0;
        margin-top: 105px;
    }

    .banner-container 
    {
        position: static;
        top: 0;
        width: 100%;
        margin: 0;
        margin-bottom: 10px;
        padding: 0;
    }

    .banner 
    {
        margin: 0;
        width: 100%;
    }

    .banner img 
    {
        width: 100%;
        height: auto;
        display: block;
    }

    .toc 
    {
        position: fixed;
        top: 105px; /* 与顶部菜单底部对齐（顶部菜单高度为 80px） */
        right: 70px; /* 稍微往左靠，与浮动按钮拉开 15px 距离（浮动按钮 right: 35px） */
        width: 300px;
        background: #f8f9fa;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        display: none; /* 默认隐藏，等待浮动按钮点击显示 */
        z-index: 1000;
        overflow-wrap: break-word;
    }

    .toc-header 
    {
        position: relative;
        height: 40px;
    }

    .toc .toc-close 
    {
        right: 10px;
    }

    .article-nav 
    {
        flex-wrap: wrap;
        gap: 10px;
    }

    .sidebar .cat-list-nav 
    {
        margin-top: 20px;
        padding-bottom: 20px;
        font-size: 18px;
        display: flex !important;
        gap: 5px;
        align-items: center;
        flex-wrap: nowrap;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
        margin: 0 auto !important;
        box-sizing: border-box;     

    }

    .sidebar .cat-list-nav a 
    {
        text-decoration: none;
        color: #007bff;
        display: inline-block;
        padding: 3px 6px;
        border: 1px solid #ddd;
        border-radius: 4px;
        white-space: nowrap;
        line-height: 1.5;
        box-sizing: border-box;
        margin: 0; /* 移除可能的偏移 */
    }

    .sidebar .cat-list-nav a:hover 
    {
        text-decoration: underline;
        background-color: #f0f0f0;
    }

    .sidebar .cat-list-nav span 
    {
        display: inline-block;
        padding: 3px 6px;
        border: 1px solid #ddd;
        border-radius: 4px;
        white-space: nowrap;
        line-height: 1.5;
        box-sizing: border-box;
        margin: 0; /* 移除可能的偏移 */
    }

    .footer 
    {
        position: static;
    }

    .category-desc 
    {
        padding: 10px;
        font-size: 18px;
    }

    .category-article-count 
    {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 20px;
    }

    .category-article-list 
    {
        list-style: none;
        padding: 0;
    }

    .category-article-list li 
    {
        margin-bottom: 10px;
    }

    .category-article-list li a 
    {
        color: #007bff;
        text-decoration: none;
        font-size: 18px;
    }

    .category-article-list li a:hover 
    {
        text-decoration: underline;
    }

    /* 手机模式下确保 search-page 搜索框和按钮居中 */
    .content .search-page .search-container 
    {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 10px 0;
        width: auto;
        margin: 0 auto;
        max-width: 360px; /* 输入框200px + 按钮160px + gap 10px */
    }

    .content .search-page .search-container form 
    {
        display: flex;
        align-items: center;
        gap: 10px;
        width: auto;
        padding-left: 0;
        margin: 0;
    }

    .content .search-page .search-container input 
    {
        flex: 0 0 auto;
        width: 150px;
        height: 30px;
        padding: 8px;
        border: 1px solid #ccc;
        border-radius: 4px;
        margin-left: 0;
        box-sizing: border-box;
        font-size:18px;
    }

    .content .search-page .search-container button 
    {
        flex: 0 0 80px;
        width: 100px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        background: #007bff;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        margin-left: 0;
        box-sizing: border-box;
        font-size:16px;
    }

    .content .search-page .search-container button:hover 
    {
        background: #0056b3;
    }

    #search-results 
    {
        margin-left: 0px;
    }

    #search-results .category-article-list li 
    {
        margin-bottom: 10px;
    }

    #search-results .category-article-list li a 
    {
        color: #007bff;
        text-decoration: none;
        font-size: 18px;
    }

    #search-results .category-article-list li a:hover 
    {
        text-decoration: underline;
    }

    .search-result-desc 
    {
        background-color: #f9f9f9;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 10px;
        margin-top: 5px;
        margin-bottom: 10px;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .search-results-count 
    {
        margin-left: 0;
        font-size: 20px;
        font-weight: bold;
        margin-bottom: 10px;
    }

    .pagination 
    {
        margin-top: 0px;
        margin-bottom: 0px;
        font-size: 18px;
    }

    .search-results .pagination 
    {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 12px; /* 增加间距，防止链接挨在一起 */
    }

    .search-results .pagination a 
    {
        display: inline-block;
        padding: 8px 12px;
        border: 1px solid #ccc;
        border-radius: 4px; /* 长方形边框，略带圆角 */
        color: #333;
        text-decoration: none !important; /* 确保无下划线 */
        transition: background-color 0.2s ease;
        margin-right: 5px; /* 额外间距，确保链接分开 */
        min-width: 30px; /* 确保“上一页”“下一页”有足够宽度 */
        text-align: center; /* 文字居中 */
    }

    .search-results .pagination a:hover 
    {
        background-color: #f0f0f0;
        text-decoration: none !important; /* 确保悬停时无下划线 */
    }

    .search-results .pagination a.current 
    {
        background-color: #007bff; /* 当前页蓝色背景 */
        color: white;
        border-color: #007bff;
    }

    .search-results .pagination.search-pagination 
    {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 12px;
    }

    .search-results .pagination.search-pagination a 
    {
        display: inline-block;
        padding: 8px 12px;
        border: 1px solid #ccc;
        border-radius: 4px;
        color: #333;
        text-decoration: none !important; /* 确保无下划线 */
        transition: background-color 0.2s ease;
        margin-right: 5px;
        min-width: 30px;
        text-align: center;
    }

    .search-results .pagination.search-pagination a:hover 
    {
        background-color: #f0f0f0;
        text-decoration: none !important; /* 确保悬停时无下划线 */
    }

    .search-results .pagination.search-pagination a.current 
    {
        background-color: #007bff;
        color: white;
        border-color: #007bff;
    }

    /* 在媒体查询中也增强特异性 */
    #search-results .pagination.search-pagination 
    {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
    }

    #search-results .pagination.search-pagination a 
    {
        display: inline-block !important;
        padding: 2px 12px !important;
        margin-bottom:5px;
        border: 1px solid #ccc !important;
        border-radius: 4px !important;
        color: #333 !important;
        text-decoration: none !important; /* 确保无下划线 */
        transition: background-color 0.2s ease !important;
        min-width: 30px !important;
        text-align: center !important;
    }

    .search-results .pagination.search-pagination a:hover 
    {
        background-color: #f0f0f0 !important;
        text-decoration: none !important; /* 确保悬停时无下划线 */
    }

    #search-results .pagination.search-pagination a.current 
    {
        background-color: #007bff !important;
        color: white !important;
        border-color: #007bff !important;
    }

    #search-results .pagination.search-pagination .page-info 
    {
        padding: 8px 12px;
        font-size: 18px;
        color: #333;
        text-align: center;
        flex-grow: 1;
    }

    /* 调整 blog 模式间距：手机模式调整 */
    body.blog-mode .content 
    {
        padding-bottom: 5px;
    }

    body.blog-mode .pagination 
    {
        margin-top: 0;
    }

    /* doc 模式下手机模式调整 */
    body.doc-mode .content 
    {
        padding: 2px 20px 20px 20px; /* 手机模式下减小 padding-bottom，调整间距一 */
        margin-bottom: 0px; /* 手机模式下微调间距二 */
    }

    body.doc-mode .pagination 
    {
        margin-top: 0px; /* 手机模式下调整间距一，确保文章最后一行完整显示 */
    }

    /* 调整浮动按钮和回顶按钮 */
    .floating-buttons
    {
        bottom: 85px; /* 手机模式下提高位置 */
        right: 35px;
    }

    .floating-goto-top-container
    {
        bottom: 45px; /* 低于目录按钮 */
        right: 35px;
    }

    .floating-toc-button,
    .floating-goto-top
    {
        width: 30px;
        height: 30px;
        font-size: 18px;
        line-height: 1;
    }
}