/* 文章主体布局 */
.article-main {
    padding: 4rem 0;
    margin-top: 3.5rem;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 3rem;
}

/* 文章头部样式 */
.article-header {
    margin-bottom: 3rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

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

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.author-name {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--foreground);
    text-decoration: none;
}

.post-info {
    color: var(--accent);
    font-size: 0.875rem;
    display: flex;
    gap: 1rem;
    margin-top: 0.25rem;
}

.article-header h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

/* 文章内容样式 */
.article-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--foreground);
}

.article-body p {
    margin-bottom: 1.5rem;
}

/* 文章底部操作栏 */
.article-footer {
    margin: 4rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.article-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--secondary);
}

.action-btn .icon {
    font-size: 1.25rem;
}

/* 评论区样式 */
.comments-section {
    margin-top: 4rem;
}

.comments-section h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.comment-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-input-wrapper {
    flex: 1;
}

.comment-input {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    resize: vertical;
    margin-bottom: 1rem;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* 评论列表样式 */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 500;
    color: var(--foreground);
    text-decoration: none;
}

.author-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--primary);
    color: white;
    border-radius: 1rem;
}

.comment-text {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

.action-link {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.action-link:hover {
    color: var(--foreground);
}

/* 回复列表样式 */
.replies-list {
    margin-top: 1rem;
    margin-left: 3rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border);
}

/* 右侧边栏样式 */
.article-sidebar {
    position: sticky;
    top: 5rem;
    height: fit-content;
}

.sidebar-section {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* 作者卡片样式 */
.author-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.author-header img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

.author-bio {
    color: var(--accent);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* 目录样式 */
.toc ul {
    list-style: none;
    padding: 0;
}

.toc a {
    display: block;
    padding: 0.5rem 0;
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s;
}

.toc a:hover,
.toc a.active {
    color: var(--primary);
}

/* 相关文章样式 */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-item {
    text-decoration: none;
    color: var(--foreground);
    transition: color 0.2s;
}

.related-item:hover {
    color: var(--primary);
}

.related-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.related-item p {
    font-size: 0.875rem;
    color: var(--accent);
}

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

    .article-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .article-main {
        padding: 2rem 0;
    }

    .article-header h1 {
        font-size: 2rem;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .article-actions {
        flex-wrap: wrap;
    }

    .comment-form {
        flex-direction: column;
    }

    .replies-list {
        margin-left: 1rem;
    }
} 