/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
}
ul li{
    list-style: none;
}
li{
    line-height: 1.6;
}


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

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}
.logo-container{
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    color: #764ba2;
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: #667eea;
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: #667eea;
}

.nav-links a:hover::after {
    width: 100%;
}

.search-container {
    display: flex;
    gap: 10px;
}

/* 菜单按钮 */
.menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    z-index: 1001;
    position: relative;
    order: 3;
}

/* 导航栏容器布局 */
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

/* 导航链接顺序 */
.nav-links {
    display: flex;
    gap: 20px;
    order: 2;
}

/* 搜索容器顺序 */
.search-container {
    display: flex;
    gap: 10px;
    order: 1;
}

/* 移动端导航菜单 */
@media (max-width: 768px) {
    .menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        overflow: hidden;
    }
    
    .nav-links.mobile-menu {
        right: 0;
    }
    
    .nav-links a {
        font-size: 18px;
    }
    
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
}

#search-input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    transition: all 0.3s ease;
}

#search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

#search-btn {
    padding: 8px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#search-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

/* 主要内容 */
.main-content {
    padding: 40px 0;
}

.main-content h1 {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    font-size: 36px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.game-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

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

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

.game-info {
    padding: 15px;
}

.game-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.game-info p {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 页脚 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-info h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #667eea;
}

.footer-info p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.footer-info a {
    color: #667eea;
    text-decoration: none;
}

.footer-info a:hover {
    text-decoration: underline;
}

.footer-links h4 {
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-links ul {
    list-style: none;
}

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

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    color: #999;
}

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

.game-details .container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.game-header {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.game-header img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.game-header-info {
    flex: 1;
    min-width: 300px;
}

.game-header-info h1 {
    color: #333;
    margin-bottom: 20px;
    text-shadow: none;
}

.game-header-info p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #666;
}

.play-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.back-btn {
    display: inline-block;
    margin-bottom: 20px;
    padding: 8px 20px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.related-games {
    margin-top: 50px;
}

.related-games h2 {
    margin-bottom: 20px;
    color: #333;
}

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

.related-game-card {
    background: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.related-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.related-game-info {
    padding: 10px;
}

.related-game-info h3 {
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

/* 其他页面样式 */
.page-content {
    padding: 40px 0;
}

.page-content .container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.page-content h1 {
    color: #333;
    margin-bottom: 20px;
    text-shadow: none;
    text-align: left;
}

.page-content p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #666;
}

.page-content h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

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

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .search-container {
        width: 100%;
        justify-content: center;
    }

    #search-input {
        flex: 1;
        max-width: 300px;
    }

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

    .game-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .game-header img {
        width: 100%;
        max-width: 400px;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

    .footer-info,
    .footer-links {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logo-container{
        width: 100%;
    }
    .games-grid {
        grid-template-columns: 1fr;
    }

    .main-content h1 {
        font-size: 28px;
    }

    .game-card img {
        height: 150px;
    }

    .related-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}