/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

a:hover {
    color: #1e88e5;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #1e88e5;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-left: 20px;
}

.main-nav a {
    font-size: 16px;
    font-weight: 500;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* 主要内容区域 */
.main {
    padding: 20px 0;
    min-height: calc(100vh - 150px);
}

.breadcrumb {
    padding: 10px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb a:hover {
    color: #1e88e5;
}

.section-title {
    font-size: 22px;
    margin: 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

/* 轮播图 */
.slider {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 30px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
}

.slide-content h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

/* 文章卡片 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.article-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-image {
    height: 180px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 15px;
}

.article-content h3 {
    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: #999;
    margin-bottom: 10px;
}

.article-desc {
    font-size: 14px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 分类区块 */
.category-section {
    margin-bottom: 40px;
}

.article-list {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.article-item:last-child {
    border-bottom: none;
}

.article-item a {
    display: flex;
}

.article-thumb {
    width: 100px;
    height: 70px;
    flex-shrink: 0;
    margin-right: 15px;
    overflow: hidden;
    border-radius: 4px;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta span {
    margin-right: 10px;
    font-size: 12px;
    color: #999;
}

.more-link {
    text-align: right;
    padding: 15px;
    background-color: #f9f9f9;
}

.more-link a {
    color: #666;
    font-size: 14px;
}

.more-link a:hover {
    color: #1e88e5;
}

/* 列表页样式 */
.list-title {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.list-item {
    padding: 15px;
    background-color: #fff;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.list-item a {
    display: flex;
}

.item-thumb {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    margin-right: 15px;
    overflow: hidden;
    border-radius: 4px;
}

.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.item-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta span {
    margin-right: 10px;
    font-size: 12px;
    color: #999;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.pagination a {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
}

.pagination a:hover {
    background-color: #f5f5f5;
}

.pagination .prev,
.pagination .next {
    min-width: 80px;
    text-align: center;
}

/* 文章详情页样式 */
.article-detail {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.article-title {
    font-size: 24px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-meta {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.article-meta span {
    margin-right: 15px;
}

.article-image {
    margin-bottom: 20px;
    text-align: center;
}

.article-image img {
    max-height: 400px;
    width: auto;
    margin: 0 auto;
    border-radius: 4px;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.article-content p {
    margin-bottom: 15px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 15px auto;
    display: block;
}

.article-tags {
    margin: 20px 0;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.prev-article,
.next-article {
    width: 48%;
}

.prev-article span,
.next-article span {
    display: block;
    font-size: 14px;
    color: #999;
    margin-bottom: 5px;
}

.prev-article a,
.next-article a {
    font-size: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.next-article {
    text-align: right;
}

/* 相关文章 */
.related-articles {
    margin-top: 40px;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
}

.friend-links {
    margin-bottom: 20px;
}

.friend-links h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #fff;
}

.links-container {
    display: flex;
    flex-wrap: wrap;
}

.links-container a {
    color: #bbb;
    margin-right: 15px;
    margin-bottom: 10px;
    font-size: 14px;
}

.links-container a:hover {
    color: #fff;
}

.copyright {
    text-align: center;
    font-size: 14px;
    color: #999;
    padding-top: 20px;
    border-top: 1px solid #444;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .slider {
        height: 200px;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-item a,
    .list-item a {
        flex-direction: column;
    }

    .article-thumb,
    .item-thumb {
        width: 100%;
        height: 150px;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .article-nav {
        flex-direction: column;
    }

    .prev-article,
    .next-article {
        width: 100%;
        margin-bottom: 10px;
    }

    .next-article {
        text-align: left;
    }
}