/* 面包屑导航 */
.breadcrumb {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-color);
    text-decoration: none;
}

.breadcrumb i {
    margin: 0 8px;
    font-size: 0.8rem;
}

.breadcrumb span {
    color: var(--primary-color);
}

.content-article{
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    margin: 80px auto 30px; 
    width: 100%;
    box-sizing: border-box;
}
/* 文章头部 */

.article-content{
    padding: 15px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}


.post-header {
    margin-bottom: 30px;
}

.post-header .post-categories {
    margin-bottom: 15px;
}

.post-header .post-categories a {
    background: rgba(124, 63, 204, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-right: 8px;
}

.post-header .post-title {
    font-size: 2rem;
    line-height: 1.4;
    margin-bottom: 15px;
    color: var(--text-color);
}

.post-header .post-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.post-header .post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-header .post-meta i {
    font-size: 1rem;
    opacity: 0.8;
}
.post-header .post-meta a{
    color: var(--text-secondary);
}

/* 文章特色图片 */
.post-thumbnail { 
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* 文章头部特色图片 */
.article-featured-image {
    margin-bottom: 30px;
    width: 100%;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* 文章内容区域 */
.content-wrap {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0 15px; 
}

.content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin: 0 auto 20px auto;
    box-sizing: border-box;
    width: 100%;
}

.content p {
    margin-bottom: 1em;
}

/* 文章内容图片居中显示 */
.content img {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* 图片悬停效果 */
.content img:hover {
    transform: translateY(-2px);
}

/* WordPress默认图片对齐类支持 */
.content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    clear: both;
}

.content .alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
}

.content .alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 10px;
}

.content .wp-caption {
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin-bottom: 20px;
}

.content .wp-caption img {
    margin-bottom: 5px;
    border-radius: 4px;
}

.content .wp-caption-text {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 5px;
    font-style: italic;
}

.content figure {
    text-align: center;
    margin: 1.5em auto;
}

.content figure img {
    display: inline-block;
}

.content figcaption {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-top: 8px;
    text-align: center;
    font-style: italic;
}

.content h2 {
    font-size: 1.8rem;
    margin: 2em 0 1em;
    color: var(--text-color);
}

.content h3 {
    font-size: 1.4rem;
    margin: 1.5em 0 1em;
    color: var(--text-color);
}



/* 默认样式 */
.content .heading-default-h2 { font-size: 1.8rem; color: var(--text-color); margin: 2em 0 1em; }
.content .heading-default-h3 { font-size: 1.4rem; color: var(--text-color); margin: 1.5em 0 1em; }

/* 样式1：左侧彩色竖线 */
.content .heading-style1-h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    border-left: 6px solid var(--primary-color);
    padding-left: 14px;
    margin: 2em 0 1em;
    background: none;
}
.content .heading-style1-h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
    margin: 1.5em 0 1em;
    background: none;
}

/* 样式2：左侧圆角色块 */
.content .heading-style2-h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    position: relative;
    padding-left: 22px;
    margin: 1em 0 1em;
}
.content .heading-style2-h2:before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 8px; height: 28px;
    background: var(--primary-color);
    border-radius: 4px;
}
.content .heading-style2-h3 {
    font-size: 1.4rem;
    color: var(--text-color);
    position: relative;
    padding-left: 18px;
    margin: 1.5em 0 1em;
}
.content .heading-style2-h3:before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 6px; height: 20px;
    background: var(--primary-color);
    border-radius: 3px;
}



.content .article-a {
    color: var(--primary-color);
    text-decoration: none;
    transition: border-color 0.3s;
    font-weight: 500;
    padding: 0 2px;
    border-bottom: 2px dotted var(--primary-color);
}
.content .article-a:hover {
    color: #fff;
    background: var(--primary-color);
    border-bottom: none;
    border-radius: 2px;
    padding: 4px 2px;
}

.content blockquote {
    margin: 2em 0;
    padding: 1em 2em;
    border-left: 4px solid var(--primary-color);
    background: rgba(124, 63, 204, 0.05);
    font-style: italic;
}

.content strong{
    color: var(--strong-color);
}

