/* 自定義樣式 - 解決關閉評論數量後間距問題 */

/* 圖片優化 - 減少 CLS（累積版面配置轉移） */
img {
  max-width: 100%;
  height: auto;
}

/* 為圖片容器提供背景色，減少 CLS */
.article-content img,
.card-widget img,
.comic-item-cover,
.author-info-avatar img {
  background: var(--anzhiyu-card-bg, #f6f8fa);
}

[data-theme="dark"] .article-content img,
[data-theme="dark"] .card-widget img,
[data-theme="dark"] .comic-item-cover,
[data-theme="dark"] .author-info-avatar img {
  background: var(--anzhiyu-card-bg, #1a1a1a);
}

/* 文章元數據區域間距調整 */
.post-meta {
  margin-bottom: 1.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* 文章內容與元數據的間距 */
.article-content {
  margin-top: 1.5rem !important;
}

/* 文章標題下方間距調整 */
.post-info {
  margin-bottom: 1.2rem !important;
  padding-bottom: 0.8rem !important;
}

/* 首頁文章卡片間距調整 */
.recent-post-item .article-meta {
  margin-bottom: 0.8rem !important;
}

/* 添加分隔線效果（可選） */
.post-meta::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: var(--anzhiyu-hr-color, rgba(0,0,0,0.1));
  margin-top: 0.5rem;
}

/* 深色模式下的分隔線 */
[data-theme="dark"] .post-meta::after {
  background: var(--anzhiyu-hr-color, rgba(255,255,255,0.1));
}

/* 移動端適配 */
@media screen and (max-width: 768px) {
  .post-meta {
    margin-bottom: 1rem !important;
    padding-bottom: 0.3rem !important;
  }

  .article-content {
    margin-top: 1rem !important;
  }
}

/* 文章目錄：移除未選中項目的模糊，只保留淡化層級感（原本的 blur 讓目錄像沒渲染完） */
#aside-content #card-toc .toc-content .toc-link:not(.active) {
  filter: none !important;
  opacity: 0.75;
}
#aside-content #card-toc .toc-content .toc-link:not(.active):hover {
  opacity: 1;
}