* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

/* Blog Container */
.blog-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Category Section */
.category-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.category-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.category-toggle {
    background: none;
    border: none;
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s;
}

.category-toggle:hover {
    background: #f0f0f0;
}

.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 80px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.category-nav.expanded {
    max-height: 1000px;
}

.category-btn {
    padding: 6px 16px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.category-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.category-btn.active {
    background: #667eea;
    color: white;
}

/* Blog Layout */
.blog-layout {
    display: flex;
    gap: 20px;
}

/* Posts Section */
.posts-section {
    flex: 1;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

/* Post Card */
.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.post-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f0f0f0;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.post-card:hover .post-image img {
    transform: scale(1.08);
}

.post-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-category {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    width: fit-content;
}

.post-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 14px;
    line-height: 1.4;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #667eea;
}

.post-excerpt {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 18px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #999;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.post-date,
.post-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-meta svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
    grid-column: 1 / -1;
}

.no-posts p {
    font-size: 16px;
    color: #666;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 30px 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pagination-btn {
    padding: 10px 20px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.pagination-btn:hover:not(.disabled) {
    background: #667eea;
    color: white;
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
}

.pagination-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.total-posts {
    font-size: 12px;
    color: #999;
}

/* Sidebar - 使用sidebar.html自带的样式 */

/* Responsive */
@media (max-width: 1024px) {
    .blog-layout {
        flex-direction: column;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .blog-container {
        padding: 0 15px;
    }

    .category-section {
        padding: 15px;
    }

    .category-title {
        font-size: 18px;
    }

    .category-nav {
        gap: 8px;
    }

    .category-btn {
        padding: 6px 15px;
        font-size: 13px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .post-image {
        height: 180px;
    }

    .post-content {
        padding: 15px;
    }

    .post-title {
        font-size: 18px;
    }

    .post-excerpt {
        font-size: 13px;
    }

    .pagination {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .pagination-btn {
        width: 100%;
        text-align: center;
    }
}
