/* ========== 页面兜底样式 ========== */
/* 确保即使 style.css 因故未加载，页面也有基础显示（不再白屏/错位） */
html, body.news-detail-page { height: 100%; }
body.news-detail-page {
    background: #f5f6f8 !important;
    background-color: #f5f6f8 !important;
    color: #1f2937;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.7;
}

body.news-detail-page::before,
body.news-detail-page::after {
    display: none !important;
    content: none !important;
}

body.news-detail-page * {
    box-sizing: border-box;
}

body.news-detail-page .news-container,
.news-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

body.news-detail-page .news-header-inner,
.news-header-inner {
    max-width: 1000px;
    margin: 0 auto;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* 弹窗兜底（防止style.css没加载时点击登录/注册没反应） */
/* 登录弹窗样式统一使用 style.css，此处仅保留按钮色彩兜底 */

/* 登录/注册按钮 · 强色彩兜底（防渐变失效导致按钮变白） */
body.news-detail-page .auth-dialog .auth-submit {
    width: 100% !important;
    height: 48px !important;
    border: none !important;
    border-radius: 12px !important;
    background-color: #6366f1 !important;
    background-image: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    background: #6366f1 linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 48px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.32) !important;
    transition: all 0.25s ease !important;
    margin-top: 4px !important;
    padding: 0 !important;
    display: block !important;
    text-align: center !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}
body.news-detail-page .auth-dialog .auth-submit:hover {
    transform: translateY(-2px) !important;
    background-color: #5856e8 !important;
    background-image: linear-gradient(135deg, #5856e8 0%, #7c3aed 100%) !important;
    background: #5856e8 linear-gradient(135deg, #5856e8 0%, #7c3aed 100%) !important;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.42) !important;
}
body.news-detail-page .auth-dialog .auth-submit:active {
    transform: translateY(0) !important;
}

/* ========== 顶部栏 ========== */
.news-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #f0f0f0;
}

.news-header-inner {
    max-width: 1000px;
    margin: 0 auto;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* 登录/注册 */
.news-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.news-login-btn,
.news-register-btn {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.news-login-btn:hover {
    color: #6366f1;
}

.news-register-btn {
    color: #6366f1;
    font-weight: 500;
}

.news-register-btn:hover {
    color: #4f46e5;
}

.news-header-divider {
    color: #e5e7eb;
}

/* ========== 主体容器 ========== */
.news-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

.news-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

/* ========== 左侧主体 ========== */
.news-main {
    flex: 1;
    min-width: 0;
}

/* 标题区 */
.news-title-area {
    margin-bottom: 24px;
}

.news-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    margin: 0 0 16px;
    letter-spacing: -0.5px;
}

.news-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #9ca3af;
}

.news-meta-cat {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: #eef2ff;
    color: #6366f1;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

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

.news-meta-item svg {
    color: #c1c5cc;
}

.news-meta-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.news-action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.news-action-btn:hover {
    border-color: #c7d2fe;
    color: #6366f1;
    background: #f5f3ff;
}

.news-action-btn.active {
    border-color: #6366f1;
    color: #6366f1;
    background: #eef2ff;
}

.news-action-btn.active svg {
    fill: #6366f1;
}

/* 封面图 */
.news-cover {
    width: 100%;
    height: 380px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 28px;
    background: #f9fafb;
}

.news-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 正文 */
.news-content {
    font-size: 16px;
    line-height: 1.85;
    color: #374151;
}

.news-content p {
    margin: 0 0 20px;
}

.news-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 36px 0 16px;
    padding-left: 12px;
    border-left: 4px solid #6366f1;
}

.news-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 28px 0 12px;
}

.news-content blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    background: #f9fafb;
    border-left: 3px solid #e5e7eb;
    border-radius: 0 8px 8px 0;
    color: #6b7280;
    font-size: 15px;
}

.news-content ul,
.news-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.news-content li {
    margin-bottom: 8px;
}

.news-content strong {
    color: #111827;
    font-weight: 600;
}

.news-content a {
    color: #6366f1;
    text-decoration: none;
    border-bottom: 1px dashed #c7d2fe;
}

