body {
  font-family: "Helvetica Neue", Arial, "Noto Sans SC", "Noto Serif SC", "Microsoft YaHei", "WenQuanYi Micro Hei", SimSun, sans-serif;
  margin: 0 auto;
  padding: 0;
  max-width: 1000px; /* 增大页面最大宽度 */
  width: 90%; /* 页面宽度占据 90% */
}

.has-jax {
  line-height: inherit !important; /* 避免 MathJax 公式单独改变行距 */
  display: inline-block !important; /* 防止公式影响块级元素 */
}

.page-post {
  font-size: 16px;
  line-height: 2;
  word-break: break-all;
}
/* .page-post{
  white-space: pre-line;
} */
.page-post .title {
  font-size: 23px;
  font-weight: bold;
  color: #666666;
}
.page-post .subtitle {
  font-size: 12px;
  color: #999999;
}
.page-post .post > * {
  margin: 0px 0;
}
.page-post .post > iframe {
  margin: 0;
  width: 100%;
}
.page-post .post p {
  font-family: "Noto Serif SC", "Georgia", serif;
  margin: 18px 0; /* Add this rule for consistent paragraph spacing */
}
.page-post .post h1,
.page-post .post h2 {
  font-family: "Noto Serif SC", "Georgia", serif;
  font-weight: normal;
  font-size: 20px;
  position: relative;
  font-weight: bold;
  cursor: pointer;
}
.page-post .post h1::before,
.page-post .post h2::before {
  content: '#';
  top: 0;
  font-weight: bold;
  padding-right: 6px;
}
/* .page-post h3,
 */
.page-post .post h3 {
  font-family: "Noto Serif SC", "Georgia", serif;
  font-weight: normal;
  font-size: 18px;
  position: relative;
  font-weight: bold;
  cursor: pointer;
}
.page-post h4,
.page-post h5,
.page-post h6 {
  font-family: "Arial", sans-serif;
  font-size: 15px;
  font-weight: bold;
}
.page-post blockquote {
  border-left: 3px solid #333333;
  background-color: #f7f7f7;
  padding: 0px 0px 0px 15px;
}

.page-post a {
  font-family: "Noto Serif SC" ; /* 无衬线字体 */
  color: #3366cc;
  margin: 0 2px;
  border-bottom: 1px solid #ffffff;
  font-weight: bold;
}
.page-post strong,
.page-post b {
  color: #000000;
}

/* .page-post .post ul {
  margin-left: 16px;
}
.page-post .post ol {
  margin-left: 0px;
  font-family: "Noto Serif SC" ;
  margin: 0px 0px;
}
.page-post ul > li {
  list-style: disc;
  margin-left: 2px;
  line-height: 1.6;
}

.page-post ol > li {
  list-style: decimal;
  margin-left: 20px;
  line-height: 1.6;
}

.page-post li > *{
  margin: 6px 0;
} */

/* 统一 ul 的样式 */
.page-post .post ul {
  margin: 0;
  padding-left: 20px;
  font-family: "Noto Serif SC", serif;
  list-style: disc;
}

/* 统一 ol 的样式 */
.page-post .post ol {
  margin: 0;
  padding-left: 20px;
  font-family: "Noto Serif SC", serif;
  list-style: decimal;
}

/* ul 和 ol 的 li 样式 */
.page-post .post ul > li,
.page-post .post ol > li {
  margin: 0 0 4px 0; /* 保持小的垂直间距 */
  padding: 0;
  line-height: 1.5;
}

/* li 内的子元素（如 p） */
.page-post .post li > * {
  margin: 2px 0; /* 保持小的子元素间距 */
  font-size: 16px; /* 覆盖 18px */
  font-family: inherit;
}

/* 针对 ol 和 ul 内的 .post p */
.page-post .post ul .post p,
.page-post .post ol .post p {
  font-size: 16px;
  margin: 2px 0;
  line-height: 1.5;
}

/* 为 ol 的编号加粗 */
.page-post .post ol > li::marker {
  font-weight: bold; /* 加粗编号 */
}

