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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

.logo {
    color: white;
    font-size: 1.8em;
    font-weight: bold;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

#searchInput {
    padding: 8px 15px;
    border: none;
    border-radius: 25px;
    outline: none;
    width: 250px;
    font-size: 14px;
}

#searchBtn {
    background: #ff6b6b;
    border: none;
    padding: 8px 15px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

#searchBtn:hover {
    background: #ff5252;
    transform: scale(1.1);
}

/* 导航样式 */
.nav {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 0;
}

.category-list {
    display: flex;
    list-style: none;
    gap: 15px;
    flex-wrap: wrap;
}

.category-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.category-btn:hover,
.category-btn.active {
    background: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* 主体内容 */
.main {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* 游戏网格 */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.game-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

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

.game-thumbnail {
    width: 100%;
    height: 150px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 15px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
}

.game-card h3 {
    font-size: 1.2em;
    margin-bottom: 8px;
    color: #333;
}

.game-card p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.game-category {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    margin-bottom: 10px;
}

.play-btn {
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* 加载动画 */
.loading {
    text-align: center;
    color: white;
    font-size: 1.2em;
    padding: 20px;
}

/* 底部 */
.footer {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    text-align: center;
    padding: 20px 0;
}

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

    #searchInput {
        width: 200px;
    }

    .category-list {
        justify-content: center;
    }

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

    .logo {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .game-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #searchInput {
        width: 180px;
    }
}