/* 全局容器样式 */

.blog-container {
    max-width: 1200px;
    margin: 100px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px; /* 默认显示两列 */
    gap: 30px;
    align-items: start;
}

/* 主内容区样式 */
.main-content {
    min-width: 0;
}

/* 文章卡片样式 */
.article-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    padding: 40px;
}

/* 文章头部样式 */
.article-header {
    text-align: center;
    margin-bottom: 40px;
}

/* 文章标题样式 */
.article-title {
    font-size: 1.5rem;
    color: #1a202c;
    line-height: 1.4;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* 分割线样式 */
.article-divider {
  height: 3px;
    background: linear-gradient(to right, #3498db, transparent);
    margin: 20px 0;
}

/* 文章元信息基础样式 */

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    color: #718096;
    font-size: 0.95rem;
    margin-top: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item i {
    color: #a0aec0;
}

.meta-item:hover {
    background: #edf2f7;
}


.meta-text {
    color: #4a5568;
}

/* 分类链接样式 */
.meta-item .category-link {
    color: #3182ce;
    text-decoration: none;
    transition: color 0.3s ease;
}

.meta-item .category-link:hover {
    color: #2c5282;
}

/* 分隔符样式 */
.meta-separator {
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #cbd5e0;
    border-radius: 50%;
    margin: 0 8px;
}

/* 文章内容区域 - 保持原始格式 */
.article-content {
    max-width: 100%;
    margin: 0 auto;
    word-wrap: break-word;
}

/* 保持段落格式 */
.article-content p {
    margin: 1em 0;
}

/* 保持图片格式和对齐方式 */
.article-content img {
    max-width: 100%;
    height: auto;
}

.article-content img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.article-content img.alignleft {
    float: left;
    margin-right: 1em;
}

.article-content img.alignright {
    float: right;
    margin-left: 1em;
}

/* 保持列表格式 */
.article-content ul,
.article-content ol {
    margin-left: 2em;
}

/* 保持表格格式 */
.article-content table {
    width: 100%;
    border-collapse: collapse;
}

.article-content table td,
.article-content table th {
    border: 1px solid #ddd;
    padding: 8px;
}

/* 保持引用块格式 */
.article-content blockquote {
    margin: 1em 0;
    padding-left: 1em;
    border-left: 4px solid #ddd;
}

/* 代码块容器样式 */
pre[class*="language-"] {
    margin: 2em 0;
    padding: 1.5em;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 工具栏样式 */
div.code-toolbar > .toolbar {
    opacity: 1;
    top: 0.3em;
    right: 0.3em;
}

/* 工具栏按钮样式 */
div.code-toolbar > .toolbar > .toolbar-item > button {
    padding: 0.3em 0.8em;
    background: #2196f3;
    color: white !important;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9em;
}

/* 工具栏按钮悬停效果 */
div.code-toolbar > .toolbar > .toolbar-item > button:hover {
    background: #1976d2;
    transform: translateY(-1px);
}

/* 复制成功提示样式 */
div.code-toolbar > .toolbar > .toolbar-item > span {
    padding: 0.3em 0.8em;
    background: #4caf50;
    color: white !important;
    border-radius: 3px;
}

/* 行内代码样式 */
:not(pre) > code {
    padding: 2px 5px;
    border-radius: 3px;
    background: #f5f5f5;
    color: #e83e8c;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
}
/* 文章标签样式 */
.article-tags {
    margin: 40px 0;
    padding-top: 30px;
    border-top: 1px solid #edf2f7;
}

.article-tags a {
    display: inline-block;
    padding: 6px 16px;
    margin: 4px;
    background: #f7fafc;
    color: #4a5568;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
}

.article-tags a:hover {
    background: #3182ce;
    color: #fff;
}

/* 文章分享按钮 */
.article-share {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.share-title {
    color: #4a5568;
    font-size: 0.95rem;
}

.share-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s;
}

.share-link:hover {
    transform: translateY(-3px);
}

.share-link.twitter {
    background: #1DA1F2;
}

.share-link.facebook {
    background: #4267B2;
}

/* 文章导航样式 */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
}

.nav-box {
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.nav-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-label {
    display: block;
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 8px;
    font-weight: 500;
}

.nav-box a {
    color: #2d3748;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.nav-box a:hover {
    color: #3182ce;
}

/* 无文章提示样式 */
.no-post {
    color: #a0aec0;
    font-size: 0.95rem;
    font-style: italic;
    display: block;
    padding: 5px 0;
}

/* 相关文章样式优化 */
.related-posts {
    margin-top: 60px;
    margin-bottom: 40px;
}

.related-title {
    font-size: 1.5rem;
    color: #1a202c;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

/* 添加标题下方的装饰线 */
.related-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: #3182ce;
    border-radius: 3px;
}

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

.related-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

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

.related-image {
    position: relative;
    padding-top: 56.25%; /* 16:9 宽高比 */
    overflow: hidden;
}

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

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

.related-info {
    padding: 20px;
}

.related-info h4 {
    color: #2d3748;
    margin: 0 0 12px;
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.related-card:hover .related-info h4 {
    color: #3182ce;
}

.related-info time {
    color: #718096;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.related-info time i {
    font-size: 0.85em;
}

/* 侧边栏基础样式 */
.sidebar {
    position: sticky;
    top: 30px;
    align-self: start;
    padding-bottom: 20px; /* 防止最后一个 widget 阴影被裁 */
    /* 不限制 max-height，让 sticky 真正工作，避免标签云被裁掉 */
}

/* 小部件通用样式 */
.widget {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.widget:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 小部件标题样式 */
.widget-title {
    font-size: 1.2rem;
    color: #1a202c;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #edf2f7;
    position: relative;
    font-weight: 600;
}

/* 标题装饰线 */
.widget-title:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #3182ce;
    border-radius: 2px;
}

/* 作者卡片样式 */
.author-card {
    text-align: center;
}

/* 头像链接 - 让 a 变块级并保持圆形 */
.author-avatar-link {
    display: inline-block;
    border-radius: 50%;
    line-height: 0;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.author-avatar-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 130, 206, 0.25);
}
.author-avatar-link:focus-visible {
    outline: 2px solid #3182ce;
    outline-offset: 4px;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.author-card:hover .author-avatar img {
    transform: scale(1.05);
}

.author-name {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 600;
}
.author-name-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.author-name-link:hover,
.author-name-link:focus-visible {
    color: #3182ce;
    border-bottom-color: #3182ce;
    outline: none;
}

.author-bio {
    color: #718096;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.author-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 热门文章列表样式 */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-item {
    display: flex;
    gap: 15px;
    text-decoration: none;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf2f7;
    transition: transform 0.3s ease;
}

.popular-item:hover {
    transform: translateX(5px);
}

.popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-image {
    flex: 0 0 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
}

.popular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popular-item:hover .popular-image img {
    transform: scale(1.08);
}

.popular-info {
    flex: 1;
    min-width: 0; /* 防止文本溢出 */
}

.popular-info h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #2d3748;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.popular-item:hover .popular-info h4 {
    color: #3182ce;
}

.popular-info time {
    font-size: 0.85rem;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 分类列表样式 */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    color: #2d3748;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: #f7fafc;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.category-list a:hover {
    color: #fff;
    background: #3182ce;
    transform: translateX(5px);
}

.category-count {
    background: #edf2f7;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #4a5568;
    transition: all 0.3s ease;
}

.category-list a:hover .category-count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 标签云样式 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    padding: 6px 12px;
    background: #f7fafc;
    color: #4a5568;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem !important;
    transition: all 0.3s ease;
}

.tag-cloud a:hover {
    background: #3182ce;
    color: #fff;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .blog-container {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 20px;
    }
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .article-title {
        font-size: 1.5rem;
    }

      .widget {
        padding: 20px;
    }

}

@media (max-width: 768px) {
    .blog-container {
        grid-template-columns: 1fr;
         margin: 100px auto; /* 移动端适当减小边距 */
         
    }

    .meta-group {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .related-info h4 {
        font-size: 1rem;
    }
    .sidebar {
        display: none; /* 隐藏侧边栏 */
    }

    .main-content {
        width: 100%; /* 确保主内容区域占满宽度 */
    }
    
    .widget-title {
        font-size: 1.1rem;
    }
    
      .article-meta {
        justify-content: center; /* 改为居中对齐 */
        overflow-x: auto;
        padding-bottom: 5px;
        flex-wrap: nowrap;
        gap: 12px;
        -webkit-overflow-scrolling: touch;
        /* 添加水平内边距确保滚动时两端有足够空间 */
        padding-left: 20px;
        padding-right: 20px;
        /* 确保整个滚动区域居中 */
        margin-left: -20px;
        margin-right: -20px;
        /* 添加渐变遮罩效果，提示可以滚动 */
        mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    }

    .meta-item {
        font-size: 0.8rem;
        white-space: nowrap;
        gap: 4px;
    }

    .meta-item i {
        font-size: 0.8em;
    }
     .article-meta::-webkit-scrollbar {
        display: none;
    }
    .article-meta {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    
}

@media (max-width: 480px) {
    .blog-container {
         margin: 100px auto; /* 小屏幕再适当减小边距 */
        padding: 0 15px; /* 可以适当减小左右内边距 */
    }

    .article-card {
        padding: 20px;
    }

    .article-title {
        font-size: 1.3rem;
    }

    .article-divider {
        margin: 20px auto;
    }

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

    .post-navigation {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .nav-box {
        padding: 15px;
    }

    .nav-label {
        font-size: 0.85rem;
    }

    .nav-box a {
        font-size: 1rem;
    }

    .no-post {
        font-size: 0.9rem;
    }
 .article-meta {
        margin-top: 15px;
        gap: 10px;
    }

    .meta-item {
        font-size: 0.75rem;
    }

.related-posts {
        margin-top: 40px;
    }

    .related-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .related-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .related-info {
        padding: 15px;
    }

    /* 隐藏滚动条但保持功能 */
    .article-meta::-webkit-scrollbar {
        display: none;
    }
    .article-meta {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
        .meta-separator {
            display: none; /* 在移动端隐藏分隔符 */
        }
    
}




/* 分享按钮样式 */
.article-share {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.share-title {
    color: #666;
    font-size: 14px;
}

.share-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.share-link:hover {
    opacity: 0.8;
}

.share-link i {
    margin-right: 6px;
    font-size: 16px;
}

.share-text {
    font-size: 14px;
}

/* 微信分享按钮 */
.wechat {
    background-color: #07C160;
}

/* QQ分享按钮 */
.qq {
    background-color: #12B7F5;
}

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

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    width: 300px;
    border-radius: 8px;
    text-align: center;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #555;
}

#qrcode {
    margin: 20px auto;
    width: 200px;
    height: 200px;
}

.modal-content p {
    color: #666;
    font-size: 14px;
    margin-top: 15px;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .share-text {
        display: none; /* 在移动端只显示图标 */
    }
    
    .share-link {
        padding: 8px;
    }
    
    .share-link i {
        margin: 0;
        font-size: 20px;
    }
    
    .modal-content {
        width: 90%;
        margin: 30% auto;
    }
}

/* ================================================================
   10. 评论区域
   ================================================================ */
.comments-section {
    margin-top: 56px;
    padding-top: 48px;
    border-top: 2px solid rgba(49, 130, 206, 0.1);
    clear: both;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.comments-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

/* "X 条评论" 装饰分隔条 */
.comments-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 44px 0 28px;
}
.comments-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(49, 130, 206, 0.25), transparent);
}
.comments-divider-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #3182ce;
    white-space: nowrap;
}
.comments-divider-text i { color: #3182ce; }

/* 评论列表 */
.comment-list {
    list-style: none;
    margin: 0 0 40px;
    padding: 0;
    min-width: 0;
}

.comment-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 20px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    min-width: 0;
}

/* .comment-item 是 flex 容器，内部三个子元素：
   avatar / .comment-body / .children。
   avatar 和 .comment-body 同行（flex item），.children 必须独占整行。 */
.comment-item > .children {
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
}
.comment-item:last-child { margin-bottom: 0; }
.comment-item:hover {
    border-color: rgba(49, 130, 206, 0.2);
    box-shadow: 0 4px 14px rgba(49, 130, 206, 0.08);
}

/* 当前正在被回复的评论高亮 */
.comment-item.is-reply-target {
    border-color: #3182ce;
    background: linear-gradient(180deg, rgba(49, 130, 206, 0.04), #fff);
    box-shadow: 0 4px 18px rgba(49, 130, 206, 0.18);
    position: relative;
}
.comment-item.is-reply-target::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 15px;
    border: 2px solid #3182ce;
    pointer-events: none;
}

.comment-avatar {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 3px 10px rgba(49, 130, 206, 0.18);
}

.comment-body { flex: 1; min-width: 0; }

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.comment-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.comment-author-name {
    font-weight: 700;
    font-size: 15px;
    color: #0a0e27;
    text-decoration: none;
    transition: color 0.2s;
}
.comment-author-name:hover { color: #3182ce; }

.comment-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.comment-badge-admin {
    background: linear-gradient(135deg, rgba(49, 130, 206, 0.12), rgba(91, 141, 239, 0.12));
    color: #2b6cb0;
    border: 1px solid rgba(49, 130, 206, 0.25);
}

.comment-meta-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.comment-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #a0aec0;
    white-space: nowrap;
}
.comment-time i { font-size: 12px; }

/* "回复给 @XXX" 引用气泡 */
.comment-reply-quote {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 10px;
    padding: 5px 12px;
    font-size: 12.5px;
    color: #4a5568;
    background: linear-gradient(90deg, rgba(49, 130, 206, 0.06), rgba(49, 130, 206, 0.02));
    border-left: 3px solid #3182ce;
    border-radius: 0 8px 8px 0;
    line-height: 1.5;
}
.comment-reply-quote i {
    color: #3182ce;
    font-size: 11px;
    transform: rotate(180deg);
}
.comment-reply-quote-author {
    color: #3182ce;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.comment-reply-quote-author:hover {
    color: #2b6cb0;
    text-decoration: underline;
}

/* 回复按钮 */
.comment-reply-link,
.comment-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    color: #3182ce;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
.comment-reply-link:hover,
.comment-edit-link:hover { color: #2b6cb0; }
.comment-reply-link i { font-size: 11px; }
.comment-edit-link { color: #718096; }
.comment-edit-link:hover { color: #4a5568; }

/* 子评论嵌套（抖音式：默认折叠） */
.comment-list .comment-item > .children {
    list-style: none;
    margin: 0;
    padding: 0 0 0 24px;
    border-left: 2px dashed rgba(49, 130, 206, 0.2);
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease, margin-top 0.25s ease;
}
.comment-list .comment-item.is-expanded > .children {
    max-height: 9999px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 14px;
}
.comment-list .comment-item > .children > .comment-item {
    padding: 18px 18px;
    background: #f8fafc;
    border-color: #e2e8f0;
    margin-top: 10px;
    margin-bottom: 0;
}
.comment-list .comment-item > .children > .comment-item:first-child { margin-top: 0; }
.comment-list .comment-item > .children > .comment-item.is-reply-target {
    background: linear-gradient(180deg, rgba(49, 130, 206, 0.05), #f8fafc);
}

/* 抖音式：只显示两层视觉，depth>=3 的评论与子级评论（depth=2）完全同款显示 */
.comment-list .comment-item.comment-depth-3,
.comment-list .comment-item.comment-depth-4,
.comment-list .comment-item.comment-depth-5 {
    padding: 18px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-top: 10px;
    margin-bottom: 0;
}
.comment-list .comment-item.comment-depth-3:first-child,
.comment-list .comment-item.comment-depth-4:first-child,
.comment-list .comment-item.comment-depth-5:first-child { margin-top: 0; }
.comment-list .comment-item.comment-depth-3::before,
.comment-list .comment-item.comment-depth-4::before,
.comment-list .comment-item.comment-depth-5::before { display: none !important; }

/* 第四层以后的 children：不再缩进、不再折叠 */
.comment-list .comment-item.comment-depth-3 > .children,
.comment-list .comment-item.comment-depth-4 > .children {
    padding-left: 0 !important;
    border-left: none !important;
    max-height: none !important;
    opacity: 1 !important;
    transform: none !important;
    margin-top: 8px !important;
}

/* 第二层（depth=2）评论没有"展开"按钮 → 它的 .children 永远显示孙级评论 */
.comment-list .comment-item.comment-depth-2 > .children {
    max-height: none !important;
    opacity: 1 !important;
    transform: none !important;
    margin-top: 14px !important;
}

/* 展开/收起按钮（抖音式） */
.comment-toggle-replies {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 0;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #3182ce;
    cursor: pointer;
    font-family: inherit;
    user-select: none;
    transition: color 0.2s;
}
.comment-toggle-replies:hover:not(:disabled) { color: #2b6cb0; }
.comment-toggle-replies:disabled,
.comment-toggle-replies.is-disabled {
    color: #a0aec0;
    cursor: not-allowed;
}
.comment-toggle-replies .toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(49, 130, 206, 0.12);
    color: #3182ce;
    font-size: 9px;
    transition: transform 0.3s ease, background 0.2s;
}
.comment-toggle-replies:hover:not(:disabled) .toggle-icon {
    background: rgba(49, 130, 206, 0.2);
}
.comment-toggle-replies:disabled .toggle-icon,
.comment-toggle-replies.is-disabled .toggle-icon {
    background: rgba(160, 174, 192, 0.15);
    color: #a0aec0;
}
.comment-item.is-expanded > .comment-body > .comment-toggle-replies .toggle-icon {
    transform: rotate(180deg);
}
.comment-toggle-replies .toggle-count {
    color: #718096;
    font-weight: 500;
}

/* 待审核提示 */
.comment-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 8px;
}
.comment-notice-pending {
    background: rgba(237, 137, 54, 0.08);
    border: 1px solid rgba(237, 137, 54, 0.2);
    color: #dd6b20;
}

/* 评论内容 */
.comment-content {
    font-size: 15px;
    color: #2d3748;
    line-height: 1.75;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-width: 0;
}
.comment-content p { margin: 0 0 8px; }
.comment-content p:last-child { margin-bottom: 0; }
.comment-content a {
    color: #3182ce;
    text-decoration: none;
    border-bottom: 1px solid rgba(49, 130, 206, 0.3);
    transition: color 0.2s, border-color 0.2s;
}
.comment-content a:hover { color: #2b6cb0; border-color: #2b6cb0; }
.comment-content pre,
.comment-content code {
    white-space: pre-wrap;
    word-break: break-all;
    max-width: 100%;
}

/* 评论分页 */
.comment-pagination {
    text-align: center;
    margin-bottom: 40px;
}
.comment-pagination a,
.comment-pagination .current {
    display: inline-block;
    min-width: 34px;
    padding: 6px 10px;
    margin: 0 2px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #4a5568;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}
.comment-pagination a:hover,
.comment-pagination .current {
    background: linear-gradient(135deg, #3182ce 0%, #5b8def 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(49, 130, 206, 0.25);
}

/* ================================================================
   11. 评论表单
   ================================================================ */
#respond {
    position: relative;
    margin-top: 0;
    margin-bottom: 8px;
    padding: 32px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 60%);
    border-radius: 16px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    min-width: 0;
    box-sizing: border-box;
    max-width: 100%;
    transition: border-color 0.25s, box-shadow 0.25s;
}
#respond:hover,
#respond:focus-within {
    border-color: rgba(49, 130, 206, 0.35);
    box-shadow: 0 6px 24px rgba(49, 130, 206, 0.08);
}
/* 表单被嵌入到某条评论内部时，去掉卡片背景（避免视觉重复） */
.comment-item #respond {
    background: #fff;
    border-color: #cbd5e0;
    margin-top: 12px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.comment-reply-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
    padding-bottom: 16px;
    font-size: 19px;
    font-weight: 800;
    color: #0a0e27;
    border-bottom: 1px dashed rgba(49, 130, 206, 0.2);
}
.comment-reply-title i { color: #3182ce; }

.comment-notes {
    font-size: 13px;
    color: #718096;
    margin-bottom: 16px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comment-form .form-field {
    margin-bottom: 16px;
}
.comment-form .form-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: #2d3748;
}
.comment-form .form-field label i { color: #3182ce; font-size: 13px; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #1a202c;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}
.comment-form input:focus {
    outline: none;
    border-color: #3182ce;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.12);
}
.comment-form input::placeholder { color: #a0aec0; }

.comment-form-comment textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    color: #1a202c;
    background: #fff;
    resize: vertical;
    min-height: 130px;
    font-family: inherit;
    line-height: 1.7;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.comment-form-comment textarea:focus {
    outline: none;
    border-color: #3182ce;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.12);
}
.comment-form-comment textarea::placeholder { color: #a0aec0; }

.comment-form-submit {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.form-submit .submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #3182ce 0%, #5b8def 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(49, 130, 206, 0.25);
}
.form-submit .submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(49, 130, 206, 0.4);
}
.form-submit .submit:active {
    transform: translateY(0);
}

#cancel-comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    text-decoration: none;
    background: #fff;
    transition: all 0.2s;
}
#cancel-comment-reply-link:hover {
    border-color: #c53030;
    color: #c53030;
    background: #fff5f5;
}

/* 未登录提示 */
.must-log-in {
    text-align: center;
    padding: 28px;
    font-size: 15px;
    color: #4a5568;
    margin: 0;
}
.must-log-in a {
    color: #3182ce;
    font-weight: 600;
    text-decoration: none;
}
.must-log-in a:hover { text-decoration: underline; }

/* ================================================================
   12. 响应式
   ================================================================ */
@media (max-width: 768px) {
    .comment-item { gap: 12px; padding: 16px 14px; }
    .comment-avatar { width: 40px !important; height: 40px !important; }
    .comment-header { gap: 6px; }
    .comment-meta-right { gap: 10px; }
    .comment-list .comment-item > .children { padding-left: 14px; }
    #respond { padding: 22px 18px; }
    .comments-divider { margin: 32px 0 22px; }
    .comments-divider-text { font-size: 14px; }
    .comment-reply-title { font-size: 17px; }
    .comment-form-submit { flex-direction: column; align-items: stretch; }
    .form-submit .submit { justify-content: center; }
}