body {
    font-family: "Songti SC", /* macOS 首选 */ "SimSun", /* Windows 备用 */ "Noto Serif SC", /* Android/现代系统 */ "Georgia", /* 英文首选 */ "Times New Roman", /* 英文备用 */ serif; /* 最终回退 */

}

/* 用于文章列表 */
/* 分类列表 */
#category-list .list-group-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#category-list .list-group-item:hover {
    background-color: #f8f9fa;
}

#category-list .list-group-item.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* 文章卡片 */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
}

.card img {
    object-fit: cover;
    height: 150px;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.card-title a {
    transition: color 0.2s;
}

.card-title a:hover {
    color: #007bff;
}

.card-text {
    color: #333;
}

.tags .badge {
    font-size: 0.8rem;
}

/* 分页 */
.pagination .page-link {
    color: #007bff;
    border-radius: 0.25rem;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

/* 搜索框 */
#search-form {
    max-width: 500px;
    margin: 0 30px;
}

#search-input {
    border-radius: 0.25rem 0 0 0.25rem;
}

#search-form .btn {
    border-radius: 0 0.25rem 0.25rem 0;
}

/* 以上用于文章列表 */

/* 响应式 */
@media (max-width: 767.98px) {
    html {
        font-size: 70%;
    }

    header {
        padding-top: 1.4rem;
    }

    #category-list {
        margin-bottom: 1.5rem;
    }

    .card img {
        height: 120px;
    }
}

/* 文章封面图样式 */
/*.post-cover-image {*/
/*    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);*/
/*    transition: transform 0.3s ease;*/
/*    border-radius: 0.5rem;*/
/*}*/

/*.post-cover-image:hover {*/
/*    transform: scale(1.02);*/
/*}*/

/*@media (max-width: 768px) {*/
/*    .post-cover-image {*/
/*        max-height: 200px !important;*/
/*    }*/
/*}*/

/* 基础代码块容器 */
.code-block-container {
    position: relative;
    margin: 1.5rem 0;
    padding: 0;
    border-radius: 8px;
    /*overflow: hidden;*/
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-family: 'Fira Code', monospace;
    opacity: 0;
    transform: translateY(10px);
    animation: slideIn 0.3s ease forwards;
}

