body {
  background-color: var(--body-bg);
}

.post {
  margin: 128px 0;
}

.meta .categories {
  color: var(--link);
  margin-bottom: 6px;
  font-weight: 600;
}

.meta .categories a {
  font-size: 13px;
  margin-right: 6px;
  text-decoration: none;
}

.meta .date {
  color: var(--grey);
  font-weight: 600;
}

.meta .title {
  font-size: 48px;
  margin-top: 16px;
}

.content {
  font-size: 19px;
  line-height: 1.4211;
  font-weight: 400;
  letter-spacing: 0.012em;
}

.content p,
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6,
.meta .categories,
.meta .date,
.content figure,
/* only `.content>pre`, do not include <pre /> in <figure /> */
.content>pre,
.divider,
.container,
hr,
.meta .title,
.toc,
.content blockquote,
.content table,
.content video,
.content ul,
.content ol,
.content > mjx-container,
.content > .katex,
.about {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 16px;
}

/* 浮动效果：图片浮动到左侧 */
.content p img.float-left,
.content .block-large img.float-left {
  max-width: 50%;  /* 图片最大宽度为50% */
  margin-right: 15px;  /* 右边距，避免文字与图片重叠 */
  margin-bottom: 10px; /* 浮动图片的底部间距 */
  float: left;
  height: auto;  /* 保持图片的纵横比 */
}

/* 浮动效果：图片浮动到右侧 */
.content p img.float-right,
.content .block-large img.float-right {
  max-width: 50%;  /* 图片最大宽度为50% */
  margin-left: 15px;  /* 左边距，避免文字与图片重叠 */
  margin-bottom: 10px; /* 浮动图片的底部间距 */
  float: right;
  height: auto;  /* 保持图片的纵横比 */
}
/* 浮动效果：教师 */
.content p img.float-teacher,
.content .block-large img.float-left {
  max-width: 20%;  /* 图片最大宽度为50% */
  margin-right: 15px;  /* 右边距，避免文字与图片重叠 */
  margin-bottom: 10px; /* 浮动图片的底部间距 */
  float: left;
  height: auto;  /* 保持图片的纵横比 */
}
/* 浮动效果：教师大 */
.content p img.float-teacher-main,
.content .block-large img.float-left {
  max-width: 35%;  /* 图片最大宽度为50% */
  margin-right: 15px;  /* 右边距，避免文字与图片重叠 */
  margin-bottom: 10px; /* 浮动图片的底部间距 */
  float: left;
  height: auto;  /* 保持图片的纵横比 */
}
/* 浮动效果：code */
.content p img.float-right,
.content .block-large img.float-right {
  max-width: 35%;  /* 图片最大宽度为50% */
  margin-left: 15px;  /* 左边距，避免文字与图片重叠 */
  margin-bottom: 10px; /* 浮动图片的底部间距 */
  float: right;
  height: auto;  /* 保持图片的纵横比 */
}
/* centerview */
.content p img,
.content .block-large img {
  border-radius: 10px;
  max-width: 100%; /* 默认图片最大宽度为70% */
  margin: 0 auto; /* 水平居中 */
  margin-bottom: 10px; /* 图片下方间距 */
  display: block; /* 将图片作为块级元素，便于居中 */
}
/* centerview-little */
.content p img.little,
.content .block-large img.little {
  border-radius: 10px;
  max-width: 50%; /* 默认图片最大宽度为70% */
  margin: 0 auto; /* 水平居中 */
  margin-bottom: 10px; /* 图片下方间距 */
  display: block; /* 将图片作为块级元素，便于居中 */
}
.content p img.s70,
.content .block-large img.s70 {
  border-radius: 10px;
  max-width: 70%; /* 默认图片最大宽度为70% */
  margin: 0 auto; /* 水平居中 */
  margin-bottom: 10px; /* 图片下方间距 */
  display: block; /* 将图片作为块级元素，便于居中 */
}
.content p img.s50,
.content .block-large img.s50 {
  border-radius: 10px;
  max-width: 50%; /* 默认图片最大宽度为70% */
  margin: 0 auto; /* 水平居中 */
  margin-bottom: 10px; /* 图片下方间距 */
  display: block; /* 将图片作为块级元素，便于居中 */
}


/* 使图片容器宽度匹配图片宽度，并将其偏左 */
.content .container {
  width: 100%; /* 设置容器宽度 */
  margin-bottom: 15px; /* 适当调整容器底部间距 */
  clear: both; /* 清除浮动，避免下方元素被图片覆盖 */
}

/* 图片容器 */
.image-container {
  width: 400px; /* 固定容器宽度为400px，您可以根据需要调整 */
  margin-right: 15px; /* 右边距 */
  margin-bottom: 10px; /* 底部间距 */
  float: left; /* 浮动容器到左侧 */
  margin-left: 5%; /* 左侧间距，避免图片紧贴屏幕边缘 */
  clear: both; /* 清除浮动，避免下方元素被图片覆盖 */
  text-align: center; /* 使figcaption居中 */
  box-sizing: border-box; /* 包括内外边距在宽度内 */
}

/* 浮动效果：图片浮动到左侧 */
.image-container img.float-inscribing {
  max-width: 100%; /* 图片最大宽度为100% */
  margin-bottom: 10px; /* 浮动图片的底部间距 */
  height: auto; /* 保持图片的纵横比 */
  border-radius: 10px; /* 圆角效果 */
}