.news-content a:hover {
    color: #4f46e5;
    border-bottom-style: solid;
}

.news-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 16px 0;
    display: block;
    height: auto;
}

/* ===== 新闻详情富文本补充样式 =====
   补齐 h4、pre、code、hr、table 以及 nowrap 强制换行 */

/* 四级标题 */
.news-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 24px 0 10px;
}

/* 代码块：深色背景 + 圆角 + 横向滚动 */
.news-content pre {
    margin: 16px 0;
    padding: 14px 16px;
    background: #1f2937;
    color: #e5e7eb;
    border-radius: 10px;
    overflow-x: auto;
    font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
    font-size: 13px;
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
    white-space: pre;
}

.news-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
    border-radius: 0;
}

/* 行内 code */
.news-content code {
    font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
    font-size: 13px;
    padding: 2px 6px;
    background: #f3f4f6;
    color: #db2777;
    border-radius: 4px;
    word-break: break-word;
}

/* 分隔线 */
.news-content hr {
    border: 0;
    border-top: 1px solid #f0f1f3;
    margin: 20px 0;
    height: 0;
}

/* 表格 */
.news-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
    display: block;
    overflow-x: auto;
}

.news-content th,
.news-content td {
    border: 1px solid #e5e7eb;
    padding: 9px 12px;
    text-align: left;
    vertical-align: top;
}

.news-content th {
    background: #f9fafb;
    color: #1f2937;
    font-weight: 600;
}

.news-content tr:nth-child(even) td {
    background: #fafbfc;
}

/* 强制换行：覆盖内容中可能粘贴的 nowrap 内联样式 */
.news-content [style*="nowrap"] {
    text-wrap-mode: wrap !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 标签 */
.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 36px 0;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.news-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: #f9fafb;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s;
}

.news-tag:hover {
    border-color: #c7d2fe;
    color: #6366f1;
    background: #f5f3ff;
}

/* ========== 评论区 ========== */
.news-comments {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #f0f0f0;
}

.news-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 20px;
}

.news-section-title span {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 400;
}

.cmt-input-area {
    background: #f9fafb;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 28px;
    transition: border-color 0.2s;
}

.cmt-input-area:focus-within {
    border-color: #c7d2fe;
}

.cmt-textarea {
    width: 100%;
    border: none;
    background: transparent;
    resize: vertical;
    outline: none;
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    font-family: inherit;
    min-height: 60px;
    box-sizing: border-box;
}

.cmt-textarea::placeholder {
    color: #c1c5cc;
}

.cmt-input-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.cmt-stars {
    display: flex;
    gap: 2px;
}

.cmt-stars svg {
    width: 20px;
    height: 20px;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.15s;
}

.cmt-stars svg.aid-star-active {
    color: #fbbf24;
    fill: #fbbf24;
}

.cmt-submit {
    padding: 7px 24px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.cmt-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* 评论列表 */
.cmt-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cmt-item {
    display: flex;
    gap: 12px;
}

.cmt-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
}

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

.cmt-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.cmt-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.cmt-stars-small {
    display: flex;
    gap: 1px;
    color: #fbbf24;
    font-size: 12px;
    letter-spacing: 0;
    line-height: 1;
}

.cmt-stars-small svg {
    width: 12px;
    height: 12px;
}

.cmt-date {
    font-size: 12px;
    color: #c1c5cc;
    margin-left: auto;
}

.cmt-text {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 8px;
}

.cmt-actions {
    display: flex;
    gap: 16px;
}

.cmt-action {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
}

.cmt-action svg {
    width: 14px;
    height: 14px;
}

.cmt-action:hover,
.cmt-action.liked {
    color: #6366f1;
}

.cmt-action.liked svg {
    fill: #6366f1;
}

/* ========== 右侧边栏 ========== */
.news-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 72px;
}

