/* 文章详情区域样式 */
.articaldetail-container,#comments-section {
    background-color: #fff; /* 设置文章详情区域的背景颜色 */
    padding: 1px 10px; /* 添加内边距 */
    border-radius: 8px; /* 圆角效果 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
}
.articaldetail-container{
    margin: 15px 0 25px; /* 与上方内容的间距 */
}
#comments-section{
    margin: 15px 0 40px;
}



/* Markdown 标签内容优化 */
.markdown-body {
    line-height: 1.8em; /* 行高 */
    font-size: 14px; /* 字体大小*/
    padding:5px 10px; /* 内边距 */
    border-radius: 5px; /* 边角处理 */
}

/* 标题样式 */
.markdown-body h1 {
    margin: 0.5em 0 0.5em;
    font-weight: bold;
    font-size: 1.4em;
    padding: 0.4em 0 0 0;
}

.markdown-body h2 {
    padding: 0.5em 0;
    font-size: 1.2em; /* 原为 1.5em，减小 2号 */
}

.markdown-body h3 {
    padding: 0.5em 0;
    font-size: 1em; /* 原为 1.2em，减小 2号 */
}
.markdown-body h4 {
    padding: 0.5em 0;
    font-size: 0.9em; /* 原为 1.2em，减小 2号 */
}

.markdown-body .blockquote p{
    line-height: 1em;
}

.markdown-body p {
    line-height: 2.5em; /* 行高 */
    margin: 0.5em 0; /* 外边距 */
}

.markdown-body blockquote p {
    line-height: 2em; /* 行高 */
    margin: 0.5em 0; /* 外边距 */
}

/* 列表样式 */
.markdown-body ul, .markdown-body ol {
    margin: 0.5em 0; /* 外边距 */
    padding-left: 1.5em; /* 左填充，缩进列表 */
}

/* 列表样式 */
.markdown-body ul li, .markdown-body ol li{
    list-style: disc; /* 设定默认圆点样式 */
}

/* 块引用样式 */
.markdown-body blockquote {
    border-left: 4px solid #ddd; /* 左侧边框 */
    padding: 0.5em 1em; /* 内填充 */
    color: #444; /* 文字颜色 */
    background-color: #f9f9f9; /* 背景颜色 */
    margin: 1em 0; /* 外边距 */
    border-radius: 3px;
}


.theme-selector {
    display: none; /* 默认隐藏 */
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
}

.markdown-body pre:hover .theme-selector {
    display: block; /* 鼠标悬停时显示 */
}
/* 代码块样式 */
.markdown-body pre {
    margin: 0.5em 0;
    background-color: #f5f5f5; /* 背景颜色 */
    border: 1px solid #ddd; /* 边框 */
    /*padding: 0.8em;  内填充，减小 */
    overflow-x: auto; /* 超出部分可滚动 */
    /*color: #444;*/
    border-radius: 4px; /* 边角处理 */
    white-space: pre;
}
pre code.hljs {
    display: block;
    overflow-x: auto;
    padding: 1em;
}


/* 代码行样式 */
/* .markdown-body pre code{
    color: #585453;
} */
.markdown-body p code, .markdown-body li code {
        border: 1px solid #ddd;
        background: #FDF4F4;
        padding: 3px;
        border-radius: 3px;
        font-size: 14px;
        color: #c0341d;
}

/* 链接样式 */
.markdown-body a {
    color: #2b7ce9; /* 链接颜色 */
    text-decoration: none; /* 去掉下划线 */
}

.markdown-body a:hover {
    text-decoration: underline; /* 悬停时下划线 */
}

/* 图片样式 */
.markdown-body img {
    max-width: 100%; /* 图像最大宽度 */
    height: auto; /* 高度自适应 */
    border-radius: 6px;
}

/* 表格样式 */
.markdown-body table {
    width: 100%; /* 表格宽度 */
    border-collapse: collapse; /* 边框合并 */
    margin: 1em 0; /* 外边距 */
}

.markdown-body th, .markdown-body td {
    border: 1px solid #ddd; /* 边框样式 */
    padding: 7px; /* 内填充，减小 */
    text-align: left; /* 左对齐 */
}

.markdown-body th {
    background-color: #f2f2f2; /* 表头背景 */
}

.password_verified_title{
    margin-top: 40px;
    color: var(--main-color);
}

.marginbtm{
    margin-bottom: 60px;
}

