/* 扁平化设计风格 - 全局样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #34495e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.2s;
}

a:hover {
    color: var(--accent-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 扁平化头部样式 */
header {
    background-color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav ul li a {
    padding: 8px 15px;
    font-weight: 500;
    border-radius: 4px;
}

nav ul li a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 主要内容区域 */
.main-content {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
}

/* 扁平化卡片设计 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 4px solid var(--primary-color);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark-color);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 15px;
}

/* 分类标签 */
.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

/* 文章详情页 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 30px;
    text-align: center;
}

.article-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--dark-color);
    line-height: 1.3;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #7f8c8d;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
    border-bottom: 4px solid var(--primary-color);
}

.article-content {
    line-height: 1.8;
    font-size: 16px;
}

.article-content p {
    margin-bottom: 20px;
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 20px;
    border-radius: 4px;
    background-color: var(--light-color);
    font-weight: 500;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 友情链接 */
.friend-links {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.friend-links-container a {
    padding: 8px 15px;
    background-color: var(--light-color);
    border-radius: 20px;
    font-size: 14px;
}

.friend-links-container a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

.copyright {
    font-size: 14px;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 26px;
    }
    
    .article-meta {
        gap: 10px;
    }
}