/* 游戏资讯网站样式文件 */

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

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

/* 导航栏样式 - 渐变绿色背景 */
.navbar {
    background: linear-gradient(135deg, #28a745, #20c997, #17a2b8);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.nav-container img{
    height: 60px;
}

.logo:hover {
    color: #e8f5e8;
}

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

.nav-menu a,
.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-menu a:hover,
.nav-menu a.active,
.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px);
}

/* 确保首页选中状态生效 */
.nav-menu li a.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px);
}

/* 主要内容区域 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
    min-height: calc(100vh - 120px);
}

/* 首页轮播图样式 */
.hero-section {
    background: linear-gradient(135deg, #28a745, #20c997, #17a2b8);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    font-weight: 700;
    letter-spacing: 1px;
}

.hero-content p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
    opacity: 0.95;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-content .btn {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hero-content .btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* 新闻卡片样式 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

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

.news-card a,
.news-card a:hover,
.news-card a:visited,
.news-card a:active {
    text-decoration: none !important;
}

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

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

.card-content {
    padding: 1.5rem;
    text-decoration: none;
}

.card-content * {
    text-decoration: none;
}

.card-content h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    line-height: 1.4;
}

.card-content h3 a {
    color: inherit;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.card-content h3 a:hover {
    color: #28a745;
}

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

.card-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.9rem;
}

/* 资讯列表页样式 */
.page-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.news-item img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.news-item-content {
    flex: 1;
}

.news-item h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.news-item h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-item h3 a:hover {
    color: #28a745;
}

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

/* 资讯详情页样式 */
.article-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.article-title {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.article-meta {
    color: #666;
    font-size: 0.95rem;
}

.article-image {
    width: 100%;
    max-width: 600px;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.article-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    line-height: 1.8;
}

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

.article-content p {
    margin-bottom: 1.5rem;
    text-indent: 4ch;
    line-height: 2.5;
}

.article-content p img{
    display: block;
    margin: auto;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0 2rem 0;
    padding: 1rem;
}

.pagination a,
.pagination span {
    padding: 0.6rem 1rem;
    border: 1px solid #dee2e6;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
    background: #f8f9fa;
}

.pagination a:hover {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.pagination .current,
.pagination .active {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

.pagination .disabled {
    color: #adb5bd;
    background-color: #e9ecef;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.pagination .disabled:hover {
    transform: none;
    box-shadow: none;
    background-color: #e9ecef;
    color: #adb5bd;
}

/* 分页信息文字 */
.pagination-info {
    color: #666;
    font-size: 0.9rem;
    margin: 0 1rem;
    padding: 0.6rem 0;
}

/* 分页容器样式 */
.pagination-section {
    margin: 3rem 0 2rem 0;
    text-align: center;
}

.pagination-container {
    display: inline-block;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 1rem;
}

.pagination-container .pagination {
    margin: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

/* 页脚样式 - 居中的备案号 */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .hero-section {
        height: 300px;
        margin-bottom: 2rem;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
        letter-spacing: 0.5px;
    }

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

    .hero-content .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

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

    .news-item {
        flex-direction: column;
    }

    .news-item img {
        width: 100%;
        height: 200px;
    }

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

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

@media (max-width: 480px) {
    .main-content {
        padding: 1rem 10px;
    }

    .card-content,
    .article-content {
        padding: 1rem;
    }

    .hero-section {
        height: 250px;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }

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

    .hero-content .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
    }
}