.title-container{
    display: flex;
    align-items: center;
    background: #fff;
    margin-top: 20px;
    min-height: 50px;
    line-height: 50px;
    text-align: left;
    padding: 0 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
/* 文章标题样式 */
.articaldetail-title {
    color: var(--main-color); /* 设置标题的颜色 */
    font-size: 1.6em; /* 设置标题的字体大小，减小 1 号 */
    font-weight: bold; /* 设置标题为加粗 */  
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%; /* 设置最大宽度，确保超过时显示省略号 */
}

.layui-row {
    overflow: visible; /* 确保 sticky 能正常工作 */
}

/* 文章导航样式 */
.article-nav {
    background-color: #FFF;
    padding: 10px 0px;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    width: 252px;
    max-height: calc(100vh - 150px);
    position: fixed;
    top: 60px;
    z-index: 999;
    overflow: hidden;
}



/* 文章目录标题样式 */
.article-nav h2{
    font-size: 1.5em; /* 标题字体大小 */
    color: var(--main-color); /* 标题颜色 */
    padding: 0 0 10px 10px; /* 底部外边距 */
}

#comments-section h2{
    font-size: 1.5em; /* 标题字体大小 */
    color: var(--main-color); /* 标题颜色 */
    padding: 10px 0; /* 底部外边距 */
    margin-bottom: 30px;

}
#comments-section h3{
    font-size: 1.1em; /* 标题字体大小 */
    margin-top: 30px;
}
.site-title div {
    position: relative;
    display: inline-block;
}

canvas { 
    display: none; /* 默认隐藏二维码 */
    position: absolute;
    top: 61px;
    left: 1px;
    padding: 8px;
    border: 1px solid #ddd;
    background: #f9f9f9;
}
.qr-container::before {
    display: none; /* 默认隐藏三角形 */
    content: '';
    position: absolute;
    top:52px;
    left: 20px;   /* 根据需要调整位置 */
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #f9f9f9; /* 与二维码背景色相同 */
    z-index: 2; /* 确保三角形在二维码前面 */
}
.qr-container.hover::before {
    display: block; /* 或者使用其它合适的方法使其显示 */
}

.fontsizi19{
    font-size: 19px;
}
/* 目录列表样式 */
.article-nav ul {
    list-style: none;
    padding: 0;
    margin-right: -11px;
    overflow: hidden;
    overflow-y: scroll;
    height: max-content;
    max-height: calc(100vh - 215px);
}

/* 目录项样式 */
.article-nav ul li {
    padding: 0 10px; /* 项目间距 */
    border-left: 1px solid #FFF;
}

/* 目录链接样式 */
.article-nav ul li a {
    text-decoration: none; /* 去掉下划线 */
    color: #333; /* 链接颜色 */
    font-weight: normal; /* 默认字体粗细 */
    transition: color 0.3s; /* 悬停时颜色平滑过渡 */
    display: block; /* 使链接块级显示 */
    white-space: nowrap; /* 防止换行 */
    overflow: hidden; /* 隐藏溢出部分 */
    text-overflow: ellipsis; /* 添加省略号 */
    max-width: 100%; /* 设置最大宽度，确保超过时显示省略号 */
    padding: 6px 0;
}

.article-nav ul li:hover {
    background-color: #f2f2f2; /* 鼠标悬停时背景颜色 */
    border-left: 1px solid var(--main-color); /* 左侧边框 */
}

.article-nav ul .active {
    background-color: #f2f2f2; /* 鼠标悬停时背景颜色 */
    border-left: 1px solid var(--main-color); /* 左侧边框 */
}
.back-to-list{
    padding: 20px 0;
}

.back-to-list a{
    position: relative;
    z-index: 1000;
    color: var(--main-color); /* 链接颜色 */
}

.article-footer{
    margin: 20px 8px 30px 8px;
    height: 45px;
    line-height: 45px;
}
.Donate{
    border-radius: 20px;
    border:none;
}

.comment-submit{
    position: absolute;
    right: 0;
    bottom: 0px;
}

.no-comments{
    padding: 20px 0;
    text-align: center;
    color: #888;
}
.comment-item {
    border-radius: 3px;
    padding: 10px;
    margin: 10px 0;
}
.comment-item{
    display: flex;
    position: relative;
}
.comment-item:not(:last-child) {
    border-bottom: 1px solid #eee; /* 仅在每个回复项之间添加分隔线 */
}
.reply-item{
    display: flex;
    padding: 10px;
    position: relative;
    background-color: #f9f9f9;
    border-radius: 3px;
}
/* .reply-item:not(:last-child) {
    border-bottom: 1px solid #eee; /* 仅在每个回复项之间添加分隔线 */

.reply-link{
    display: none;
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
    font-size: 12px;
}
.reply-link-2{
    display: none;
    position: absolute;
    right: 0px;
    top: 10px;
    cursor: pointer;
    font-size: 12px;
}
.comment-body,.reply-body{
    flex:1;
}
.comment-item:hover .reply-link{
    display: block;
}

.comment-item:hover .reply-link-2{
    display: block;
}

