/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 主要内容区域 */
.main-content {
    min-height: calc(100vh - 120px);
    padding-bottom: 2rem;
}



/* 区域标题 */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #1f2937;
    font-weight: 700;
}

/* 热门资讯区域 */
.featured-news {
    padding: 4rem 0;
    background-color: white;
}

.news-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.news-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.news-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.news-card.featured .news-image {
    height: 300px;
}

.news-content {
    padding: 1.5rem;
}

.news-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
    font-weight: 600;
    line-height: 1.4;
}

.news-content p {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4; /* 限制行数为4 */
    overflow: hidden;
}

.news-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #9ca3af;
}

.read-more {
    color: #3b82f6;
    font-weight: 600;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #1d4ed8;
}

/* 热门资讯卡片区域 */
.hot-news-cards {
    padding: 4rem 0;
    background-color: #f8fafc;
}

.news-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #e5e7eb;
}

.news-card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #3b82f6;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    position: absolute;
    top: 1rem;
    left: 1.5rem;
}

.card-tag {
    display: inline-block;
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    margin-left: 3.5rem;
}

.news-card-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 0.5rem;
}

.news-card-item p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
    font-size: 0.85rem;
}

.card-meta .date {
    color: #9ca3af;
}

.read-link {
    color: #3b82f6;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.read-link:hover {
    color: #1d4ed8;
}



/* 资讯列表 */
.news-list {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-item {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.news-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-info {
    padding: 2rem;
}

.news-info h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.news-info h2 a {
    transition: color 0.3s ease;
}

.news-info h2 a:hover {
    color: #3b82f6;
}

.news-info p {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.page-btn {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(.disabled) {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.page-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 2rem 0 1rem;
    color: #6b7280;
}

.breadcrumb a {
    color: #3b82f6;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #1d4ed8;
}

.breadcrumb span {
    margin: 0 0.5rem;
}

/* 文章详情 */
.article-detail {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.article-header {
    padding: 2rem 2rem 0;
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #6b7280;
    font-size: 0.9rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.article-image {
    padding: 0 2rem;
    margin: 2rem 0;
}

.article-image img {
    width: 100%;
    border-radius: 10px;
}

.article-content {
    padding: 0 2rem 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content .lead {
    font-size: 1.25rem;
    color: #374151;
    margin-bottom: 2rem;
    font-weight: 500;
}

.article-content h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: #1f2937;
}

.article-content h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.75rem;
    color: #374151;
}

.article-content p {
    text-indent: 2ch;
    margin-bottom: 1rem;
    color: #4b5563;
    line-height: 2.5;
}

.article-content p img{
    display: block;

    margin: auto;
}

.article-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.article-content blockquote {
    border-left: 4px solid #3b82f6;
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #374151;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.image-gallery img {
    border-radius: 8px;
}

.game-info {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.info-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.info-item:last-child {
    border-bottom: none;
}

/* 文章标签 */
.article-tags {
    padding: 1rem 2rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

/* 相关文章 */
.related-articles {
    padding: 2rem;
    border-top: 1px solid #e5e7eb;
}

.related-articles h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.related-list {
    display: grid;
    gap: 1rem;
}

.related-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.related-item:hover {
    background: #e5e7eb;
    transform: translateX(5px);
}

.related-item img {
    width: 500px;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
}

.related-item span {
    width: 500px;
    color: #374151;
    font-weight: 500;
    line-height: 1.4;
    align-self: center;
}

/* 页脚 */
.footer {
    background: #1f2937;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .news-card.featured {
        grid-template-columns: 1fr;
    }

    .news-item {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        gap: 1rem;
    }

    .news-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .news-card-item {
        padding: 1.25rem;
    }

    .card-icon {
        font-size: 1.5rem;
        top: 1.25rem;
        left: 1.25rem;
    }

    .card-tag {
        margin-left: 3rem;
        font-size: 0.75rem;
    }


    .article-title {
        font-size: 2rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .article-content .lead {
        font-size: 1.1rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card,
.category-card,
.news-item {
    animation: fadeInUp 0.6s ease-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}
