/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

a {
    text-decoration: none;
    color: #333;
}

ul {
    list-style: none;
}

/* Header Styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #ff5722;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ff5722;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%);
    color: white;
    text-align: center;
    padding: 60px 0;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Featured Games Section */
.featured-games {
    padding: 60px 0;
}

.featured-games h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #333;
}

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

.game-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.game-card a {
    display: block;
    width: 100%;
    height: 100%;
}

.game-image {
    height: 150px;
    background-color: #f1f1f1;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.game-card h3 {
    padding: 15px;
    font-size: 16px;
    text-align: center;
}

/* Game Categories Section */
.game-categories {
    background-color: #fff;
    padding: 60px 0;
}

.game-categories h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.category {
    padding: 10px 20px;
    background-color: #f8f9fa;
    border-radius: 30px;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

.category:hover {
    background-color: #ff5722;
    color: white;
}

/* Popular Games Section */
.popular-games {
    padding: 60px 0;
}

.popular-games h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

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

.popular-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.popular-item:hover {
    transform: translateY(-5px);
}

.popular-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.popular-image {
    height: 180px;
    background-color: #f1f1f1;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.popular-item h3 {
    padding: 15px;
    font-size: 18px;
    text-align: center;
}

/* All Games Section */
.all-games {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.all-games h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #333;
}

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

.all-games .game-card {
    margin-bottom: 20px;
}

/* Image Loading Error Styling */
.image-error {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0 !important;
    background-image: none !important;
    color: #999;
    font-size: 12px;
}

.image-error::after {
    content: "Image not available";
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 40px 0;
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.footer-links li {
    margin: 0 15px;
}

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

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

.copyright {
    color: #999;
    margin-top: 20px;
    font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 15px;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .games-grid, .popular-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .all-games .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    
    .footer-links li {
        margin: 5px 10px;
    }
}

@media (max-width: 480px) {
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h2 {
        font-size: 1.75rem;
    }
    
    .featured-games h2, .game-categories h2, .popular-games h2, .all-games h2 {
        font-size: 1.5rem;
    }

    .games-grid, .popular-grid, .all-games .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* 加载状态样式 */
.loading {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

/* 按类别游戏部分样式 */
.games-by-category {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.games-by-category h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #333;
}

.category-section {
    margin-bottom: 40px;
}

.category-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
    padding-left: 10px;
    border-left: 4px solid #ff5722;
}

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

@media (max-width: 768px) {
    .category-games {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

@media (max-width: 480px) {
    .category-games {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .games-by-category h2 {
        font-size: 1.5rem;
    }
    
    .category-section h3 {
        font-size: 1.2rem;
    }
} 