/* ========================================
   参考 leviduan.github.io 的样式配置
   ======================================== */

/* 黑暗模式颜色 - 参考旧博客 */
body.dark-theme,
[data-theme=dark] body {
    background-color: #494f5c !important;
    color: #e8eef2 !important;
}

/* 表格样式 - 通用 */
table {
    border-collapse: collapse;
    width: 100%;
}

table th,
table td {
    border: 1px solid #dcdcdc !important;
    padding: 8px 12px;
}

table th {
    background-color: #f5f5f5 !important;
}

table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.03) !important;
}

/* 黑暗模式下的表格样式 */
.dark-theme table th,
.dark-theme table td,
[data-theme=dark] table th,
[data-theme=dark] table td {
    border: 1px solid #6b7280 !important;
    color: #e8eef2 !important;
}

.dark-theme table th,
[data-theme=dark] table th {
    background-color: #3b3d42 !important;
}

.dark-theme table tr:nth-child(even),
[data-theme=dark] table tr:nth-child(even) {
    background-color: rgba(59, 61, 66, 0.5) !important;
}

/* 黑暗模式下的分割线 */
.dark-theme hr,
[data-theme=dark] hr {
    background: #6b7280 !important;
    height: 1px !important;
}

/* Title Font - Homepage Main Title (参考旧网站 .siteTitle) */
.content-center h1 {
    font-family: Zapfino, "trebuchet ms", sans-serif !important;
    font-size: 26px !important;
    color: inherit !important;
}

/* Subtitle Font (Home Page) */
.content-center main p {
    font-family: HelveticaNeue, "trebuchet ms", Verdana, "verdana ref", "segoe ui", Candara, "lucida grande", "lucida sans unicode", "lucida sans", Tahoma, sans-serif !important;
    font-size: 1rem !important;
    color: inherit !important;
}

/* Footer 字体大小 */
.footer__content {
    font-size: 0.9rem !important;
}

/* h2 标题边距 - 参考旧博客 */
h2 {
    margin-block-start: 0.83em !important;
    margin-block-end: 0.83em !important;
}

/* 移除代码块边框和阴影 - 所有主题模式 */
pre[class*="language-"],
[data-theme=dark] pre[class*="language-"],
[data-theme=light] pre[class*="language-"] {
    border: none !important;
    box-shadow: none !important;
}

:not(pre) > code[class*="language-"],
[data-theme=dark] :not(pre) > code[class*="language-"],
[data-theme=light] :not(pre) > code[class*="language-"] {
    border: none !important;
    box-shadow: none !important;
}

/* 额外确保 pre 和 code 标签无边框 */
pre, code {
    border: none !important;
    box-shadow: none !important;
}

/* 代码字体 - 参考旧博客 */
code,
pre code,
code[class*="language-"],
pre[class*="language-"] {
    font-family: Monaco, 'Andale Mono', 'Ubuntu Mono', monospace !important;
}

/* Logo 字体 - 参考旧博客 */
.logo {
    font-family: monospace, monospace !important;
}

/* 文章内容字体 - 参考旧博客 */
body,
.content,
.post-content,
.post-content p,
.post-content li,
.post-content blockquote,
article,
article p {
    font-family: HelveticaNeue, "trebuchet ms", Verdana, "verdana ref", "segoe ui", Candara, "lucida grande", "lucida sans unicode", "lucida sans", Tahoma, sans-serif !important;
    line-height: 1.8 !important;
    font-weight: 400 !important;
}

/* 标题字体加粗 */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-family: HelveticaNeue, "trebuchet ms", Verdana, "verdana ref", "segoe ui", Candara, "lucida grande", "lucida sans unicode", "lucida sans", Tahoma, sans-serif !important;
    font-weight: bold !important;
}

/* Disqus 评论区样式 - 移除背景色让 Disqus 自己控制 */
#comments {
    margin-top: 2rem;
    padding: 0;
    background: transparent !important;
}

/* 黑暗模式下的 Disqus 评论区 */
.dark-theme #comments,
[data-theme=dark] #comments {
    background: transparent !important;
    border: none !important;
}

/* Disqus iframe 容器 */
#disqus_thread {
    background: transparent !important;
}

.dark-theme #disqus_thread,
[data-theme=dark] #disqus_thread {
    color-scheme: dark !important;
    background: transparent !important;
}