/* 代码头部 */
.code-header {
    display: flex;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #495057;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

.code-lang {
    /*font-family: inherit;*/
    font-weight: bold;
    text-transform: uppercase;
    color: #6c757d;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* 语言特定的图标和颜色 */
.lang-python .code-lang {
    color: #3776ab;
}

.lang-python .code-lang::before {
    content: "🐍 ";
}

.lang-javascript .code-lang,
.lang-js .code-lang {
    color: #999;
}

.lang-javascript .code-lang::before,
.lang-js .code-lang::before {
    content: "⚡ ";
}

.lang-html .code-lang {
    color: #e34f26;
}

.lang-html .code-lang::before {
    content: "🌐 ";
}

.lang-css .code-lang {
    color: #1572b6;
}

.lang-css .code-lang::before {
    content: "🎨 ";
}

.lang-json .code-lang {
    color: #000000;
}

.lang-json .code-lang::before {
    content: "📄 ";
}

/* 复制按钮 */
.copy-btn {
    background: #5c636a;
    border: none;
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.copy-btn:hover:not(:disabled) {
    background: #5c636a;
    color: black;
    transform: translateY(-1px);
}

.copy-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.copy-btn:active {
    transform: translateY(0);
}

/* codehilite 样式 */
.codehilite {
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 1rem 1.25rem;
    margin: 0;
    background: #ffffff !important;
    overflow-x: auto;
    color: #333;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.codehilite pre {
    margin: 0;
    background: none !important;
    border: none;
    padding: 0;
    font-family: inherit;
}

.codehilite code {
    background: none !important;
    padding: 0;
    border: none;
    font-family: inherit;
    color: inherit;
    font-size: inherit;
}

/* Pygments 语法高亮样式 */
.codehilite .hll {
    background-color: #ffffcc
}

.codehilite .c {
    color: #008000
}

/* Comment */
.codehilite .err {
    border: 1px solid #FF0000
}

/* Error */
.codehilite .k {
    color: #0000ff
}

/* Keyword */
.codehilite .o {
    color: #666666
}

/* Operator */
.codehilite .ch {
    color: #008000
}

/* Comment.Hashbang */
.codehilite .cm {
    color: #008000
}

/* Comment.Multiline */
.codehilite .cp {
    color: #0000ff
}

/* Comment.Preproc */
.codehilite .cpf {
    color: #008000
}

/* Comment.PreprocFile */
.codehilite .c1 {
    color: #008000
}

/* Comment.Single */
.codehilite .cs {
    color: #008000
}

/* Comment.Special */
.codehilite .gd {
    color: #A00000
}

/* Generic.Deleted */
.codehilite .ge {
    font-style: italic
}

/* Generic.Emph */
.codehilite .gr {
    color: #FF0000
}

/* Generic.Error */
.codehilite .gh {
    color: #000080;
    font-weight: bold
}

/* Generic.Heading */
.codehilite .gi {
    color: #00A000
}

/* Generic.Inserted */
.codehilite .go {
    color: #888888
}

/* Generic.Output */
.codehilite .gp {
    color: #000080;
    font-weight: bold
}

/* Generic.Prompt */
.codehilite .gs {
    font-weight: bold
}

/* Generic.Strong */
.codehilite .gu {
    color: #800080;
    font-weight: bold
}

/* Generic.Subheading */
.codehilite .gt {
    color: #0044DD
}

/* Generic.Traceback */
.codehilite .kc {
    color: #0000ff
}

/* Keyword.Constant */
.codehilite .kd {
    color: #0000ff
}

/* Keyword.Declaration */
.codehilite .kn {
    color: #0000ff
}

/* Keyword.Namespace */
.codehilite .kp {
    color: #0000ff
}

/* Keyword.Pseudo */
.codehilite .kr {
    color: #0000ff
}

/* Keyword.Reserved */
.codehilite .kt {
    color: #2b91af
}

/* Keyword.Type */
.codehilite .m {
    color: #666666
}

/* Literal.Number */
.codehilite .s {
    color: #a31515
}

/* Literal.String */
.codehilite .na {
    color: #FF0000
}

/* Name.Attribute */
.codehilite .nb {
    color: #0000ff
}

/* Name.Builtin */
.codehilite .nc {
    color: #2b91af
}

/* Name.Class */
.codehilite .no {
    color: #2b91af
}

/* Name.Constant */
.codehilite .nd {
    color: #2b91af
}

/* Name.Decorator */
.codehilite .ni {
    color: #999999
}

/* Name.Entity */
.codehilite .ne {
    color: #2b91af
}

/* Name.Exception */
.codehilite .nf {
    color: #000000
}

/* Name.Function */
.codehilite .nl {
    color: #2b91af
}

/* Name.Label */
.codehilite .nn {
    color: #2b91af
}

/* Name.Namespace */
.codehilite .nt {
    color: #800000
}

/* Name.Tag */
.codehilite .nv {
    color: #2b91af
}

/* Name.Variable */
.codehilite .ow {
    color: #0000ff
}

/* Operator.Word */
.codehilite .w {
    color: #bbbbbb
}

/* Text.Whitespace */
.codehilite .mb {
    color: #666666
}

/* Literal.Number.Bin */
.codehilite .mf {
    color: #666666
}

/* Literal.Number.Float */
.codehilite .mh {
    color: #666666
}

/* Literal.Number.Hex */
.codehilite .mi {
    color: #666666
}

/* Literal.Number.Integer */
.codehilite .mo {
    color: #666666
}

/* Literal.Number.Oct */
.codehilite .sa {
    color: #a31515
}

/* Literal.String.Affix */
.codehilite .sb {
    color: #a31515
}

/* Literal.String.Backtick */
.codehilite .sc {
    color: #a31515
}

/* Literal.String.Char */
.codehilite .dl {
    color: #a31515
}

/* Literal.String.Delimiter */
.codehilite .sd {
    color: #a31515
}

/* Literal.String.Doc */
.codehilite .s2 {
    color: #a31515
}

/* Literal.String.Double */
.codehilite .se {
    color: #a31515
}

/* Literal.String.Escape */
.codehilite .sh {
    color: #a31515
}

/* Literal.String.Heredoc */
.codehilite .si {
    color: #a31515
}

/* Literal.String.Interpol */
.codehilite .sx {
    color: #a31515
}

/* Literal.String.Other */
.codehilite .sr {
    color: #a31515
}

/* Literal.String.Regex */
.codehilite .s1 {
    color: #a31515
}

/* Literal.String.Single */
.codehilite .ss {
    color: #a31515
}

/* Literal.String.Symbol */
.codehilite .bp {
    color: #0000ff
}

/* Name.Builtin.Pseudo */
.codehilite .fm {
    color: #000000
}

/* Name.Function.Magic */
.codehilite .vc {
    color: #2b91af
}

/* Name.Variable.Class */
.codehilite .vg {
    color: #2b91af
}

/* Name.Variable.Global */
.codehilite .vi {
    color: #2b91af
}

/* Name.Variable.Instance */
.codehilite .vm {
    color: #2b91af
}

/* Name.Variable.Magic */
.codehilite .il {
    color: #666666
}

/* Literal.Number.Integer.Long */

/* 滚动条样式 */
.codehilite::-webkit-scrollbar {
    height: 8px;
}

.codehilite::-webkit-scrollbar-thumb {
    background-color: #ced4da;
    border-radius: 4px;
}

.codehilite::-webkit-scrollbar-thumb:hover {
    background-color: #adb5bd;
}

.codehilite::-webkit-scrollbar-track {
    background-color: #f8f9fa;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .code-block-container {
        margin: 1rem 0;
        border-radius: 4px;
    }

    .codehilite {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
    }

    .code-header {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }

    .copy-btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}

/* 代码块入场动画 */
.code-block-container {
    opacity: 0;
    transform: translateY(10px);
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 目录中的链接 */
.toc-container a {
    text-decoration: none; /* 移除下划线 */
    color: #ff5a00; /* 目录链接的颜色 */
}

/* 目录中的链接鼠标悬停样式 */
.toc-container a:hover {
    text-decoration: underline; /* 鼠标悬停时显示下划线 */
    color: #007bff; /* 鼠标悬停时的字体颜色 */
}

/* 移除目录中的列表项样式 */
.toc-container ul {
    list-style-type: none; /* 移除列表项的默认样式 */
}

/* 如果需要，可以为目录中的链接添加一些间距或样式 */
.toc-container li {
    margin-bottom: 5px; /* 添加一些间距 */
}

/* 文章标题中的链接 */
.article-content h1 a,
.article-content h2 a,
.article-content h3 a,
.article-content h4 a,
.article-content h5 a,
.article-content h6 a {
    text-decoration: none; /* 移除下划线 */
    color: inherit; /* 继承父元素的颜色 */
}

/* 文章标题颜色 */
.article-content h2 a {
    color: #FFA500;
}

.article-content h3 a,
.article-content h6 a {
    color: #0a53be;
}

.article-content h4 a {
    color: green;
}

/* 文章标题中的链接鼠标悬停样式 */
.article-content h1 a:hover,
.article-content h2 a:hover,
.article-content h3 a:hover,
.article-content h4 a:hover,
.article-content h5 a:hover,
.article-content h6 a:hover {
    text-decoration: underline; /* 鼠标悬停时显示下划线 */
    color: #007bff; /* 鼠标悬停时的字体颜色 */
}


/* 回到顶部的按钮 */
#back-to-top {
    position: fixed;
    bottom: 50%; /* 距离底部 50%，即垂直居中 */
    right: 20px; /* 距离右侧 20px */
    transform: translateY(50%); /* 垂直居中对齐 */
    z-index: 1000; /* 确保按钮在其他内容之上 */
    display: none; /* 默认不显示，通过 JavaScript 控制显示 */
    padding: 10px 15px; /* 按钮内边距 */
    font-size: 14px; /* 字体大小 */
    border-radius: 5px; /* 圆角 */
    cursor: pointer; /* 鼠标悬停时显示手型图标 */
}

#back-to-top:hover {
    background-color: #0056b3; /* 鼠标悬停时的背景颜色 */
}