/* ===================================
   article_sm.css
   文章详情页样式方案 - 小字号版
   =================================== */

/* ---- 页面容器 ---- */
.article-page {
    padding: 0 8px;
}

/* ---- 文章标题区 ---- */
.article-page h1 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.5;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 14px;
    border-bottom: 2px solid #c00;
}

.article-page .article-subtitle {
    font-size: 1.05rem;
    font-weight: 500;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
}

/* ---- 作者信息栏 ---- */
.article-meta-bar {
    text-align: left;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid #e8e8e8;
}

.article-meta-bar .author-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.article-meta-bar .author-name i {
    color: #c00;
    margin-right: 6px;
}

.article-meta-bar .meta-items {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    font-size: 0.85rem;
    color: #888;
}

.article-meta-bar .meta-items a {
    color: #888;
    text-decoration: none;
}

.article-meta-bar .meta-items a:hover {
    color: #c00;
    text-decoration: underline;
}

/* ---- 摘要框 ---- */
.article-abstract {
    background: #fafafa;
    border-left: 4px solid #c00;
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 0 6px 6px 0;
}

.article-abstract h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #c00;
    margin-bottom: 8px;
}

.article-abstract h5 i {
    margin-right: 6px;
}

.article-abstract p {
    font-size: 0.9rem;
    line-height: 1.75;
    color: #555;
    margin: 0;
    text-indent: 2em;
}

/* ---- 关键词 ---- */
.article-keywords {
    margin-bottom: 22px;
    font-size: 0.9rem;
    color: #555;
}

.article-keywords strong {
    color: #333;
    font-weight: 600;
}

.article-keywords .kw-tag {
    display: inline-block;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #555;
    padding: 2px 9px;
    border-radius: 4px;
    margin: 2px 6px 2px 0;
    font-size: 0.82rem;
    transition: all 0.15s;
}

.article-keywords .kw-tag:hover {
    background: #fce4e4;
    border-color: #fcc;
    color: #c00;
}

/* ---- 正文头部工具栏 ---- */
.article-body-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.article-body-header h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.article-body-header h5 i {
    color: #c00;
    margin-right: 6px;
}

/* ---- 正文内容区（核心） ---- */
.article-body {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 36px 44px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 28px;
}

/* 正文基础排版 */
.article-body {
    font-size: 15px;
    line-height: 1.85;
    color: #2c2c2c;
}

.article-body p {
    text-indent: 2em;
    margin-bottom: 0.9em;
    text-align: justify;
    word-break: normal;
    overflow-wrap: break-word;
}

/* 小节标题 */
.article-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 1.6em;
    margin-bottom: 0.7em;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

/* ---- 引用上标（出版物风格） ---- */
sup.ref-marker {
    font-size: 0.75em;
    line-height: 1;
    vertical-align: super;
    margin: 0 1px;
}

sup.ref-marker a {
    color: #1565c0;
    text-decoration: none;
    font-weight: 600;
    padding: 0 2px;
    transition: color 0.15s;
}

sup.ref-marker a:hover {
    color: #c00;
    text-decoration: underline;
}

/* ---- 参考文献区 ---- */
.ref-divider {
    margin: 28px 0 18px;
    border: none;
    border-top: 1px solid #ddd;
}

.ref-title {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 14px;
    text-align: center;
}

ol.references-list {
    list-style: none;
    counter-reset: ref-counter;
    padding: 0;
    margin: 0;
    font-size: 0.82em;
    line-height: 1.8;
    color: #555;
}

ol.references-list li {
    counter-increment: ref-counter;
    position: relative;
    padding: 4px 0 4px 40px;
    margin-bottom: 3px;
    border-bottom: 1px dotted #eee;
}

ol.references-list li::before {
    content: "[" counter(ref-counter) "]";
    position: absolute;
    left: 0;
    top: 4px;
    width: 34px;
    text-align: right;
    color: #1565c0;
    font-weight: 600;
    font-size: 0.92em;
}

ol.references-list li:target {
    background: #e3f2fd;
    border-radius: 4px;
    padding: 4px 8px 4px 40px;
}

.ref-backlink {
    display: inline-block;
    color: #999;
    text-decoration: none;
    font-size: 0.85em;
    margin-left: 4px;
    opacity: 0;
    transition: opacity 0.2s, color 0.15s;
}

ol.references-list li:hover .ref-backlink {
    opacity: 1;
}

.ref-backlink:hover {
    color: #c00;
    text-decoration: none;
}

/* ---- 文章信息卡片 ---- */
.article-info-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.article-info-card .card-header {
    background: #fafafa;
    border-bottom: 1px solid #eee;
    padding: 12px 18px;
    font-weight: 600;
    color: #333;
    border-radius: 8px 8px 0 0;
}

.article-info-card .card-body {
    padding: 18px;
    font-size: 0.9rem;
    color: #555;
}

.article-info-card .card-body > div {
    margin-bottom: 6px;
}

.article-info-card .card-body strong {
    color: #333;
    font-weight: 600;
}

/* ---- 操作按钮区 ---- */
.article-actions {
    margin-bottom: 36px;
}

.article-actions .btn {
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 18px;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

/* ---- AI 横幅（如果在正文内） ---- */
.article-body .alert-warning {
    background: #fffbf0;
    border: 1px solid #ffe082;
    border-left: 4px solid #ffc107;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 18px;
    font-size: 0.9rem;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .article-page {
        padding: 0 12px;
    }

    .article-page h1 {
        font-size: 1.25rem;
        padding-bottom: 10px;
    }

    .article-page .article-subtitle {
        font-size: 0.95rem;
    }

    .article-meta-bar .meta-items {
        gap: 6px 14px;
        font-size: 0.8rem;
    }

    .article-body {
        padding: 20px 18px;
        font-size: 14px;
    }

    .article-body p {
        text-indent: 1.5em;
    }

    .article-body h3 {
        font-size: 1rem;
    }

    ol.references-list li {
        padding-left: 34px;
    }

    ol.references-list li::before {
        width: 28px;
    }
}

/* ---- 打印优化 ---- */
@media print {
    .article-page {
        max-width: 100%;
        padding: 0;
    }

    .article-body {
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .article-actions,
    .article-body-header .btn,
    .article-body .alert-warning {
        display: none !important;
    }

    .article-meta-bar {
        border-bottom: 1px solid #ccc;
    }

    .ref-backlink {
        display: none;
    }

    sup.ref-marker a {
        color: #333;
        text-decoration: none;
    }
}
