/* 优化Markdown渲染效果 */

/* 1. 行内代码样式优化 - 去掉突兀的底色，使用主题色底纹 */
#article-container code:not(pre code),
.post-content code:not(pre code),
.content code:not(pre code) {
  background-color: rgba(56, 163, 135, 0.1) !important;
  color: var(--anzhiyu-fontcolor) !important;
  padding: 2px 4px !important;
  border-radius: 3px !important;
  font-size: 0.9em !important;
  border: none !important;
}



/* 2. 正文字体优化 - 使用更细的字体，增加字间距 */
#article-container p,
#article-container li,
#article-container blockquote {
  font-weight: 330 !important;
  letter-spacing: 0.5px !important;
  line-height: 1.8 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Lato, Roboto, "PingFang SC", "Microsoft JhengHei", "Microsoft YaHei", sans-serif !important;
}

/* 3. 代码块字体大小优化 */
#article-container pre code,
#article-container .highlight code,
#article-container figure.highlight code,
.highlight-container pre code,
pre code {
  font-size: 13px !important;
  line-height: 1.6 !important;
}

/* 代码块容器整体优化 */
#article-container pre,
#article-container .highlight,
#article-container figure.highlight {
  font-size: 13px !important;
}

/* 特定代码高亮主题的优化 */
.highlight table td pre,
.highlight table td code {
  font-size: 13px !important;
  line-height: 1.6 !important;
}

/* 表格中的代码块也要优化 */
#article-container table code:not(pre code),
.post-content table code:not(pre code),
.content table code:not(pre code) {
  background-color: rgba(56, 163, 135, 0.08) !important;
  color: var(--anzhiyu-fontcolor) !important;
  padding: 1px 3px !important;
  font-size: 0.85em !important;
}

/* 标题字体优化 */
#article-container h1,
#article-container h2,
#article-container h3,
#article-container h4,
#article-container h5,
#article-container h6 {
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
}

/* 引用块优化 */
#article-container blockquote {
  border-left: 4px solid rgba(56, 163, 135, 0.6) !important;
  background-color: rgba(56, 163, 135, 0.05) !important;
  padding: 16px 20px !important;
  margin: 20px 0 !important;
}

/* 表格样式优化 */
#article-container table {
  font-size: 14px !important;
  line-height: 1.6 !important;
}

#article-container table th {
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
}

/* 列表样式优化 */
#article-container ul,
#article-container ol {
  padding-left: 20px !important;
}

#article-container li {
  margin-bottom: 8px !important;
}

/* 额外的代码块字
体优化 - 覆盖主题默认样式 */
.hljs,
.hljs code,
code[class*="language-"],
pre[class*="language-"] code {
  font-size: 13px !important;
  line-height: 1.6 !important;
}

/* 针对AnZhiYu主题的代码块优化 */
#article-container .highlight-tools+table code,
#article-container .highlight-tools+.code-container code,
#article-container .code-container pre code {
  font-size: 13px !important;
  line-height: 1.6 !important;
}

/* 确保所有代码相关元素都使用统一字体大小 */
*[class*="highlight"] code,
*[class*="code"] code,
.gutter pre,
.code pre {
  font-size: 13px !important;
  line-height: 1.6 !important;
}

/*
 移动端隐藏标题右侧的链接图标 */
@media screen and (max-width: 768px) {

  #article-container h1 .headerlink,
  #article-container h2 .headerlink,
  #article-container h3 .headerlink,
  #article-container h4 .headerlink,
  #article-container h5 .headerlink,
  #article-container h6 .headerlink,
  .headerlink,
  .anchor {
    display: none !important;
  }

  /* 确保标题在移动端有足够的空间 */
  #article-container h1,
  #article-container h2,
  #article-container h3,
  #article-container h4,
  #article-container h5,
  #article-container h6 {
    padding-right: 0 !important;
    margin-right: 0 !important;
  }
}

/* 移动端缩
减标题区域高度 */
@media screen and (max-width: 768px) {

  /* 只在文章页面缩减头部图片/背景区域高度 - 保留三分之二高度 */
  .post #page-header,
  .post .top-img,
  .post #post-info {
    min-height: 320px !important;
    height: 320px !important;
  }

  /* 只在文章页面调整标题容器的内边距和居中 - 考虑导航条高度 */
  .post #post-info {
    padding: 45px 15px 15px 15px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    height: 100% !important;
    /* 通过transform向下偏移，补偿导航条占用的空间 */
    transform: translateY(15px) !important;
  }

  /* 只在文章页面确保标题和元信息垂直居中 */
  .post #post-info .post-title,
  .post #post-info #post-meta {
    margin: 0 !important;
  }

  .post #post-info .post-title {
    margin-bottom: 15px !important;
  }

  /* 只在文章页面优化标题文字大小和间距 */
  .post #post-info h1.post-title {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
    margin-bottom: 10px !important;
  }

  /* 优化元信息区域 
  #post-meta {
    margin-top: 8px !important;
    font-size: 0.85rem !important;
  }
  
 缩减标签区域间距 
  .post-meta-tags {
    margin-top: 8px !important;
  }
  
  .post-meta-tags .post-meta-tag {
    margin: 2px 4px 2px 0 !important;
    padding: 2px 8px !important;
    font-size: 0.8rem !important;
  }*/
}

/* 移动端主
页文章列表卡片标题字体优化 */
.recent-post-item .post-title,
.recent-post-item h3.post-title,
.recent-post-item .recent-post-info .article-title,
#recent-posts .recent-post-item .post-title {
  font-size: 1.0rem !important;
  line-height: 1.5 !important;
  font-weight: 500 !important;
}

/* 确保文章卡片有足够的高度来容纳标题 */
.recent-post-item {
  min-height: auto !important;
}

/* 优化文章卡片的内边距 */
.recent-post-item .recent-post-info {
  padding: 6px 6px !important;
}


/* 直接在卡片底部添加作者信息 */
.card-widget.card-info::after {
  content: "心有暖阳，无惧风霜" !important;
  position: absolute !important;
  bottom: 60px !important;
  left: 50% !important; 
  transform: translateX(-50%) !important;
  text-align: center !important;
  width: 190px !important; 
  color: rgb(238, 238, 238) !important;
  font-size: 15px !important;
  background: rgba(223, 223, 223, 0.12) !important; 
  padding: 10px !important;
  border-radius: 6px !important;
  z-index: 1000 !important;
}