/* 文章详情页正文 */
.article{
    font-size: 16px;
    line-height: 1.85;
    color: #333;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 段落 */
.article p{
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 1.85;
    color: #333;
    text-align: justify;
}

/* 加粗：行内强调，不占块级间距 */
.article strong,
.article b{
    font-weight: 700;
    color: #222;
}

/* 标题层级 */
.article h1{
    margin: 0 0 20px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    color: #222;
    text-align: center;
}

.article h2{
    position: relative;
    margin: 28px 0 14px;
    padding-left: 12px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.45;
    color: #222;
    border-left: 4px solid #2a8cff;
}

.article h3{
    margin: 22px 0 12px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    color: #333;
}

.article h4{
    margin: 18px 0 10px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: #333;
}

.article h5,
.article h6{
    margin: 16px 0 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    color: #444;
}

/* 首个标题减少上边距，避免顶部留白过大 */
.article > h1:first-child,
.article > h2:first-child,
.article > h3:first-child,
.article > p:first-child{
    margin-top: 0;
}

/* 链接 */
.article a{
    color: #2a8cff;
    text-decoration: none;
    transition: color .2s, border-color .2s;
}

/* 图片 */
.article img{
    display: block;
    max-width: 100%;
    height: auto;
    margin: 16px auto;
}

/* 列表 */
.article ul,
.article ol{
    margin: 0 0 16px;
    padding-left: 1.6em;
    color: #333;
}
.article ul{
    list-style: disc;
}
.article ol{
    list-style: decimal;
}
.article li{
    margin-bottom: 8px;
    line-height: 1.85;
}
.article li > ul,
.article li > ol{
    margin: 8px 0 0;
}

/* 引用 */
.article blockquote{
    margin: 16px 0;
    padding: 12px 16px;
    border-left: 4px solid #d0e6ff;
    background: #f5f9ff;
    color: #555;
    font-size: 15px;
    line-height: 1.75;
}
.article blockquote p{
    margin-bottom: 0;
    color: inherit;
}

/* 分割线 */
.article hr{
    margin: 24px 0;
    border: 0;
    border-top: 1px solid #eee;
}

/* 表格 */
.article table{
    width: 100%;
    margin: 16px 0;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.6;
}
.article th,
.article td{
    padding: 10px 12px;
    border: 1px solid #e5e8eb;
    text-align: left;
    vertical-align: top;
}
.article th{
    background: #f7f8fa;
    font-weight: 700;
    color: #222;
}
.article tr:nth-child(even) td{
    background: #fafbfc;
}

/* 行内代码 / 标记 */
.article code{
    padding: 1px 6px;
    border-radius: 3px;
    background: #f5f6f8;
    color: #c7254e;
    font-size: 13px;
}
.article mark{
    padding: 0 2px;
    background: #fff3cd;
    color: inherit;
}

/* 文章详情页标签 */
.article-tags{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 20px 0 10px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 14px;
    line-height: 1.5;
}
.article-tags .tag-label{
    flex-shrink: 0;
    color: #999;
    font-size: 14px;
}
.article-tags .tag,
.article-tags a{
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid #e5e8eb;
    border-radius: 3px;
    background: #f7f8fa;
    color: #666;
    font-size: 13px;
    text-decoration: none;
    transition: color .2s, border-color .2s, background .2s;
}
.article-tags .tag:hover,
.article-tags a:hover{
    color: #2a8cff;
    border-color: #b8d9ff;
    background: #f0f7ff;
}
.article-tags .tag-primary{
    color: #2a8cff;
    border-color: #b8d9ff;
    background: #f0f7ff;
}

/* 移动端 */
@media screen and (max-width: 768px){
    .article{
        font-size: 15px;
        line-height: 1.8;
    }
    .article p{
        margin-bottom: 14px;
        font-size: 15px;
        line-height: 1.8;
    }
    .article h1{
        margin-bottom: 16px;
        font-size: 20px;
    }
    .article h2{
        margin: 22px 0 12px;
        padding-left: 10px;
        font-size: 18px;
        border-left-width: 3px;
    }
    .article h3{
        margin: 18px 0 10px;
        font-size: 16px;
    }
    .article h4{
        margin: 16px 0 8px;
        font-size: 15px;
    }
    .article blockquote{
        padding: 10px 12px;
        font-size: 14px;
    }
    .article table{
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .article-tags{
        gap: 8px;
        margin: 16px 0 8px;
        padding-top: 12px;
    }
    .article-tags .tag,
    .article-tags a{
        padding: 3px 10px;
        font-size: 12px;
    }
}