/* 保证描述文本居中 */
.image-container figcaption {
  display: block;
  width: 100%; /* 确保figcaption占满整个宽度 */
  text-align: center; /* 使描述文字居中 */
  margin-top: 2px; /* 描述与图片之间的间距 */
  font-size: 12px; /* 设置字体大小为12px */
  color: #555; /* 可选，调整文本颜色 */
}
/* 浮动效果：图片浮动右侧，但是太小 */
.content p img.float-rightenlarge,
.content .block-large img.float-rightenlarge {
  max-width: 50%;  /* 图片最大宽度为50% */
  margin-right: 15px;  /* 右边距，避免文字与图片重叠 */
  margin-bottom: 10px; /* 浮动图片的底部间距 */
  float: right;
  height: auto;  /* 保持图片的纵横比 */
}


.content table,
.content video {
  display: block;
}

.content table {
  padding: 0;
  border-collapse: collapse;
  border-radius: 15px;
  max-width: 800px;
  overflow-x: auto;
}

.content table tr {
  background-color: var(--card-bg);
}

.content table tr:nth-child(even) {
  background-color: transparent;
}

.content table th,
.content table td {
  margin: 0;
  padding: 6px 12px;
}

.content table th {
  border-bottom: 1px solid var(--border-color);
}

.content table thead tr th:first-child {
  border-top-left-radius: 15px;
}

.content table thead tr th:last-child {
  border-top-right-radius: 15px;
}

.content table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 15px;
}

.content table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 15px;
}

@media screen and (max-width: 800px) {
  .content table,
  .content table thead tr th:first-child,
  .content table thead tr th:last-child,
  .content table tbody tr:last-child td:first-child,
  .content table tbody tr:last-child td:last-child {
    border-radius: 0;
  }
}

.content video {
  max-width: 100%;
  padding: 0;
}

.content .highlight,
.content > pre {
  overflow-x: auto;
  overflow-y: hidden;
  background-color: var(--card-bg);
  border-radius: 15px;
  max-width: calc(800px - 16px * 2);
}

@media screen and (max-width: 800px) {
  .content .highlight,
  .content > pre {
    border-radius: 0;
  }
}

.content .highlight * {
  border: none;
}

.content .highlight .gutter {
  padding-right: 16px;
}

.content > pre {
  max-width: calc(800px - 24px * 2);
  padding: 20px 24px;
}

.content > pre > code {
  background-color: transparent;
}

.content ul,
.content ol {
  padding: 0 16px;
  padding-left: 32px;
  margin-block-start: 1em;
  margin-block-end: 1em;
  max-width: calc(800px - 16px * 2);
}

.content blockquote {
  max-width: calc(800px - 16px * 2);
  padding: 0 8px;
}

/* for [hexo-math](https://github.com/hexojs/hexo-math): */
.content > mjx-container,
.content > .katex {
  display: block;
  text-align: center;
}

.tags {
  display: flex;
  flex-wrap: wrap;
}

.tags .icon {
  --size: 14px;
  background-position: center;
  background-size: var(--size) var(--size);
  background-repeat: no-repeat;
  display: block;
  width: var(--size);
  height: var(--size);
  margin-right: 6px;
}

body[data-color-scheme="auto"] .tags .icon {
  background-image: url(/theme-img/tags-dark.svg);
}

@media (prefers-color-scheme: dark) {
  body[data-color-scheme="auto"] .tags .icon {
    background-image: url(/theme-img/tags-light.svg);
  }
}

body[data-color-scheme="dark"] .tags .icon {
  background-image: url(/theme-img/tags-light.svg);
}

.tags .tag {
  font-size: 14px;
  display: block;
  height: 14px;
  margin-right: 4px;
}

.about {
  border-radius: 7px;
  background-color: var(--card-bg);
  max-width: calc(800px - 16px * 2);
  padding: 16px;
  margin: 64px auto;
}

@media screen and (max-width: 800px) {
  .about {
    border-radius: 0;
  }
}

.about h1 {
  margin: 0;
}

.about .details {
  margin: 16px 0;
}

.about .details p {
  margin: 6px 0;
}

.content h1 > .headerlink,
.content h2 > .headerlink,
.content h3 > .headerlink,
.content h4 > .headerlink,
.content h5 > .headerlink,
.content h6 > .headerlink {
  opacity: 0;
  color: var(--grey);
  font-weight: normal;
  position: absolute;
  padding-right: 6px;
  transform: translateX(-100%);
  transition: opacity 0.2s;
}

.content h1:hover > .headerlink,
.content h2:hover > .headerlink,
.content h3:hover > .headerlink,
.content h4:hover > .headerlink,
.content h5:hover > .headerlink,
.content h6:hover > .headerlink {
  opacity: 1;
  text-decoration: none;
}

.content h1 > .headerlink::before,
.content h2 > .headerlink::before,
.content h3 > .headerlink::before,
.content h4 > .headerlink::before,
.content h5 > .headerlink::before,
.content h6 > .headerlink::before {
  content: "#";
}

.content > h1 {
  font-size: 36px;
}

.content > h2 {
  font-size: 30px;
}

.content > h3 {
  font-size: 26px;
}

.content > h4 {
  font-size: 20px;
}

.content > h5 {
  font-size: 16px;
}

.content > h6 {
  font-size: 14px;
}

.post-prev-next {
  display: flex;
  justify-content: space-between;
}

.post-prev-next > a {
  width: 50%;
  color: var(--black-4);
  text-decoration: none;
}

.post-prev-next > a:hover {
  color: var(--black-2);
}

.post-prev-next > a > div {
  display: flex;
}

.post-prev-next .text {
  display: flex;
  flex-direction: column;
}

.post-prev-next .prev > div {
  justify-content: flex-end;
  text-align: right;
}

.post-prev-next .prev .text {
  align-items: flex-end;
}

.post-prev-next .text * {
  margin: 0;
}

.post-prev-next .text .label {
  margin-bottom: 4px;
  color: var(--grey);
}
