/**
 * Article.css - 文章详情页样式
 * 包含文章头部、主体内容、作者信息、相关文章、评论区等样式
 */

/* ========== 文章头部 ========== */
.article-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 6rem 0 4rem;
    color: #fff;
    text-align: center;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.article-meta-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.article-meta-header i {
    margin-right: 0.5rem;
}

/* ========== 文章主体 ========== */
.article-container {
    margin-top: -3rem;
    margin-bottom: 5rem;
}

.article-main {
    background: #fff;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.article-cover {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.article-tags {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.article-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #667eea;
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-tag:hover {
    background: #667eea;
    color: #fff;
}

.article-body {
    font-size: 1.1rem;
    line-height: 2;
    color: #334155;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 600;
}

.article-body h2 {
    font-size: 1.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.article-body h3 {
    font-size: 1.5rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body img {
    max-width: 100%;
    border-radius: 10px;
    margin: 2rem 0;
}

.article-body blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: #64748b;
    font-style: italic;
}

.article-body code {
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #667eea;
}

.article-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 2rem 0;
}

.article-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.article-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
    transform: translateY(-2px);
}

.share-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.share-btn.wechat:hover {
    background: #09bb07;
    color: #fff;
}

.share-btn.weibo:hover {
    background: #e6162d;
    color: #fff;
}

.share-btn.qq:hover {
    background: #12b7f5;
    color: #fff;
}

.share-btn.link:hover {
    background: #667eea;
    color: #fff;
}

/* ========== 作者信息 ========== */
.author-card {
    background: #f8fafc;
    border-radius: 15px;
    padding: 2rem;
    margin-top: 3rem;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h5 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.author-info p {
    color: #64748b;
    margin: 0;
}

/* ========== 相关文章 ========== */
.related-articles {
    margin-top: 4rem;
}

.related-articles h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #1e293b;
}

.related-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.related-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-content {
    padding: 1.5rem;
}

.related-content h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.related-content h5 a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-content h5 a:hover {
    color: #667eea;
}

.related-meta {
    color: #64748b;
    font-size: 0.9rem;
}

/* ========== 评论区 ========== */
.comments-section {
    margin-top: 4rem;
    background: #fff;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.comments-section h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #1e293b;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-main {
        padding: 2rem 1.5rem;
    }

    .article-meta-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .author-card {
        flex-direction: column;
        text-align: center;
    }
}
