/* ===== 文章详情页样式 ===== */
.article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.single-article {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 3rem;
}

/* 文章头部 */
.article-header {
    padding: 3rem 3rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.article-categories {
    margin-bottom: 1.5rem;
}

.category-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-badge:hover {
    background: #bae6fd;
    transform: translateY(-1px);
}

.article-title {
    font-size: 2.75rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #0f172a;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.meta-author img {
    border-radius: 50%;
}

.meta-author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #334155;
}

.post-date {
    font-size: 0.875rem;
    color: #64748b;
}

.meta-stats {
    color: #64748b;
    font-size: 0.875rem;
}

/* 特色图片 */
.article-featured-image {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
}

.featured-img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
    font-style: italic;
}

/* 内容区域布局 */
.article-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    padding: 2rem 3rem;
}

.article-content {
    max-width: 800px;
}

/* 文章目录 */
.table-of-contents {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid #2563eb;
}

.toc-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.toc-list {
    list-style: none;
}

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    color: #475569;
    text-decoration: none;
    display: block;
    padding: 0.375rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.toc-list a:hover {
    color: #2563eb;
    padding-left: 0.5rem;
    transition: all 0.2s ease;
}

/* 正文内容样式 */
.entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #334155;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content h2 {
    font-size: 2rem;
    margin: 2.5rem 0 1.5rem;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.entry-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: #334155;
}

.entry-content blockquote {
    border-left: 4px solid #2563eb;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: #f0f9ff;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #475569;
}

.entry-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

/* 标签样式 */
.article-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #f1f5f9;
}

.tags-label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 1rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    list-style: none;
}

.tag-item {
    background: #f1f5f9;
    color: #475569;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-item:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
}

/* 侧边栏样式 */
.article-sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.author-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.author-avatar img {
    border-radius: 50%;
    margin-bottom: 1rem;
}

.author-details h4 {
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.author-bio {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.author-link {
    font-size: 0.875rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.author-link:hover {
    text-decoration: underline;
}

/* 社交分享 */
.social-share {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.share-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #475569;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.share-btn.twitter {
    background: #000;
    color: white;
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.linkedin {
    background: #0a66c2;
    color: white;
}

.share-btn.copy-link {
    background: #94a3b8;
    color: white;
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* 相关文章 */
.related-posts {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.related-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #475569;
}

.related-list {
    list-style: none;
}

.related-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

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

.related-link {
    text-decoration: none;
    display: block;
}

.related-post-title {
    font-size: 0.9375rem;
    color: #334155;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.related-post-title:hover {
    color: #2563eb;
}

.related-date {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* 文章导航 */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: #e0f2fe;
    transform: translateY(-2px);
}

.nav-label {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.nav-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.125rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .article-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .article-sidebar {
        position: static;
    }
    
    .article-header,
    .article-content-wrapper {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .article-header,
    .article-content-wrapper {
        padding: 1.5rem;
    }
}