.sidebar-box {
    margin-bottom: 28px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #6366f1;
    display: inline-block;
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-list li a {
    display: flex;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.2s;
}

.sidebar-list li a:hover {
    transform: translateX(3px);
}

.sidebar-rank {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #d1d5db;
    flex-shrink: 0;
    margin-top: 2px;
}

.sidebar-list li:nth-child(1) .sidebar-rank { background: linear-gradient(135deg, #ef4444, #f97316); }
.sidebar-list li:nth-child(2) .sidebar-rank { background: linear-gradient(135deg, #f59e0b, #fb923c); }
.sidebar-list li:nth-child(3) .sidebar-rank { background: linear-gradient(135deg, #6366f1, #8b5cf6); }

.sidebar-info {
    flex: 1;
    min-width: 0;
}

.sidebar-item-title {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.sidebar-list li a:hover .sidebar-item-title {
    color: #6366f1;
}

.sidebar-item-meta {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    font-size: 12px;
    color: #c1c5cc;
}

.sidebar-item-cat {
    color: #a5b4fc;
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .news-layout {
        flex-direction: column;
    }

    .news-sidebar {
        width: 100%;
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

@media (max-width: 900px) {
    .news-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .news-header-inner {
        height: 48px;
        padding: 0 16px;
    }

    .news-container {
        padding: 20px 16px 60px;
    }

    .news-title {
        font-size: 22px;
    }

    .news-meta {
        gap: 10px;
    }

    .news-meta-actions {
        margin-left: 0;
        width: 100%;
    }

    .news-cover {
        height: 220px;
    }

    .news-content {
        font-size: 15px;
    }

    .news-sidebar {
        grid-template-columns: 1fr;
    }

    .cmt-input-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .cmt-submit {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   动态详情页补充样式（v20261005a）
   适用 show_article.html
   ======================================== */

/* 文章主体卡片 */
.news-article-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f3f4f6;
}

/* 摘要 */
.news-summary {
    font-size: 15px;
    line-height: 1.8;
    color: #6b7280;
    background: #f9fafb;
    border-left: 3px solid #6366f1;
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
    margin: 0 0 28px;
}

/* 关联内容（摘要下方内联版块） */
.news-related-inline {
    background: #f5f6f8;
    border-radius: 12px;
    padding: 20px;
    margin: 0 0 28px;
}

.news-related-inline-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #4f46e5;
    margin-bottom: 16px;
}

.news-related-inline-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-related-inline-card {
    display: flex;
    gap: 14px;
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #f0f0f0;
}

.news-related-inline-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.news-related-inline-img {
    flex-shrink: 0;
    width: 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.news-related-inline-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-related-inline-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-related-inline-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.news-related-inline-card:hover .news-related-inline-title {
    color: #4f46e5;
}

.news-related-inline-desc {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-related-inline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.news-related-inline-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    background: #edeefe;
    color: #6366f1;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 关键词标签 */
.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 8px;
    padding-top: 20px;
    border-top: 1px dashed #f0f0f0;
}

.news-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 16px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.news-tag:hover {
    background: #eef2ff;
    color: #6366f1;
}

/* 互动栏 */
.news-action-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 24px 0 32px;
    padding: 18px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.news-action-bar .news-action-btn {
    padding: 8px 18px;
    font-size: 14px;
}

/* 评论区 */
.news-comments {
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f3f4f6;
    margin-top: 24px;
}

.news-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.news-section-title svg {
    color: #6366f1;
}

.news-cmt-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #eef2ff;
    color: #6366f1;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 600;
}

.news-cmt-tip {
    margin-left: auto;
    font-size: 12px;
    color: #c1c5cc;
    font-weight: 400;
}

/* 评论输入区 */
.cmt-input-area {
    background: #f9fafb;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    transition: border-color 0.2s;
}

.cmt-input-area form {
    margin: 0;
}

.cmt-textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    background: #fff;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.cmt-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.cmt-input-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 12px;
}

.cmt-input-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cmt-code-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cmt-code-img {
    width: 80px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    object-fit: cover;
}

.cmt-code-input {
    width: 90px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    background: #fff;
}

.cmt-submit {
    padding: 8px 22px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.cmt-submit:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* 评论列表 */
.cmt-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cmt-item {
    display: flex;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #f0f0f0;
}

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

.cmt-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #eef2ff;
}

.cmt-avatar-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
}

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

.cmt-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.cmt-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.cmt-date {
    font-size: 12px;
    color: #c1c5cc;
    margin-left: auto;
}

.cmt-text {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.7;
    margin: 0 0 8px;
    word-break: break-word;
}

.cmt-actions {
    display: flex;
    gap: 16px;
}

.cmt-action {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.cmt-action:hover {
    color: #6366f1;
}

.cmt-reply-form {
    margin-top: 10px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.cmt-reply-form .cmt-textarea {
    min-height: 60px;
}

.cmt-empty {
    text-align: center;
    padding: 40px 0;
    color: #c1c5cc;
    font-size: 14px;
}

/* 相关推荐 */
.news-related {
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f3f4f6;
    margin-top: 24px;
}

.news-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 8px;
}

.news-related-card {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    background: #f9fafb;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.25s ease;
    border: 1px solid #f0f0f0;
}

.news-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12);
    border-color: #c7d2fe;
}

.news-related-cover {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    background: #fff;
}

.news-related-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-related-info {
    flex: 1;
    min-width: 0;
    padding: 8px 12px 8px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-related-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.news-related-date {
    font-size: 12px;
    color: #9ca3af;
}

/* ========== 右侧栏卡片 ========== */
.news-side-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid #f3f4f6;
    margin-bottom: 24px;
}

.news-side-header {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid #6366f1;
    display: inline-block;
}

.news-side-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.news-side-title svg {
    color: #6366f1;
}

.news-side-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-side-item {
    margin: 0;
    padding: 0;
}

.news-side-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.2s;
}

.news-side-link:hover {
    color: #6366f1;
    transform: translateX(3px);
}

.news-side-thumb {
    width: 60px;
    height: 45px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f3f4f6;
}

.news-side-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.news-side-link:hover .news-side-thumb img {
    transform: scale(1.08);
}

.news-side-text {
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-side-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
}

.news-side-date {
    font-size: 12px;
    color: #c1c5cc;
    flex-shrink: 0;
    margin-left: 4px;
}

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

.news-tag-cloud-item {
    display: inline-block;
    padding: 4px 12px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 16px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.news-tag-cloud-item:hover {
    background: #eef2ff;
    color: #6366f1;
}

.news-tag-cloud-item.cloud-xl {
    font-size: 16px;
    font-weight: 600;
    color: #6366f1;
    background: #eef2ff;
}

.news-tag-cloud-item.cloud-l {
    font-size: 14px;
    font-weight: 500;
    color: #8b5cf6;
    background: #f5f3ff;
}

.news-tag-cloud-item.cloud-m {
    font-size: 13px;
    color: #6b7280;
}

.news-tag-cloud-item.cloud-s {
    font-size: 12px;
    color: #9ca3af;
}

/* ========== 详情页正文 .content 样式增强 ========== */
.news-content.content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 16px 18px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.6;
}

.news-content.content code {
    background: #f3f4f6;
    color: #ef4444;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: "SF Mono", "Consolas", "Menlo", monospace;
}

.news-content.content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.news-content.content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}

.news-content.content a {
    color: #6366f1;
    text-decoration: underline;
    text-decoration-color: #c7d2fe;
    transition: all 0.2s;
}

.news-content.content a:hover {
    color: #4f46e5;
    text-decoration-color: #6366f1;
}

.news-content.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.news-content.content table th,
.news-content.content table td {
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    font-size: 14px;
}

.news-content.content table th {
    background: #f9fafb;
    font-weight: 600;
}

/* ========== 响应式补强 ========== */
@media (max-width: 900px) {
    .news-article-card,
    .news-comments,
    .news-related {
        padding: 20px;
    }

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

@media (max-width: 640px) {
    .news-article-card,
    .news-comments,
    .news-related {
        padding: 16px;
    }

    .news-title {
        font-size: 20px;
    }

    .news-cover {
        height: 200px;
    }

    .news-related-cover {
        width: 90px;
        height: 60px;
    }
}

