/* article-detail.css - 文章详情页样式 */

/* 文章详情区块 */
.article-detail-section {
    padding-top: 100px;
    background: #f8fafc;
}

.article-detail {
    max-width: 1200px;
    margin: 0 auto;
}

/* 文章头部 */
.article-header {
    background: white;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.article-category {
    margin-bottom: 15px;
}

.article-category a {
    background: #2563eb;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.article-title {
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
}

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

.author-title {
    font-size: 0.85rem;
    color: #64748b;
}

.article-stats {
    display: flex;
    gap: 20px;
    color: #64748b;
    font-size: 0.9rem;
}

.article-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 文章特色图片 */
.article-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

/* 文章主体 */
.article-body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-bottom: 30px;
}

.article-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.article-intro {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #475569;
    border-left: 4px solid #2563eb;
    padding-left: 20px;
    margin-bottom: 30px;
}

.article-content h2 {
    font-size: 1.8rem;
    color: #1e293b;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.article-content h3 {
    font-size: 1.4rem;
    color: #1e293b;
    margin: 30px 0 15px;
}

.article-content p {
    line-height: 1.8;
    color: #475569;
    margin-bottom: 15px;
}

.article-content ul,
.article-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.article-content li {
    line-height: 1.8;
    color: #475569;
    margin-bottom: 10px;
}

.article-content strong {
    color: #1e293b;
}

/* 表格样式 */
.article-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.article-table thead {
    background: #2563eb;
    color: white;
}

.article-table th,
.article-table td {
    padding: 12px 15px;
    text-align: left;
}

.article-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
}

.article-table tbody tr:hover {
    background: #f8fafc;
}

/* 文章标签 */
.article-tags {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-label {
    font-weight: 600;
    color: #1e293b;
}

.tag {
    background: #e2e8f0;
    color: #475569;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #2563eb;
    color: white;
}

/* 侧边栏 */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

/* 作者小工具 */
.author-widget {
    text-align: center;
}

.author-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: block;
}

.author-widget h3 {
    margin-bottom: 5px;
}

.author-widget p {
    color: #64748b;
    margin-bottom: 15px;
}

.author-stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.author-stats .stat {
    text-align: center;
}

.author-stats .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
}

.author-stats .stat-label {
    font-size: 0.85rem;
    color: #64748b;
}

/* 目录小工具 */
.toc-list {
    list-style: none;
}

.toc-list li {
    margin-bottom: 10px;
}

.toc-list a {
    color: #475569;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 0;
}

.toc-list a:hover {
    color: #2563eb;
    padding-left: 10px;
}

/* 相关文章小工具 */
.related-list {
    list-style: none;
}

.related-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

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

.related-list a {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: #1e293b;
}

.related-list img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.related-info h4 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    line-height: 1.4;
}

.related-info span {
    font-size: 0.8rem;
    color: #64748b;
}

/* 文章底部 */
.article-footer {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 点赞和分享 */
.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
}

.btn-like {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-like:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #ef4444;
}

.btn-like i {
    font-size: 1.2rem;
}

.btn-like.liked {
    background: #fee2e2;
    border-color: #ef4444;
    color: #ef4444;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-buttons span {
    color: #64748b;
    margin-right: 5px;
}

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

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn.wechat {
    background: #07c160;
}

.share-btn.weibo {
    background: #e6162d;
}

.share-btn.qq {
    background: #12b7f5;
}

.share-btn.link {
    background: #64748b;
}

/* 评论区 */
.comments-section {
    margin-top: 40px;
}

.comments-section h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 30px;
}

/* 评论表单 */
.comment-form {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-input {
    flex: 1;
}

.comment-input textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.comment-input textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-input .btn {
    margin-top: 10px;
}

/* 评论列表 */
.comment {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.comment:last-child {
    border-bottom: none;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: #1e293b;
}

.comment-time {
    font-size: 0.85rem;
    color: #94a3b8;
}

.comment-content p {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.btn-reply {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.btn-reply:hover {
    color: #2563eb;
}

/* 加载更多按钮 */
.btn-load-more {
    display: block;
    width: 100%;
    padding: 12px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-top: 30px;
}

.btn-load-more:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* 响应式 */
@media (max-width: 1024px) {
    .article-body {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .article-header {
        padding: 25px;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-content {
        padding: 25px;
    }
    
    .article-footer {
        padding: 25px;
    }
    
    .article-actions {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .comment-form {
        flex-direction: column;
    }
    
    .comment {
        flex-direction: column;
    }
}
