/* 博客首页样式 */

.main-content {
    margin-top: 80px;
    padding: 2rem 0;
    min-height: calc(100vh - 80px - 300px);
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

/* 文章列表区域 */
.articles-section {
    min-width: 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 2rem 0 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title:first-child {
    margin-top: 0;
}

/* 置顶文章 */
.top-posts-container {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.top-post-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 2rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.top-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.top-post-card .post-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.top-post-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.top-post-card .post-summary {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.top-post-card .post-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 精选文章 */
.featured-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.post-card-cover {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.post-card-body {
    padding: 1.5rem;
}

.post-card-category {
    display: inline-block;
    background: linear-gradient(45deg, #FF6B35, #F7931E);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.post-card-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-summary {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #999;
}

.post-card-stats {
    display: flex;
    gap: 1rem;
}

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

.post-tag {
    background: #f0f0f0;
    color: #666;
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.post-tag:hover {
    background: #FF6B35;
    color: white;
}

/* 最新文章列表 */
.recent-posts-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.recent-post-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    gap: 1.5rem;
}

.recent-post-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    transform: translateX(5px);
}

.recent-post-cover {
    width: 200px;
    height: 150px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.recent-post-content {
    flex: 1;
    min-width: 0;
}

.recent-post-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    color: #333;
    line-height: 1.4;
}

.recent-post-summary {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 统计网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* 分类列表 */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-item:hover {
    background: #FF6B35;
    color: white;
    transform: translateX(5px);
}

.category-name {
    font-weight: 500;
}

.category-count {
    background: white;
    color: #666;
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
}

.category-item:hover .category-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud-item {
    padding: 0.4rem 0.8rem;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-cloud-item:hover {
    background: #FF6B35;
    color: white;
    transform: scale(1.05);
}

/* 热门文章 */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-post-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popular-post-item:hover {
    background: #FF6B35;
    color: white;
    transform: translateX(5px);
}

.popular-post-rank {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FF6B35;
    min-width: 30px;
}

.popular-post-item:hover .popular-post-rank {
    color: white;
}

.popular-post-info {
    flex: 1;
    min-width: 0;
}

.popular-post-title {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.popular-post-stats {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .featured-posts-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 0 1rem;
    }

    .main-content {
        margin-top: 140px;
    }

    .top-post-card h3 {
        font-size: 1.4rem;
    }

    .recent-post-card {
        flex-direction: column;
    }

    .recent-post-cover {
        width: 100%;
        height: 200px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
