/* ============================================================
   show-ai-article.css —— 文章详情页专属样式
   包含：Hero 区差异覆盖、面包屑、文章正文卡片、上下篇、
        评论区、右侧悬浮栏
   ============================================================ */

/* --- Hero 区（页面差异：min-height 200px、字号缩小） --- */
.page-header { min-height: 200px; }
.hero-section { padding-top: 10px; }
.hero-title { font-size: 32px; margin-bottom: 20px; }
.hero-title i { font-size: 30px; }

/* ================= 新布局：左侧主内容与右侧悬浮栏 ================= */
.home-layout {
    display: flex;
    gap: 24px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px 60px 40px;
    align-items: flex-start;
}

/* ----- 左侧主内容区 (文章详情) ----- */
.main-feed {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* 面包屑 (独立，无背景) */
.breadcrumb {
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 0 4px;
}
.breadcrumb a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.breadcrumb a:hover {
    color: #2563eb;
}
.breadcrumb span.current {
    color: #1e3a8a;
    font-weight: 500;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 文章正文卡片 */
.article-detail-container {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

/* 文章标题 */
.detail-title {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    line-height: 1.4;
    margin-bottom: 20px;
}

/* 元信息 */
.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 24px;
}
.detail-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.detail-meta i { color: #9ca3af; }
.meta-right {
    margin-left: auto;
    display: flex;
    gap: 20px;
}

/* 分割线 */
.divider {
    border: none;
    border-top: 1px solid #f3f4f6;
    margin-bottom: 30px;
}

/* 文章内容区 */
.detail-content {
    font-size: 16px;
    color: #374151;
    line-height: 1.8;
}
.detail-content h2 {
    font-size: 22px;
    color: #1e3a8a;
    margin: 30px 0 16px 0;
    font-weight: 700;
    padding-left: 12px;
    border-left: 4px solid #2563eb;
}
.detail-content p {
    margin-bottom: 20px;
    text-align: justify;
}
.detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 独立卡片基础样式 (用于上下篇和评论区) */
.separate-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-top: 30px; /* 距离上面模块 30 像素 */
}

/* 上一篇/下一篇 */
.article-nav {
    display: flex;
    justify-content: space-between;
}
.nav-prev, .nav-next {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 45%;
}
.nav-next {
    text-align: right;
    align-items: flex-end;
}
.nav-label {
    font-size: 13px;
    color: #9ca3af;
}
.article-nav a {
    text-decoration: none;
    color: #374151;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-nav a:hover {
    color: #2563eb;
}

/* 评论区 */
.comments-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f3f4f6;
}
.comment-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.comment-form textarea:focus {
    border-color: #2563eb;
    background: #fff;
}
.form-row {
    display: flex;
    gap: 16px;
}
.form-row input {
    flex: 1;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.form-row input:focus {
    border-color: #2563eb;
    background: #fff;
}
.form-submit {
    display: flex;
    justify-content: flex-end;
}
.form-submit button {
    background: #5b6cff;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.form-submit button:hover {
    background: #4a59e6;
}

/* --- 空状态 (暂无评论) --- */
.empty-comment-tip {
    background: #f1f5f9;
    color: #94a3b8;
    text-align: center;
    padding: 40px 20px;
    border-radius: 8px;
    font-size: 15px;
    border: 1px dashed #e2e8f0;
}

/* --- 评论列表样式 (有数据时展示) --- */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.comment-item {
    display: flex;
    gap: 16px;
}
.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 20px;
    flex-shrink: 0;
}
.comment-content {
    flex: 1;
    min-width: 0;
}
.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.comment-author {
    font-size: 15px;
    font-weight: 600;
    color: #1e3a8a;
}
.comment-time {
    font-size: 12px;
    color: #9ca3af;
}
.comment-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 12px;
}
.comment-actions {
    display: flex;
    gap: 16px;
    font-size: 13px;
}
.comment-actions a {
    color: #6b7280;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}
.comment-actions a:hover {
    color: #2563eb;
}

/* 嵌套回复 */
.reply-list {
    margin-top: 16px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.reply-item {
    display: flex;
    gap: 12px;
}
.reply-item .comment-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
}
.reply-item .comment-author {
    font-size: 14px;
    color: #2563eb;
}
.reply-item .comment-text {
    font-size: 13px;
    margin-bottom: 8px;
}

/* ----- 右侧侧边栏（悬浮） ----- */
.right-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-title i {
    color: #2563eb;
    font-size: 18px;
}

/* 栏目名称 */
.category-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.category-list a {
    display: block;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    font-size: 13px;
    text-align: center;
    transition: all 0.2s ease;
}
.category-list a:hover {
    background: #eff6ff;
    color: #2563eb;
    transform: translateY(-2px);
}

/* 热门文章列表 */
.latest-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.latest-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.latest-item:hover .latest-title {
    color: #2563eb;
}
.latest-img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f3f4f6;
}
.latest-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.latest-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.latest-title {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.latest-time {
    font-size: 11px;
    color: #9ca3af;
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .home-layout { flex-direction: column; padding: 20px; }
    .right-sidebar { width: 100%; position: static; }
    .form-row { flex-direction: column; }
}
@media (max-width: 768px) {
    .article-detail-container { padding: 20px; }
    .separate-card { padding: 20px; margin-top: 20px; }
    .detail-title { font-size: 24px; }
    .meta-right { margin-left: 0; width: 100%; justify-content: flex-start; margin-top: 10px;}
    .article-nav { flex-direction: column; gap: 20px; }
    .nav-next { text-align: left; align-items: flex-start; }
    .nav-prev, .nav-next { max-width: 100%; }
}