.comment-header, .reply-header {
    font-weight: bold;
    color: #333;
}
.comment-time,.reply-time{
    font-size: 12px;
    font-weight: lighter;
}
.comment-time{
    padding:8px 0 0 0;
}
.reply-time{
    padding:3px 0;
}
.comment-avatar{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.reply-avatar{
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.comment-content, .reply-content {
    padding: 15px 0;
    color: #333;
}
.comment-body .reply-item:before {
    position: absolute;
    left: 15px;
    top: -17px;
    border: 9px solid transparent;
    border-bottom: 10px solid #f8f8f8;
    content: "";
}
.comment-time, .reply-time, .comment-platform {
    font-size: 0.9em;
    color: #999;
}
.submit-emoji{
    cursor: pointer;
    padding: 0 10px;
}
.submit-emoji .layui-icon,.submit-file .layui-icon{
    font-size: 17px !important;
}
.submit-file{
    cursor: pointer;
}
.ttp-comment-input .submit-emoji-panel {
    display: none;
    max-width: 910px;
    border-radius: 8px;
    background: #fff;
    -webkit-box-shadow: 0 10px 50px 0 rgba(54, 56, 79, .12);
    box-shadow: 0 10px 50px 0 rgba(54, 56, 79, .12);
    text-align: left;
    overflow: hidden;
    position: absolute;
    left: 0;
    top: 104px;
    z-index: 10;
}
.ttp-comment-input .submit-emoji-list {
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.ttp-comment-input .submit-emoji-item {
    width: 28px;
    height: 28px;
    background: no-repeat 50% / contain;
    cursor: pointer;
}
.ttp-comment-input .submit-emoji-title {
    font-size: 12px;
    font-weight: 400;
    line-height: 12px;
    color: #999;
    margin-bottom: -4px;
}
.ttp-comment-input .submit-emoji-panel ul {
    padding: 0px 0 16px 16px;
    margin-right: -12px;
    height: 268px;
    overflow-y: scroll;
}
.ttp-comment-input .submit-emoji-list>li {
    display: inline-block;
    margin-top: 16px;
    width: 47px;
    list-style: none;
}
.emoji-icon {
    display: inline-block;
    width: 20px; /* 自定义图标大小 */
    height: 20px; /* 自定义图标大小 */
    background-size: contain; /* 确保背景图不失真 */
    margin-right: 5px; /* 添加图标之间的间距 */
    vertical-align: middle; /* 垂直居中图标 */
}
.comment-word-aux{
    height: 30px;
    line-height: 30px;
    position: absolute;
    left: 0px;
    top: -31px;
    right: 0px;
    background: #f9f9f9;
    border-left: 1px solid #eee;
    border-top: 1px solid #eee;
    border-right: 1px solid #eee;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    display: flex;
}
.comment-img{
    max-width: 100%;
    height: auto;
    margin-top: 10px;
    border-radius: 6px;
}
.comment-link{
    display: flex;
    padding: 10px 0 0 10px;
    color: #444;
    font-size: 15px;
    font-weight: 700;
}
.comment-link:hover{
    color: var(--main-color);
}
.mr{
    margin-right: 6px;
}

/* 自定义右键菜单样式 */
.custom-context-menu {
    position: absolute;
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    border-radius: 4px;
    min-width: 150px;
}

.custom-context-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.custom-context-menu li {
    padding: 8px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.custom-context-menu li:hover {
    background-color: #f5f5f5;
}

.custom-context-menu li:last-child {
    border-bottom: none;
}
.fullscreenRead{
    margin-left: 30px;
    font-size: 14px;
    color: #999;
}


@media screen and (min-width: 993.98px) {
    .layui-col-md9 {
        width: 80%;
    }
    .layui-col-md3 {
        width: 20%;
    }
}

@media (max-width: 993.98px) {
    #article-navigation{
        display: none;
    }
   .articaldetail-title {
        font-size: 1.21em; /* 设置标题的字体大小，减小 1 号 */
        white-space: inherit;
        line-height: normal;
    }
    .markdown-body h1 {
        font-size: 1.2em; 
    }
    .markdown-body h2 {
        font-size: 1.15em; 
    }
    .article-file,.article-lm {
        font-size: 13px;
    }
    .article-file .layui-icon,.article-lm .layui-icon{
        font-size: 13px;
    }
    .Donate{
        height: 28px;
        line-height: 28px;
        width: 50px;
        padding: 0;
        font-size: 13.5px;
    }
    .articaldetail-container {
        padding: 1px !important;
    }
    .comment-avatar {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        margin-right: 10px;
    }
    .reply-avatar {
        width: 25px;
        height: 25px;
        border-radius: 50%;
        margin-right: 10px;
    }
    #comments-section h2 {
        font-size: 1.2em;
    }
    .fontsizi19 {
        font-size: 16px;
    }
    .comment-time {
        padding: 3px 0 0 0;
    }
    .comment-item {
        border-radius: 3px;
        padding: 10px 5px;
        margin: 10px 0;
    }
    .comment-submit {
       padding: 0 8px;
       font-size: 12px;
    }
    .comment-content, .reply-content {
        padding: 10px 0;
        color: #333;
    }
}

