/* 文章详情页相关样式 */

/* 文章详情页样式 */
.post-detail-title {
  font-size: 28px;
  margin-bottom: 10px;
  text-align: center;
  font-family: 'Noto Serif SC', "华文中宋", "STZhongsong", serif;
  font-weight: 900; /* heavy字重 */
}

.post-detail-meta {
  font-size: var(--font-size-sm);
  color: #999999;
  text-align: center;
  margin-bottom: 30px;
  border-bottom: var(--border-width) solid var(--light-color);
  padding-bottom: 10px;
  max-width: 800px;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.post-detail-container {
  display: flex;
  gap: 30px;
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
  justify-content: center;
  width: 100%;
}

.content-container {
  max-width: 1050px !important;
}

/* 目录导航 */
.toc-container {
  width: 250px;
  position: fixed;
  left: 50px;
  top: 100px;
  height: fit-content;
  border: var(--border-width) solid var(--light-color);
  border-radius: var(--border-radius);
  padding: 20px;
  background-color: var(--background-color);
}

.toc-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: var(--border-width) solid var(--light-color);
}

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

.toc-item {
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.toc-item a {
  color: #999;
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: var(--cursor-click);
}

.toc-item a:hover {
  color: var(--secondary-color);
  background-color: rgba(153, 153, 153, 0.1);
}

.toc-item.active a {
  color: var(--text-color);
  font-weight: bold;
  background-color: rgba(153, 153, 153, 0.1);
}

/* 目录层级缩进 */
.toc-level-2 {
  padding-left: 15px;
}

.toc-level-3 {
  padding-left: 30px;
}

/* 顶部和底部跳转 */
.toc-top,
.toc-bottom {
  margin: 10px 0;
  font-weight: bold;
}

.toc-top a,
.toc-bottom a {
  color: var(--secondary-color) !important;
}

/* 博文内容 */
.post-detail {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.post-detail-content {
  font-size: var(--font-size-base);
  line-height: 1.7;
  font-family: 'Noto Serif SC', "SimSun", serif;
  font-weight: 400; /* regular字重 */
  max-width: 800px;
  margin: 0 auto;
  text-align: justify;
}

.post-detail-content p {
  margin-bottom: 10pt !important;
  text-indent: 0 !important;
  padding-left: 1em !important;
}

/* 响应式适配 */
@media (max-width: 992px) {
  .post-detail-container {
    flex-direction: column;
    padding: 0 !important;
  }
  
  .toc-container {
    display: none;
  }
  
  /* 移动端文章内容 */
  .post-detail-content {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* 移动端标题样式 */
  .post-detail-content h1,
  .post-detail-content h2,
  .post-detail-content h3 {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
  
  /* 移动端侧边栏目录 */
  .mobile-toc {
    display: block;
  }
}