.page-post img {
  display: block;
  max-width: 90%;
  margin: 20px auto;
  height: auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.page-post img[alt='line'] {
  display: inline-block;
  vertical-align: middle;
  background-color: transparent;
  box-shadow: none;
  margin: 0 4px;
  line-height: 1;
}
.page-post pre {
  font-size: 0;
  padding: 10px;
  overflow: auto;
  border-radius: 2px;
  max-height: 610px;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
  line-height: 1.6;
}

.footnote-ref sup,
.footnote-ref sup {
  color: blue !important;
}
.page-post code {
  font-size: 13px;
  background-color: #eeeeee;
  word-break: break-all;
  padding: 3px 5px;
  margin: 0 4px;
  border-radius: 5px;
  color: #4d4d4c;
  font-family: 'JetBrains Mono', monospace;
}
.page-post pre code {
  font-size: 13px;
  background-color: transparent !important;
  word-break: keep-all;
  padding: 0;
  margin: 0;
  border-radius: unset;
  color: inherit;
}

.page-post hr {
  border: none;
  height: 3px;
  background-color: #eeeeee;
}

/* 表格设计 */
.page-post .table-container {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.page-post table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  min-width: 600px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* 表头 */
.page-post th {
  background-color: #f5f5f5;
  color: #333;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 8px;
  text-align: center;
}

/* 单元格 */
.page-post td {
  background-color: #ffffff;
  color: #555;
  font-size: 13px;
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
  word-break: break-word;
}

/* 行样式 */
.page-post tr {
  border-bottom: 1px solid #e0e0e0;
}

.page-post tr:nth-child(even) td {
  background-color: #f9f9f9;
}

.page-post tr:hover td {
  background-color: #eef2f7;
  transition: background-color 0.3s ease;
}

/* 响应式设计，适应不同屏幕 */
/* @media screen and (max-width: 560px) { */
  /* .page-post table { */
    /* font-size: 12px; */
  /* } */
  /* .page-post th, */
  /* .page-post td { */
    /* padding: 8px 12px; 调整表格单元格内边距 */
  /* } */
/* } */

/* 代码容器样式 */
.code-container {
  position: relative;
}

/* 复制按钮样式 */
.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  font-size: 12px;
  background-color: #4BB596;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.copy-button:hover {
  opacity: 1;
}

.copy-button:active {
  transform: scale(0.95);
}

/* 分享 */
.share-buttons {
  display: flex; /* 启用 Flexbox 布局 */
  justify-content: center; /* 水平居中 */
  align-items: center; /* 垂直居中 */
  gap: 10px; /* 按钮之间的间距 */
  margin-top: 20px; /* 顶部外边距 */
}

.share-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.share-button:hover {
  transform: scale(1.1); /* 鼠标悬停时放大按钮 */
}

.share-button i {
  font-size: 24px; /* 图标大小 */
  color: #333; /* 图标颜色 */
}

/* 评论 */
#gitalk-container {
  margin-top: 40px;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 8px;
}

/* 允许文本复制 */
body, p, div, span, a {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
}

/* 上下一篇文章 */
.navigation-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
}

.nav-button {
  padding: 10px 20px;
  text-decoration: none;
  color: #333;
  background-color: #f5f5f5;
  border-radius: 5px;
  transition: background-color 0.3s;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-bottom: #ffffff
}

.nav-button:hover:not(.disabled) {
  background-color: #e0e0e0;
}

.nav-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nav-button i {
  margin: 0 5px;
}

.previous {
  text-align: left;
}

.next {
  text-align: right;
}


#toc {
  position: fixed;
  top: 100px;
  left: 20px;
  width: 180px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: #f8f8f8;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-size: 0.9em;
  z-index: 10;
  transition: all 0.3s ease;
}

#toc.collapsed {
  width: auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

#toc.collapsed .toc-header,
#toc.collapsed .toc-title,
#toc.collapsed .toc-list {
  display: none;
}

/* 透明浮动汉堡按钮 */
.toc-toggle-floating {
  position: fixed;
  top: 100px; /* 可自定义位置 */
  left: 20px;
  background: transparent;
  border: none;
  font-size: 1.6em;
  cursor: pointer;
  padding: 8px;
  z-index: 1000;
}

.toc-toggle-floating i {
  color: rgba(0, 0, 0, 0.2); /* 半透明三条线 */
}

.toc-toggle-floating:hover i {
  color: rgba(0, 123, 255, 0.5);
}

.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.toc-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #333;
}

.toc-toggle {
  background: none;
  border: none;
  font-size: 1.1em;
  cursor: pointer;
  color: #333;
  padding: 0;
}

.toc-toggle:hover {
  color: #007bff;
}

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

.toc-list li {
  margin: 5px 0;
}

.toc-list a {
  text-decoration: none;
  color: #333;
  transition: color 0.2s;
  display: block;
  padding: 2px 0;
}

.toc-list a:hover {
  color: #007bff;
}

.toc-list ul {
  padding-left: 15px;
}

.toc-list a.active {
  color: #007bff;
  font-weight: bold;
}

@media (max-width: 768px) {
  #toc {
    position: static;
    width: 100%;
    max-height: none;
    margin: 20px 0;
  }

  .toc-toggle-floating {
    top: auto;
    left: 10px;
    bottom: 20px;
  }
}