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