/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.7;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background-color: #1a202c;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #4299e1;
}

.nav-list {
    display: flex;
    gap: 25px;
}

.nav-item a {
    color: #e2e8f0;
    font-size: 16px;
}

.nav-item a:hover {
    color: #4299e1;
}

/* 移动端导航切换 */
.mobile-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* 英雄区样式 */
.hero {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-title {
    font-size: 42px;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 30px;
    color: #e2e8f0;
}

.hero-btn {
    display: inline-block;
    background-color: #4299e1;
    color: white;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.hero-btn:hover {
    background-color: #3182ce;
}

/* 游戏列表样式 */
.games-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #2d3748;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.game-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.game-card-img {
    height: 200px;
    overflow: hidden;
}

.game-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-card-img img {
    transform: scale(1.05);
}

.game-card-content {
    padding: 20px;
}

.game-card-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: #2d3748;
}

.game-card-desc {
    color: #718096;
    margin-bottom: 15px;
    font-size: 14px;
}

.game-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #a0aec0;
    margin-bottom: 15px;
}

.game-card-btn {
    display: inline-block;
    background-color: #4299e1;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
}

/* 游戏详情页样式 */
.game-detail {
    padding: 40px 0;
}

.game-detail-header {
    margin-bottom: 40px;
}

.game-detail-title {
    font-size: 36px;
    color: #2d3748;
    margin-bottom: 15px;
}

.game-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    color: #4a5568;
}

.game-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.game-detail-meta span::before {
    content: "•";
    color: #4299e1;
    font-weight: bold;
}

.game-detail-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.game-detail-main {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.game-detail-sidebar {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.game-detail-img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 30px;
}

.game-detail-section {
    margin-bottom: 30px;
}

.game-detail-subtitle {
    font-size: 24px;
    color: #2d3748;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.game-detail-text {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 15px;
}

.game-specs-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f7fafc;
}

.game-specs-label {
    font-weight: 600;
    color: #2d3748;
}

.game-specs-value {
    color: #718096;
}

/* 分类页样式 */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid #4299e1;
    border-radius: 20px;
    background-color: white;
    color: #4299e1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: #4299e1;
    color: white;
}

/* 关于页样式 */
.about-page {
    padding: 60px 0;
}

.about-content {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.about-section {
    margin-bottom: 30px;
}

.about-title {
    font-size: 28px;
    color: #2d3748;
    margin-bottom: 20px;
}

.about-text {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* 页脚样式 */
.footer {
    background-color: #1a202c;
    color: #e2e8f0;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: white;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #a0aec0;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #4299e1;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #2d3748;
    color: #a0aec0;
    font-size: 14px;
}

/* 响应式适配 */
@media (max-width: 992px) {
    .game-detail-content {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .nav-list {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background-color: #1a202c;
        width: 100%;
        padding: 20px;
        transition: left 0.3s ease;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .nav-list.active {
        left: 0;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .games-section {
        padding: 40px 0;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-detail-title {
        font-size: 28px;
    }
    
    .about-content {
        padding: 20px;
    }
}