/* 扁平化设计风格 - 明亮色调 */
:root {
    --primary: #3498db;
    --secondary: #2ecc71;
    --accent: #e74c3c;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --text: #34495e;
    --gray: #95a5a6;
    --shadow: 0 2px 5px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--light);
    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;
    padding: 15px 0;
    box-shadow: var(--shadow);
    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);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    padding: 8px 15px;
    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: 8px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--secondary);
    color: var(--dark);
    position: relative;
}

/* 卡片式布局 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark);
    font-weight: 600;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--gray);
    margin-top: 15px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    background-color: var(--secondary);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 10px;
}

/* 文章详情页 */
.article-header {
    text-align: center;
    margin-bottom: 30px;
}

.article-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--dark);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--gray);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
    border-bottom: 5px solid var(--primary);
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 20px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a {
    padding: 8px 16px;
    border-radius: 4px;
    background-color: var(--light);
    font-weight: 500;
}

.pagination a:hover,
.pagination a.active {
    background-color: var(--primary);
    color: white;
}

/* 友情链接 */
.link-box {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: var(--shadow);
}

.link-box h3 {
    margin-bottom: 20px;
    color: var(--dark);
    font-size: 20px;
}

.link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.link-grid a {
    padding: 8px 15px;
    background-color: var(--light);
    border-radius: 20px;
    font-size: 14px;
}

.link-grid 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: var(--gray);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 15px;
    }
    
    nav ul li {
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 26px;
    }
}