.content pre {
    position: relative;
    background: var(--code-bg-color);
    color: var(--code-text-color);
    padding: 1.5em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.content pre::before {
    content: '';
    display: block;
    height: 18px;
}

.content pre .code-dots {
    position: absolute;
    left: 16px;
    top: 10px;
    display: flex;
    gap: 7px;
    z-index: 2;
}

.content pre .code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.content pre .code-dot.red { background: #ff5f56; }
.content pre .code-dot.yellow { background: #ffbd2e; }
.content pre .code-dot.green { background: #27c93f; }

.content code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
}

.content .code-bg{
    background: rgb(240, 240, 240);
    color:  var(--primary-color);
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.content ul, .content ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

.content ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 0.5em;
}

.content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 20px;
    height: 20px;
    background-image: url('../images/itme.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.content ol li::before {
    content: counter(list-item) ". ";
    counter-increment: list-item;
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 文章底部 */
.post-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.post-tags {
    margin-bottom: 20px;
}

.post-tags i {
    color: var(--text-secondary);
    margin-right: 10px;
}

.post-tags a {
    background: rgba(124, 63, 204, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-right: 8px;
}

.post-share {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.post-share span {
    margin-right: 15px;
    color: var(--text-secondary);
}

.post-share a {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-right: 15px;
    transition: color 0.3s;
}

.post-share a:hover {
    color: var(--primary-color);
}

/* 文章导航 */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    padding: 0;
    border: none;
}

.nav-previous, .nav-next {
    flex: 0 0 48%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.nav-previous a, .nav-next a {
    display: block;
    padding: 20px;
    background: rgba(124, 63, 204, 0.05);
    position: relative;
    z-index: 1;
    height: 100%;
}

.nav-previous a:before, .nav-next a:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: -1;
    transition: opacity 0.3s;
}

.nav-previous a:hover:before, .nav-next a:hover:before {
    opacity: 0.15;
}

.nav-previous a:before {
    background-image: url('https://picsum.photos/400/200?grayscale&random=1');
}

.nav-next a:before {
    background-image: url('https://picsum.photos/400/200?grayscale&random=2');
}

.nav-subtitle {
    display: block;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.nav-title {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: bold;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-navigation a {
    text-decoration: none;
}

.post-navigation a:hover .nav-title {
    color: var(--primary-color);
}

/* 作者信息 */
.article-author-box {
    display: flex;
    gap: 20px;
    margin: 40px 0;
    padding: 30px;
    background: var(--secondary-bg);
    border-radius: 8px;
}

.author-avatar {
    flex-shrink: 0;
    position: relative;
}

.author-bg-img {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    object-fit: cover;
    z-index: 0; 
}
.author-card, .sidebar-author-card {
    position: relative;
    overflow: hidden;
}
.author-card > *, .sidebar-author-card > * {
    position: relative;
    z-index: 1;
}

.author-avatar img {
    width: 100%;
    height: 100%;  
    display: block; 
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.author-info {
    flex: 1;
}

.author-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.author-name {
    font-size: 1.2rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.author-name a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.author-name a:hover {
    color: var(--primary-color);
}

.author-role {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #fff;
    font-weight: normal;
}

.author-action {
    display: flex;
    gap: 10px;
}

.author-follow-btn,
.author-message-btn {
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.author-follow-btn {
    background-color: var(--primary-color);
    color: #fff;
}

.author-follow-btn:hover {
    background-color: #6a7bef;
    transform: translateY(-2px);
}

.author-message-btn {
    background-color: #f5f5f5;
    color: #666;
}

.author-message-btn:hover {
    background-color: #e8e8e8;
    transform: translateY(-2px);
}

.author-follow-btn.followed,
.follow-btn.followed {
    background: #e8e8e8;
    color: #666;
    border-color: #e8e8e8;
}

.author-follow-btn.following:before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.author-bio {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.author-social {
    display: flex;
    gap: 15px;
}

.author-social a {
    color: var(--text-color);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.author-social a:hover {
    color: var(--primary-color);
}

/* 评论区域 */
.comments-area {
    margin: 40px 0;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-color);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: 30px;
}

.comment-body {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-radius: 8px;
    background: var(--bg-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.children .comment-body {
    background: rgba(124, 63, 204, 0.03);
}

.comment-avatar {
    flex-shrink: 0;
    position: relative;
}

.comment-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-avatar .avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-avatar .avatar-placeholder i {
    font-size: 20px;
    color: #999;
}

.comment-content {
    flex: 1;
}

.comment-meta {
    margin-bottom: 10px;
}

.comment-author {
    font-weight: bold;
    color: var(--text-color);
    margin-right: 10px;
}

.comment-date {
    color: #666;
    font-size: 0.9rem;
}

.comment-reply {
    float: right;
}

.comment-reply a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.comment-reply i {
    margin-right: 5px;
}

.comment-text {
    color: var(--text-color);
    line-height: 1.6;
}

/* 回复评论作者信息样式 */
.comment-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: bold;
    color: var(--text-color); 
}

.comment-reply-to {
    font-size: 0.9rem;
    color: #666;
}

.comment-reply-to a {
    color: var(--primary-color);
    transition: color 0.3s;
}

.comment-reply-to a:hover {
    color: #6a7bef;
    text-decoration: underline;
}

/* 文章页评论布局调整 */
.comments-area .comment-meta {
    display: flex;  
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px; 
}

/* 第一行：作者信息 + 回复信息 + 回复按钮（横向排列） */
.comments-area .comment-author-info { 
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.comments-area .comment-date {
    flex-shrink: 0; 
}

/* 让"回复 @xxx"和作者信息在同一行 */
.comments-area .comment-reply-to { 
    align-items: center;
    font-size: 0.9rem;
    color: #666;
    white-space: nowrap;
}

.comments-area .comment-reply {
    margin-left: auto; 
    flex-shrink: 0;
}

/* 评论内容过长：默认折叠 + 展开/收起（按钮始终可见） */
.comment-text-wrap.is-collapsed .comment-text-inner {
    position: relative;
    max-height: 6.4em; /* 大约 4 行（1.6 * 4） */
    overflow: hidden;
}

.comment-text-wrap.is-collapsed .comment-text-inner::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), var(--bg-color));
    pointer-events: none;
}

.comment-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    border: 1px solid var(--primary-color);
    background: rgba(124, 63, 204, 0.08);
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 999px;
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
}

.comment-toggle:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 6px 16px rgba(124, 63, 204, 0.25);
}

.comment-toggle:focus-visible {
    outline: 2px solid rgba(124, 63, 204, 0.35);
    outline-offset: 2px;
}

/* 嵌套评论 */
.children {
    list-style: none;
    padding-left: 70px;
    margin-top: 30px;
}

/* 评论表单 */
.comment-respond {
    margin-top: 40px;
    padding: 30px 15px;
    background: rgba(124, 63, 204, 0.05);
}

.comment-reply-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.comment-form {
    margin-top: 20px;
}

.comment-form-content {
    position: relative;
    margin-bottom: 15px;
}

.comment-textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    resize: none;
    transition: all 0.3s;
}

.comment-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(124, 63, 204, 0.1);
    outline: none;
}

.comment-emoji-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.comment-emoji-btn i {
    margin-right: 5px;
}

.comment-emoji-btn:hover {
    background: #f0f0f0;
    border-color: var(--primary-color);
}

/* 图片上传按钮样式 */
.comment-image-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.comment-image-btn i {
    margin-right: 5px;
}

.comment-image-btn:hover {
    background: #f0f0f0;
    border-color: var(--primary-color);
}

/* 隐藏文件上传输入框 */
.comment-image-input {
    display: none;
}

/* 图片预览区域 */
.comment-image-preview {
    margin-top: 10px;
    display: none;
}

.comment-image-preview.active {
    display: block;
}

.comment-image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.comment-form-submit {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.comment-form-submit button[type="submit"] { 
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    margin-left: auto;
}

.comment-form-submit button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(124, 63, 204, 0.2);
}





/* 相关文章小工具 */
.related-posts-widget ul {
    list-style: none;
    padding: 0;
}

.related-posts-widget li {
    margin-bottom: 15px;
}

.related-posts-widget li:last-child {
    margin-bottom: 0;
}

.related-posts-widget a {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color);
}

.related-posts-widget img {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.related-post-info h4 {
    font-size: 0.95rem;
    margin: 0 0 5px;
    line-height: 1.4;
}

.related-post-info span {
    font-size: 0.85rem;
    color: #666;
}

/* 作者卡片小工具 */
.author-card {
    text-align: center;
}

.author-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.author-card h4 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.author-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 侧边栏作者卡片 */
.author-widget{
    padding: 0 !important;
}
.sidebar-author-card { 
    border-radius: 8px; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); 
    width: 100%;
}

.author-card-bg { 
    width: 100%;
    height: auto;
    margin-bottom: 45%;
    z-index: 1;
    border-radius: 12px 12px 0 0;
}

.author-card-content {
    position: relative;
    z-index: 2;
    padding: 0;
    text-align: center;
    background: var(--bg-color);
    border-radius: 8px;
    width: 100%;
}

.sidebar-author-card .author-avatar {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: relative;
    z-index: 3;
    margin: 0 auto;
    transform: translateY(-40px);
    border: 2px solid var(--bg-color);
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: -15px;
}



/* 信息区块通用样式 */
.sidebar-author-card .author-info-section {
    padding: 8px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
}

.sidebar-author-card .author-info-section:last-child {
    border-bottom: none;
}

/* 用户名和角色部分 */
.sidebar-author-card .author-header {
    padding-top: 0;
}

.sidebar-author-card .author-name-role {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-author-card .author-name {
    margin: 0;
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.5;
}

.sidebar-author-card .author-name a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar-author-card .author-name a:hover {
    color: var(--primary-color);
}

.sidebar-author-card .author-role {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #fff;
    font-weight: normal;
    line-height: 1.5;
}

/* 统计数据部分 */
.sidebar-author-card .author-stats {
    display: flex;
    justify-content: space-around;
    margin: 0;
    padding: 8px 0;
    width: 100%;
}

.sidebar-author-card .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    flex: 1;
}

.sidebar-author-card .stat-value {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-color);
}

.sidebar-author-card .stat-label {
    font-size: 0.75rem;
    color: #888;
}

/* 按钮部分 */
.sidebar-author-card .author-action {
    display: flex;
    gap: 10px;
    padding: 5px 0;
    width: 100%;
}

.sidebar-author-card .author-follow-btn,
.sidebar-author-card .author-message-btn {
    flex: 1;
    border: none;
    border-radius: 4px;
    padding: 6px 0;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s;
    text-decoration: none;
}

.sidebar-author-card .author-follow-btn {
    background-color: #f2f2f2;
    color: #666;
}

.sidebar-author-card .author-follow-btn:hover {
    background-color: #e8e8e8;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sidebar-author-card .author-message-btn {
    background-color: #f2f2f2;
    color: #666;
}

.sidebar-author-card .author-message-btn:hover {
    background-color: #e8e8e8;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 文章目录小工具 */
/* 文章目录样式 */

#toc-list {
    padding-left: 15px;
    position: relative;
}
#toc-list::before{
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: var(--primary-color);
}
#toc-list li::after{
    content: "";
    position: absolute;
    top: 15px;
    left: -19px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 1px solid #333;
}
#toc-list li.active{
    background: var(--background);
}
#toc-list li.active a{
    color: var(--primary-color);
}
#toc-list li.active::after{
    width: 9px;
    height: 9px;
    border: none;
    background: var(--primary-color);
}
#toc-list li.active{
    color: var(--primary-color);
    background: var(--background);
}
#toc-list li.active::after{
    border: none;
    background: var(--primary-color);
}

