/* Blog Styles */

/* 博客首页 */
.blog-index {
    max-width: 800px;
    margin: 0 auto;
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.blog-description {
    color: #6b7280;
    font-size: 1.125rem;
}

/* 文章卡片网格 */
.posts-grid {
    display: grid;
    gap: 2rem;
}

.post-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
    flex-wrap: wrap;
}

.post-meta .author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.author-avatar-small {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #10b981;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e5e7eb;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #4b5563;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-color);
}

.post-title a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.post-excerpt {
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.read-more {
    font-weight: 500;
    font-size: 0.875rem;
}

/* 文章详情 */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.blog-post .post-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.post-content {
    line-height: 1.8;
    font-size: 1.125rem;
}

.post-content h1, .post-content h2, .post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.post-content h3 {
    font-size: 1.25rem;
}

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

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-content code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #6b7280;
    font-style: italic;
}

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.update-time {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    font-weight: 500;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.page-btn {
    padding: 0.5rem 1rem;
    background: #e5e7eb;
    border-radius: 0.375rem;
    font-weight: 500;
    color: var(--text-color);
}

.page-btn:hover {
    background: #d1d5db;
    text-decoration: none;
}

.page-info {
    color: #6b7280;
    font-size: 0.875rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-post .post-title {
        font-size: 1.75rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
}
