/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f7f8fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #165DFF;
}

/* 导航栏 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: #165DFF;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.nav a.active, .nav a:hover {
    color: #165DFF;
}

/* 博客Banner */
.blog-banner {
    background: linear-gradient(135deg, #165DFF 0%, #722ED1 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.blog-banner h1 {
    font-size: 36px;
    margin-bottom: 12px;
    font-weight: 600;
}

.blog-banner p {
    font-size: 18px;
    opacity: 0.9;
}

/* 分类标签 */
.blog-category {
    background-color: #fff;
    padding: 24px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-tabs {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.tab-item {
    padding: 8px 20px;
    border: 1px solid #e5e6eb;
    border-radius: 20px;
    background-color: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-item:hover {
    border-color: #165DFF;
    color: #165DFF;
}

.tab-item.active {
    background-color: #165DFF;
    border-color: #165DFF;
    color: #fff;
}

/* 文章列表 - 4列布局 */
.blog-list {
    padding: 48px 0;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.article-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.article-cover img {
    width: 100%;
    height: 225px;
    object-fit: cover;
    display: block;
}

.article-content {
    padding: 20px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: #86909c;
}

.category-tag {
    padding: 2px 8px;
    background-color: #e8f3ff;
    color: #165DFF;
    border-radius: 4px;
    font-weight: 500;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #1d2129;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.page-item {
    padding: 8px 14px;
    border: 1px solid #e5e6eb;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.page-item:hover, .page-item.active {
    background-color: #165DFF;
    border-color: #165DFF;
    color: #fff;
}

.page-more {
    padding: 8px 14px;
    color: #86909c;
}

/* 页脚 */
.footer {
    background-color: #1d2129;
    color: #fff;
    padding: 48px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-logo a {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    display: inline-block;
    margin-bottom: 8px;
}

.footer-logo p {
    color: #86909c;
    font-size: 14px;
}

.footer-links h4, .footer-contact h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #fff;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a, .footer-contact p {
    color: #86909c;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #165DFF;
}

.footer-copyright {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #373c43;
    color: #86909c;
    font-size: 14px;
}

/* 响应式适配 */
@media (max-width: 1200px) {
    .article-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    .blog-banner h1 {
        font-size: 28px;
    }
    .blog-banner p {
        font-size: 16px;
    }
    .article-grid {
        grid-template-columns: 1fr;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}