/* JCMS 文章详情页样式 - 商务简洁风格 */

/* 文章详情页布局 */
.article-detail { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }
.article-main { display: grid; grid-template-columns: 1fr 300px; gap: 30px; }

/* 面包屑 */
.article-position { background: #fff; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.article-position .container { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #999; }
.article-position a { color: #666; }
.article-position a:hover { color: #1890ff; }
.article-position span { color: #ccc; }

/* 文章主体 */
.article-box { background: #fff; border-radius: 4px; padding: 30px; border: 1px solid #e8e8e8; }
.article-title { font-size: 24px; font-weight: 500; color: #333; margin-bottom: 20px; line-height: 1.4; letter-spacing: -0.3px; }
.article-info { display: flex; flex-wrap: wrap; gap: 20px; color: #999; font-size: 13px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; margin-bottom: 20px; }
.article-info span { display: flex; align-items: center; gap: 5px; }

/* 摘要 */
.article-summary { background: #f5f7fa; padding: 15px 20px; border-left: 3px solid #1890ff; margin-bottom: 25px; color: #666; font-size: 14px; line-height: 1.7; border-radius: 4px; }

/* 封面图 */
.article-cover { width: 100%; height: auto; max-height: 400px; object-fit: cover; border-radius: 4px; margin-bottom: 25px; display: block; }

/* 文章内容 */
.article-content { font-size: 15px; line-height: 1.8; color: #333; }
.article-content p { margin-bottom: 16px; }
.article-content h1 { font-size: 22px; margin: 30px 0 16px; color: #333; font-weight: 500; border-bottom: 1px solid #e8e8e8; padding-bottom: 10px; }
.article-content h2 { font-size: 20px; margin: 25px 0 14px; color: #333; font-weight: 500; border-bottom: 1px solid #e8e8e8; padding-bottom: 8px; }
.article-content h3 { font-size: 17px; margin: 20px 0 12px; color: #333; font-weight: 500; }
.article-content h4 { font-size: 15px; margin: 15px 0 10px; color: #444; font-weight: 500; }
.article-content ul, .article-content ol { margin: 15px 0; padding-left: 25px; }
.article-content li { margin: 8px 0; line-height: 1.7; }
.article-content ul li { list-style-type: disc; }
.article-content ol li { list-style-type: decimal; }
.article-content blockquote { margin: 20px 0; padding: 15px 20px; background: #f5f7fa; border-left: 3px solid #1890ff; color: #666; border-radius: 4px; }
.article-content blockquote p { margin-bottom: 0; }
.article-content pre { background: #f5f7fa; padding: 15px; border-radius: 4px; overflow-x: auto; margin: 20px 0; font-size: 13px; line-height: 1.6; border: 1px solid #e8e8e8; }
.article-content code { background: #f5f7fa; padding: 2px 6px; border-radius: 3px; font-size: 0.9em; font-family: 'Courier New', monospace; color: #e83e8c; }
.article-content pre code { background: none; padding: 0; color: #333; font-size: 13px; }
.article-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.article-content table th, .article-content table td { padding: 10px 12px; border: 1px solid #e8e8e8; text-align: left; }
.article-content table th { background: #f5f7fa; font-weight: 500; }
.article-content table tr:nth-child(even) { background: #fafafa; }
.article-content hr { border: none; border-top: 1px solid #f0f0f0; margin: 30px 0; }
.article-content img { max-width: 100%; height: auto; border-radius: 4px; margin: 15px 0; }
.article-content a { color: #1890ff; text-decoration: none; }
.article-content a:hover { text-decoration: underline; }
.article-content strong { font-weight: 500; color: #333; }
.article-content em { font-style: italic; }

/* 标签 */
.article-tags { margin-top: 30px; padding-top: 20px; border-top: 1px solid #f0f0f0; display: flex; flex-wrap: wrap; gap: 10px; }
.article-tags a { display: inline-block; padding: 5px 12px; background: #f5f7fa; color: #666; border-radius: 4px; font-size: 13px; border: 1px solid #e8e8e8; }
.article-tags a:hover { background: #1890ff; color: #fff; border-color: #1890ff; }

/* 上下篇 */
.article-pnav { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 20px; border-top: 1px solid #f0f0f0; }
.article-pnav a { padding: 10px 16px; background: #f5f7fa; border-radius: 4px; color: #666; font-size: 14px; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: all 0.2s; border: 1px solid #e8e8e8; }
.article-pnav a:hover { background: #1890ff; color: #fff; border-color: #1890ff; }
.article-pnav .prev:before { content: "上一篇："; color: #999; }
.article-pnav .next:before { content: "下一篇："; color: #999; }

/* 侧边栏 */
.article-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-box { background: #fff; border-radius: 4px; padding: 20px; border: 1px solid #e8e8e8; }
.sidebar-title { font-size: 16px; font-weight: 500; color: #333; padding-bottom: 12px; border-bottom: 2px solid #1890ff; margin-bottom: 15px; }
.related-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.related-item:last-child { border-bottom: none; }
.related-item img { width: 80px; height: 60px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: #f0f0f0; }
.related-item h4 { font-size: 14px; color: #333; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-weight: 400; }
.related-item h4:hover { color: #1890ff; }
.related-item span { font-size: 12px; color: #999; }

/* 点赞 */
.article-action { display: flex; align-items: center; gap: 20px; margin-top: 25px; padding-top: 20px; border-top: 1px solid #f0f0f0; }
.like-btn { display: flex; align-items: center; gap: 8px; padding: 8px 20px; background: #fff; border: 1px solid #e8e8e8; border-radius: 4px; color: #666; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.like-btn:hover { border-color: #1890ff; color: #1890ff; }
.like-btn.liked { background: #fff0f0; border-color: #ff4d4f; color: #ff4d4f; }

/* 评论区域 */
.comments-section { margin-top: 40px; padding-top: 30px; border-top: 1px solid #f0f0f0; }
.comments-title { font-size: 18px; font-weight: 500; margin-bottom: 20px; color: #333; }
.comment-form { background: #f5f7fa; padding: 20px; border-radius: 4px; margin-bottom: 30px; }
.comment-form textarea { width: 100%; min-height: 100px; padding: 12px; border: 1px solid #e8e8e8; border-radius: 4px; resize: vertical; font-size: 14px; font-family: inherit; background: #fff; }
.comment-form textarea:focus { outline: none; border-color: #1890ff; }
.comment-form button { margin-top: 10px; padding: 10px 30px; background: #1890ff; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; }
.comment-form button:hover { background: #1677ff; }
.comment-list { }
.comment-item { display: flex; gap: 15px; padding: 20px 0; border-bottom: 1px solid #f0f0f0; }
.comment-item:last-child { border-bottom: none; }
.comment-avatar { width: 40px; height: 40px; background: #1890ff; color: #fff; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.comment-content { flex: 1; }
.comment-meta { display: flex; gap: 10px; color: #999; font-size: 12px; margin-bottom: 8px; }
.comment-author { color: #1890ff; font-weight: 500; }
.comment-text { color: #333; font-size: 14px; line-height: 1.6; }
.comment-reply { margin-top: 10px; color: #1890ff; cursor: pointer; font-size: 13px; }
.comment-form-inline { margin-top: 10px; display: none; }
.comment-form-inline textarea { width: 100%; padding: 10px; border: 1px solid #e8e8e8; border-radius: 4px; font-size: 13px; }
.comment-form-inline button { margin-top: 8px; padding: 6px 16px; background: #1890ff; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }
.reply-cancel { margin-left: 10px; padding: 6px 16px; background: #f5f7fa; color: #666; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }

/* 相关推荐 */
.related-articles { margin-top: 40px; padding-top: 30px; border-top: 1px solid #f0f0f0; }
.related-articles h3 { font-size: 18px; font-weight: 500; margin-bottom: 20px; color: #333; }
.related-articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-article-card { display: block; text-decoration: none; color: inherit; }
.related-article-card .card-inner { background: #f5f7fa; border-radius: 4px; overflow: hidden; }
.related-article-card img { width: 100%; height: 120px; object-fit: cover; background: #e8e8e8; }
.related-article-card .card-body { padding: 15px; }
.related-article-card h4 { font-size: 14px; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 400; color: #333; }
.related-article-card .date { font-size: 12px; color: #999; }

/* 响应式 */
@media (max-width: 1024px) {
    .article-main { grid-template-columns: 1fr; }
    .article-sidebar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 768px) {
    .article-detail { padding: 20px 15px; }
    .article-box { padding: 20px; }
    .article-title { font-size: 22px; }
    .article-sidebar { grid-template-columns: 1fr; }
    .article-pnav { flex-direction: column; gap: 10px; }
    .article-pnav a { max-width: 100%; }
    .article-action { flex-wrap: wrap; }
}
@media (max-width: 480px) {
    .article-title { font-size: 18px; }
    .article-info { font-size: 12px; gap: 10px; }
    .article-content { font-size: 15px; }
    .article-cover { max-height: 200px; margin-bottom: 15px; }
}

/* 无文章时样式 */
.no-article { color: #999; background: none; cursor: default; }

/* 评论区域辅助样式 */
.comment-loading, .comment-empty, .comment-error { text-align: center; color: #999; padding: 20px; }