/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

a:hover {
    color: #007bff;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

/* 导航样式 */
nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    padding: 5px 10px;
    border-radius: 4px;
}

nav ul li a:hover {
    background-color: #f0f0f0;
}

/* 主要内容样式 */
.main-content {
    padding: 30px 0;
}

.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* 文章列表样式 */
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.article-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.article-item:hover {
    transform: translateY(-5px);
}

.article-image {
    height: 180px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-info {
    padding: 15px;
}

.article-title {
    font-size: 18px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

/* 分类标题样式 */
.category-title {
    font-size: 20px;
    margin: 30px 0 15px;
    padding-left: 10px;
    border-left: 4px solid #007bff;
}

/* 文章详情页样式 */
.article-detail {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.article-header {
    margin-bottom: 20px;
}

.article-detail-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.article-detail-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.article-content {
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 15px;
}

/* 分页导航样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.pagination a {
    padding: 8px 15px;
    margin: 0 5px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pagination a:hover {
    background-color: #007bff;
    color: #fff;
}

/* 友情链接样式 */
.friend-links {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.friend-links-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.friend-links-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.friend-links-content a {
    padding: 5px 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
}

.friend-links-content a:hover {
    background-color: #007bff;
    color: #fff;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 15px;
    }
    
    nav ul li {
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .article-list {
        grid-template-columns: 1fr;
    }
}