/* 全局样式 */
* {
    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: #1e88e5;
}

.container {
    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: #1e88e5;
}

/* 导航样式 */
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: #1e88e5;
    color: #fff;
}

/* 主要内容区 */
.main-content {
    padding: 30px 0;
    min-height: 70vh;
}

/* 文章列表样式 */
.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: 200px;
    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: 22px;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1e88e5;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination a {
    padding: 8px 16px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination a:hover {
    background-color: #1e88e5;
    color: #fff;
    border-color: #1e88e5;
}

/* 文章详情页样式 */
.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-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.article-content {
    line-height: 1.8;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
}

.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 友情链接样式 */
.friend-links {
    background-color: #fff;
    padding: 20px;
    margin-top: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.friend-links h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.links-container a {
    padding: 5px 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.links-container a:hover {
    background-color: #1e88e5;
    color: #fff;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
    margin-top: 30px;
}

.copyright {
    margin-top: 20px;
    font-size: 14px;
    color: #aaa;
}

/* 响应式设计 */
@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;
    }
}