#toc-list li {
    margin: 5px 0;
    padding: 4px 8px;
    border-radius: 4px;
    position: relative;
}

#toc-list a {
    color: var(--text-color); 
}

#toc-list a:hover {
    color: var(--primary-color);
}


/* 侧边栏固定定位 */
.sidebar {
    position: sticky;
    top: 70px;
    height: fit-content;
}

/* 平滑滚动效果 */
html {
    scroll-behavior: smooth;
}

/* 文章导航样式调整 */
.nav-next {
    text-align: right;
}

.nav-next .nav-subtitle {
    justify-content: flex-end;
}

.nav-next .nav-title {
    text-align: right;
}




/* 表情选择器样式 */
.emoji-picker {
    position: absolute;
    top: -340px;
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    padding: 15px;
    display: none;
    z-index: 100;
    width: 320px;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

.emoji-picker.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.emoji-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.emoji-picker-title {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 600;
}

.emoji-picker-close {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.emoji-picker-close:hover {
    background: rgba(124, 63, 204, 0.1);
    color: var(--primary-color);
}

.emoji-groups {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: none;
}

.emoji-groups::-webkit-scrollbar {
    display: none;
}

.emoji-group-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    opacity: 0.7;
    transition: all 0.3s;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-group-btn:hover,
.emoji-group-btn.active {
    background: rgba(124, 63, 204, 0.1);
    color: var(--primary-color);
    opacity: 1;
}

.emoji-content {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.emoji-content::-webkit-scrollbar {
    width: 4px;
}

.emoji-content::-webkit-scrollbar-track {
    background: var(--secondary-bg);
    border-radius: 2px;
}

.emoji-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.emoji-item {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    user-select: none;
    -webkit-user-select: none;
}

.emoji-item:hover {
    background: rgba(124, 63, 204, 0.1);
    transform: scale(1.1);
}

.emoji-empty-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 暗色主题适配 */
[data-theme="dark"] .emoji-picker {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    background: var(--secondary-bg);
    border-color: var(--border-color);
}

/* 暗色主题适配 */
[data-theme="dark"] .comment-textarea,
[data-theme="dark"] .comment-form-fields input {
    background: var(--secondary-bg);
}

[data-theme="dark"] .comment-emoji-btn {
    background: var(--secondary-bg);
} 
.theme-alert { padding: 16px; border-radius: 8px; margin-bottom: 16px; color: #fff; font-size: 18px;}
.theme-alert.alert-default { background: #7c8cf8; }
.theme-alert.alert-info { background: #7c8cf8; }
.theme-alert.alert-success { background: #4fd6b0; }
.theme-alert.alert-danger { background: #ff5c7c; }
.theme-alert.alert-primary { background: #3ec6fa; }

.theme-label { display: inline-block; padding: 4px 12px; border-radius: 8px; font-size: 16px; margin: 4px 0;}
.theme-label.label-default { background: #e6e9f8; color: #7c8cf8;}
.theme-label.label-info { background: #e6e9f8; color: #7c8cf8;}
.theme-label.label-success { background: #e6f8f0; color: #4fd6b0;}
.theme-label.label-danger { background: #ffe6ec; color: #ff5c7c;}
.theme-label.label-primary { background: #e6f8fd; color: #3ec6fa;}

.theme-progress-bar { background: #f0f2f5; border-radius: 8px; height: 8px; margin: 16px 0; position: relative;}
.theme-progress-inner { height: 8px; border-radius: 8px; background: #7c8cf8; }
.theme-progress-bar.progress-success .theme-progress-inner { background: #4fd6b0; }
.theme-progress-bar.progress-danger .theme-progress-inner { background: #ff5c7c; }
.theme-progress-bar.progress-primary .theme-progress-inner { background: #3ec6fa; }
.theme-progress-text { position: absolute; right: 0; top: -24px; color: #888; font-size: 14px;}

/* 折叠区块暗色模式适配 */
[data-theme="dark"] .theme-collapse,
[data-theme="dark"] .theme-collapse-content {
    background: #23272e !important;
    color: #f8f8f2 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

[data-theme="dark"] .theme-collapse-title {
    color: #f8f8f2 !important;
    background: transparent !important;
}

[data-theme="dark"] .theme-collapse.collapse-info { border-color: #7c8cf8; }
[data-theme="dark"] .theme-collapse.collapse-success { border-color: #4fd6b0; }
[data-theme="dark"] .theme-collapse.collapse-warning { border-color: #ffe58f; }
[data-theme="dark"] .theme-collapse.collapse-danger { border-color: #ff5c7c; }
[data-theme="dark"] .theme-collapse.collapse-primary { border-color: #3ec6fa; }
[data-theme="dark"] .theme-collapse.collapse-default { border-color: #ab2af7; }

/* 图标颜色适配 */
[data-theme="dark"] .theme-collapse.collapse-info .collapse-icon { color: #7c8cf8; }
[data-theme="dark"] .theme-collapse.collapse-success .collapse-icon { color: #4fd6b0; }
[data-theme="dark"] .theme-collapse.collapse-warning .collapse-icon { color: #ffe58f; }
[data-theme="dark"] .theme-collapse.collapse-danger .collapse-icon { color: #ff5c7c; }
[data-theme="dark"] .theme-collapse.collapse-primary .collapse-icon { color: #3ec6fa; }

.theme-collapse {
    margin-bottom: 16px;
    border-radius: 8px;
    background: #fff;
    border: 1.5px solid #e6e9f8; /* 默认色 */
    box-shadow: 0 2px 8px #f0f1f2;
    overflow: hidden;
}
.theme-collapse.collapse-default { border-color: #ab2af7; }
.theme-collapse.collapse-info { border-color: #7c8cf8; }
.theme-collapse.collapse-success { border-color: #4fd6b0; }
.theme-collapse.collapse-warning { border-color: #ffe58f; }
.theme-collapse.collapse-danger { border-color: #ff5c7c; }
.theme-collapse.collapse-primary { border-color: #3ec6fa; }

.theme-collapse-content {
    background: #fff;
    padding: 16px 20px 20px 20px;
    border-radius: 0 0 8px 8px;
    display: none;
}
.theme-collapse-content.open {
    display: block;
}

.theme-collapse-title {
    font-weight: bold;
    padding: 14px 40px 14px 38px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    background: transparent;
    position: relative;
    user-select: none;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}
.theme-collapse-title .collapse-icon {
    margin-right: 10px;
    font-size: 1.1em;
    display: inline-block;
}
.theme-collapse-title .collapse-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    font-size: 1.1em;
    transition: transform 0.3s;
}
.theme-collapse-title.open .collapse-arrow {
    transform: translateY(-50%) rotate(90deg);
}
.theme-collapse.collapse-info .collapse-icon { color: #7c8cf8; }
.theme-collapse.collapse-success .collapse-icon { color: #4fd6b0; }
.theme-collapse.collapse-warning .collapse-icon { color: #ad8b00; }
.theme-collapse.collapse-danger .collapse-icon { color: #ff5c7c; }
.theme-collapse.collapse-primary .collapse-icon { color: #3ec6fa; }

/* 时间线整体容器 */
.theme-timeline {
    position: relative;
    margin-left: 100px;
    padding: 30px 0;
}

/* 竖线 */
.theme-timeline:before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    width: 4px;
    height: 100%;
    background: #bfc8f7;
    border-radius: 2px;
}

/* 单个时间点 */
.theme-timeline-item {
    position: relative;
    margin-bottom: 48px;
    min-height: 60px;
}

/* 时间点圆圈 */
.theme-timeline-item:before {
    content: '';
    position: absolute;
    left: 12px;
    top: 18px;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 6px solid #7c8cf8;
    border-radius: 50%;
    z-index: 2;
    box-sizing: border-box;
}

/* 时间文本 */
.theme-timeline-time {
    position: absolute;
    left: -90px;
    top: 18px;
    width: 80px;
    text-align: right;
    color: #7c8cf8;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 500;
    white-space: pre-line;
}

/* 右侧卡片内容 */
.theme-timeline-content {
    margin-left: 48px;
    background: #f7f8fa;
    border-radius: 12px;
    padding: 24px 32px;
    font-size: 18px;
    color: #333;
    min-width: 300px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.theme-timeline-content strong {
    font-size: 20px;
    color: #3a3a55;
    display: block;
    margin-bottom: 8px;
}

.theme-spoiler-tip {
    border: 2px dashed #ff5c7c;
    border-radius: 8px;
    background: #fff;
    color: #ff5c7c;
    padding: 18px 24px;
    font-size: 18px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-spoiler-icon {
    font-size: 20px;
    margin-right: 8px;
    color: #ff5c7c;
    display: inline-block;
}
.theme-spoiler-content {
    border: 2px solid #4fd6b0;
    border-radius: 8px;
    background: #f7f8fa;
    color: #333;
    padding: 18px 24px;
    font-size: 18px;
    margin: 20px 0;
}



.theme-cardlink {
    display: flex;
    align-items: center;
    width: fit-content;
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 18px 22px;
    margin: 18px auto;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
    border: 1px solid #f0f0f0;
    gap: 18px;
    cursor: pointer;
}
.theme-cardlink:hover {
    box-shadow: 0 4px 16px rgba(124,63,204,0.13);
    transform: translateY(-2px) scale(1.01);
    border-color: #e0e0ff;
}
.theme-cardlink-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #f6f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-cardlink-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}
.theme-cardlink-info {
    flex: 1;
    min-width: 0;
}
.theme-cardlink-title {
    font-size: 1.15rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 8px;
    line-height: 1.3;
    word-break: break-all;
}
.theme-cardlink-desc {
    color: #666;
    font-size: 0.98rem;
    line-height: 1.6;
    word-break: break-all;
}

.comment-form-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.comment-form-fields input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s;
}

.comment-form-fields input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(124, 63, 204, 0.1);
    outline: none;
}

/* 模态对话框样式 */
.theme-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.theme-modal.show {
    display: flex;
}

.theme-modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
    position: relative;
}

.theme-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.theme-modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.2rem;
}

.theme-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.theme-modal-close:hover {
    color: var(--primary-color);
}

.theme-modal-body {
    padding: 20px;
}

.theme-modal-body p {
    margin: 0 0 15px;
    color: #666;
}

.theme-modal-body textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
}

.theme-modal-body textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(124, 63, 204, 0.1);
}

.theme-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.theme-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.theme-btn:hover {
    transform: translateY(-2px);
}

.theme-btn {
    background-color: var(--primary-color);
    color: #fff;
}

.theme-btn:hover {
    background-color: #6a7bef;
}

.theme-btn-secondary {
    background-color: #f5f5f5;
    color: #666;
}

.theme-btn-secondary:hover {
    background-color: #e8e8e8;
}

/* 消息提示样式 */
#message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: #fff;
    font-size: 1rem;
    z-index: 1001;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

#message-toast.show {
    opacity: 1;
    transform: translateY(0);
}

#message-toast.success {
    background-color: #4fd6b0;
}

#message-toast.error {
    background-color: #ff5c7c;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
} 

/* 作者相关文章 */
.author-related-posts {
    margin: 40px 0;
    padding: 30px;
    background: rgba(124, 63, 204, 0.03);
    border-radius: 8px;
}

.related-posts-title {
    margin: 0 0 20px;
    font-size: 1.3rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-posts-title i {
    color: var(--primary-color);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-post-card {
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.related-post-card .post-thumbnail {
    display: block;
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background-color: #f5f5f5;
}

.related-post-card .post-thumbnail img,
.related-post-card .post-thumbnail .article-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.related-post-card:hover .post-thumbnail img,
.related-post-card:hover .post-thumbnail .article-image {
    transform: scale(1.05);
}

.related-post-card .post-meta {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px 0;
    font-size: 0.8rem;
    color: #888;
}

.related-post-card .post-title {
    padding: 5px 15px 15px;
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
}

.related-post-card .post-title a {
    color: var(--text-color);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.related-post-card .post-title a:hover {
    color: var(--primary-color);
}

.view-more-link {
    text-align: center;
    margin-top: 20px;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.view-all-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}



.related-post-card .post-thumbnail .placeholder-image {
    background-color: #eaeaea;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-post-card .post-thumbnail .placeholder-image:after {
    content: '\f03e';
    font-family: 'Font Awesome 5 Free';
    font-size: 2rem;
    color: #ccc;
}

/* 文章作者卡片样式 - 图片2样式 */
.author-info-horizontal {
    background: #f9f9fc;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex; /* 默认横向布局 */
    align-items: center;
    width: 100%;
}

.author-info-horizontal .author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px; /* 默认右侧外边距 */
    flex-shrink: 0;
}

.author-info-horizontal .author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info-horizontal .author-info {
    flex: none;
    text-align: center;
    width: 100%;
}

.author-info-horizontal .author-header {
    display: flex; /* 默认横向排列 */
    align-items: center;
    margin-bottom: 5px;
}

.author-info-horizontal .author-name {
    margin: 0; /* 默认无外边距 */
    margin-right: 10px; /* 默认右侧外边距 */
}

.author-info-horizontal .author-name a {
    color: var(--text-color);
    text-decoration: none;
}

.author-info-horizontal .author-role {
    background-color: #62c8f3;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.author-info-horizontal .author-stats {
    display: flex; 
    justify-content: flex-start; 
    gap: 20px;
    margin-top: 8px; 
}

.author-info-horizontal .stat-item {
    display: flex;
    flex-direction: column;
    margin-right: 20px;
}

.author-info-horizontal .stat-value {
    font-weight: bold;
    color: var(--text-color);
}

.author-info-horizontal .stat-label {
    font-size: 0.8rem;
    color: #888;
}

.author-info-horizontal .author-actions {
    display: flex; 
    gap: 10px;
    margin-left: auto;
    margin-top: 0; 
}

.author-info-horizontal .action-btn {
    background: #f2f2f2;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    margin-left: 10px;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.author-info-horizontal .action-btn i {
    margin-right: 5px;
}

.author-info-horizontal .action-btn:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
}




/* 相关文章 */
.related-posts {
    margin: 40px 0;
}

.related-title {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--text-color);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-post {
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.related-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.related-thumbnail {
    position: relative;
    padding-top: 60%;
    background-color: #f5f5f5;
}

.related-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.related-post:hover .related-thumbnail img {
    transform: scale(1.05);
}

/* 相关文章占位图 */
.related-thumbnail .placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-thumbnail .placeholder-image:after {
    content: '\f03e';
    font-family: 'Font Awesome 5 Free';
    font-size: 2rem;
    color: #ccc;
}

.related-post-title {
    padding: 15px;
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
}

.related-post-title a {
    color: var(--text-color);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.related-post-title a:hover {
    color: var(--primary-color);
}

.related-post-meta {
    padding: 0 15px 15px;
    font-size: 0.85rem;
    color: #777;
}

 

.poster-preview {
    margin-bottom: 15px;
    text-align: center;
    box-shadow: 0 4px 12px rgb(0 0 0 / 20%);
}

#posterCanvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}


/* 海报生成弹窗 */
.poster-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; 
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.poster-modal.active {
    display: flex;
    opacity: 1;
}

.poster-container {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 12px;
    max-width: fit-content;
    max-height: fit-content;
    margin: 7% auto 0;
    overflow: auto;
    position: relative;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}



.poster-preview canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.poster-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.poster-actions button {
    padding: 10px 25px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.download-poster {
    background: var(--primary-color);
    color: white;
}

.close-poster {
    background: var(--secondary-bg);
    color: var(--text-color);
}

.poster-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .poster-container {
        padding: 15px;
    }

    .poster-actions button {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* 针对小屏幕优化代码块显示 */
@media screen and (max-width: 1024px) {
    .content-article {
        padding: 0 5px;
        box-sizing: border-box;
    }
    .content {
        padding: 0 2px;
        max-width: 100vw;
        box-sizing: border-box;
    }
    .content pre,
    .content code {
        font-size: 0.9em;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: auto;
        word-break: break-all;
        white-space: pre-wrap; /* 允许自动换行 */
    }
}
@media screen and (max-width: 480px) {
    .content-article {
        padding: 0 2px;
    }
    .content {
        padding: 0 1px;
    }
    .content pre,
    .content code {
        font-size: 0.85em;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: auto;
        word-break: break-all;
        white-space: pre-wrap;
    }
}


/* 响应式布局适配 */
@media screen and (max-width: 1024px) {
    /* iPad 适配 */
    .content-article {
        grid-template-columns: 1fr 280px;
        gap: 15px;
    }

    .post-header .post-title {
        font-size: 1.8rem;
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .author-related-posts {
        padding: 20px;
    }
    .comments-area{
        margin-bottom: 30px;
    }

    .content pre[class*="language-"] {
        font-size: 0.95rem;
        padding: 1em 0.5em 0.7em 0.5em;
    }
    .prism-language-label,
    .prism-copy-btn {
        font-size: 0.8em;
        padding: 2px 8px;
        top: 0.3em;
        right: 0.5em;
    }
    .prism-copy-btn {
        right: 5em;
    }
}

@media screen and (max-width: 768px) {
    /* 平板和手机适配 */
    .content-article {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        margin-top: 30px;
    }

    .post-header .post-title {
        font-size: 1.6rem;
    }

    .post-header .post-meta {
        gap: 10px;
    }

    .content {
        font-size: 1rem;
        padding: 10px 10px;
    }

    .content h2 {
        font-size: 1.5rem;
    }

    .content h3 {
        font-size: 1.3rem;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .post-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .nav-previous, .nav-next {
        flex: 0 0 100%;
    }

    .article-author-box {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .author-avatar {
        margin: 0 auto 15px;
    }

    .author-info {
        text-align: center;
    }

    .author-meta {
        justify-content: center;
    }

    .author-social {
        justify-content: center;
    }

    /* 手机端：头像与作者信息保持同一行（覆盖上方纵向布局） */
    .comment-body {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
    }

    .comment-avatar {
        margin-bottom: 0;
    }

    .comment-avatar img,
    .comment-avatar .avatar-placeholder {
        width: 44px;
        height: 44px;
    }

    .comments-area .comment-meta {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .comments-area .comment-author-info {
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .comment-form-fields {
        grid-template-columns: 1fr;
    }

    .children {
        padding-left: 20px;
    }

    .author-info-horizontal {
        flex-direction: column;
        text-align: center;
    }

    .author-info-horizontal .author-avatar {
        margin: 0 auto 15px;
    }

    .author-info-horizontal .author-stats {
        justify-content: center;
    }

    .author-info-horizontal .author-actions {
        margin: 15px auto 0;
        justify-content: center;
    }

    .content pre {
        font-size: 0.92rem;
        padding: 1em 0.5em;
        border-radius: 6px;
        overflow-x: auto;
        word-break: break-all;
        white-space: pre;
        max-width: 100vw;
        box-sizing: border-box;
    }
    .content code {
        font-size: 0.92em;
        word-break: break-all;
    }
}

@media screen and (max-width: 480px) {
    /* 手机适配 */
    .content-article{
        padding:0 10px;
    }
    .post-header .post-title {
        font-size: 1.4rem;
    }

    .content {
        font-size: 0.95rem;
    }

    .content h2 {
        font-size: 1.3rem;
    }

    .content h3 {
        font-size: 1.1rem;
    }

    .post-tags a {
        font-size: 0.8rem;
        padding: 3px 10px;
    }


    .theme-modal-content {
        width: 95%;
        margin: 10px;
    }

    .poster-container {
        left: 5%;
        width: 90%;
    }

    .content pre {
        font-size: 0.85rem;
        padding: 0.7em 0.3em;
        border-radius: 5px;
        max-width: 100vw;
        box-sizing: border-box;
    }
    .content code {
        font-size: 0.85em;
    }
    .content pre[class*="language-"] {
        font-size: 0.85rem;
        padding: 0.7em 0.2em 0.5em 0.2em;
    }
    .prism-language-label,
    .prism-copy-btn {
        font-size: 0.75em;
        padding: 1px 6px;
        top: 0.2em;
        right: 0.2em;
    }
    .prism-copy-btn {
        right: 4em;
    }
}

.theme-alert.alert-warning {
    background: #fffbe6;
    color: #ad8b00;
}
.theme-collapse.collapse-default {
    background: #e7d9fa;
}

.theme-collapse.collapse-info {
    background: #e6e9f8;
}

.theme-collapse.collapse-success {
    background: #e6f8f0;
}

.theme-collapse.collapse-warning {
    background: #fffbe6;
}

.theme-collapse.collapse-danger {
    background: #ffe6ec;
}

.theme-collapse.collapse-primary {
    background: #e6f8fd;
}

/* 代码块滚动条美化 */
.content pre,
.content code {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--code-bg-color, #f5f5f5);
}

/* Chrome/Safari/Edge */
.content pre::-webkit-scrollbar,
.content code::-webkit-scrollbar {
    height: 8px;
    background: var(--code-bg-color, #f5f5f5);
    border-radius: 6px;
}
.content pre::-webkit-scrollbar-thumb,
.content code::-webkit-scrollbar-thumb {
    background: var(--primary-color, #7c8cf8);
    border-radius: 6px;
}
.content pre::-webkit-scrollbar-thumb:hover,
.content code::-webkit-scrollbar-thumb:hover {
    background: #5a3ec8;
}
.content pre::-webkit-scrollbar-corner,
.content code::-webkit-scrollbar-corner {
    background: transparent;
}

/* 深色模式适配 */
[data-theme="dark"] .content pre,
[data-theme="dark"] .content code {
    scrollbar-color: var(--primary-color, #7c8cf8) #232323;
}
[data-theme="dark"] .content pre::-webkit-scrollbar,
[data-theme="dark"] .content code::-webkit-scrollbar {
    background: #232323;
}
[data-theme="dark"] .content pre::-webkit-scrollbar-thumb,
[data-theme="dark"] .content code::-webkit-scrollbar-thumb {
    background: var(--primary-color, #7c8cf8);
}
[data-theme="dark"] .content pre::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .content code::-webkit-scrollbar-thumb:hover {
    background: #a18fff;
}

/* AI文章总结模块样式 */
.ai-summary-box {
    margin: 25px 0;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(124, 63, 204, 0.08) 0%, rgba(124, 63, 204, 0.03) 100%);
    border-left: 3px solid var(--primary-color);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(124, 63, 204, 0.08);
    transition: all 0.3s ease;
}

.ai-summary-box:hover {
    box-shadow: 0 3px 10px rgba(124, 63, 204, 0.12);
    transform: translateY(-1px);
}

.ai-summary-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(124, 63, 204, 0.15);
}

.ai-summary-header i {
    font-size: 1.1rem;
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.ai-summary-header h3 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.ai-summary-content {
    color: var(--text-color);
    line-height: 1.7;
    font-size: 0.9rem;
    text-align: justify;
    margin: 0;
}

/* 暗色主题适配 */
[data-theme="dark"] .ai-summary-box {
    background: linear-gradient(135deg, rgba(124, 63, 204, 0.15) 0%, rgba(124, 63, 204, 0.08) 100%);
    border-left-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .ai-summary-header {
    border-bottom-color: rgba(124, 63, 204, 0.3);
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .ai-summary-box {
        margin: 18px 0;
        padding: 14px 16px;
    }
    
    .ai-summary-header {
        gap: 7px;
        margin-bottom: 10px;
        padding-bottom: 9px;
    }
    
    .ai-summary-header i {
        font-size: 1rem;
    }
    
    .ai-summary-header h3 {
        font-size: 0.9rem;
    }
    
    .ai-summary-content {
        font-size: 0.85rem;
        line-height: 1.6;
    }
}

@media screen and (max-width: 480px) {
    .ai-summary-box {
        margin: 15px 0;
        padding: 12px 14px;
    }
    
    .ai-summary-header {
        gap: 6px;
        margin-bottom: 9px;
        padding-bottom: 8px;
    }
    
    .ai-summary-header i {
        font-size: 0.95rem;
    }
    
    .ai-summary-header h3 {
        font-size: 0.85rem;
    }
    
    .ai-summary-content {
        font-size: 0.8rem;
        line-height: 1.5;
    }
}

