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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    position: relative;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

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

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: -250px;
    top: 0;
    width: 250px;
    height: 100%;
    background-color: #2c3e50;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    background-color: #3498db;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.sidebar-header .close-btn:hover {
    transform: scale(1.1);
}

.sidebar-menu {
    padding: 10px 0;
}

.sidebar-menu-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    color: #ecf0f1;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.sidebar-menu-item:hover, 
.sidebar-menu-item.active {
    background-color: #34495e;
    color: white;
    border-left-color: #3498db;
}

.sidebar-menu-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.sidebar-toggle {
    background-color: #3498db;
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: fixed;
    left: 20px;
    top: 20px;
    z-index: 999;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, background-color 0.2s;
}

.sidebar-toggle:hover {
    transform: scale(1.05);
    background-color: #2980b9;
}

.sidebar-category-header {
    padding: 15px 20px 10px;
    color: #bdc3c7;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-top: 1px solid #3d4d5d;
    margin-top: 10px;
    font-weight: 600;
}

.sidebar-category-header:first-of-type {
    border-top: none;
    margin-top: 0;
}

/* Content shift when sidebar is open */
.content-wrapper {
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper.sidebar-active {
    margin-left: 250px;
}

/* Header Styles */
header {
    background-color: #fff;
    padding: 15px 20px 15px 70px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.logo a:hover {
    color: #2980b9;
}

.main-menu {
    display: flex;
}

.main-menu li {
    margin-left: 20px;
}

.main-menu a {
    display: flex;
    align-items: center;
    color: #555;
    font-weight: 500;
    transition: color 0.2s;
    padding: 8px 0;
    position: relative;
}

.main-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s;
}

.main-menu a:hover::after {
    width: 100%;
}

.main-menu a i {
    margin-right: 8px;
}

.main-menu a:hover {
    color: #3498db;
}

.language-selector select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.2s;
}

.language-selector select:hover {
    border-color: #3498db;
}

/* Categories */
.categories {
    display: flex;
    flex-wrap: wrap;
    padding: 16px 20px;
    background-color: #fff;
    border-bottom: 1px solid #edf2f7;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.category-item {
    margin: 6px;
}

.category-item a {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f1f5f9;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.category-item a i {
    margin-right: 8px;
    color: #3498db;
}

.category-item a:hover {
    background-color: #3498db;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.category-item a:hover i {
    color: #fff;
}

/* Main Content */
main {
    padding: 20px 30px;
    flex: 1;
}

section {
    margin-bottom: 40px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 25px 30px;
    transition: transform 0.3s, box-shadow 0.3s;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

h2 {
    font-size: 24px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
    color: #2c3e50;
    font-weight: 600;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #3498db;
    border-radius: 3px;
}

h2 .view-more {
    float: right;
    font-size: 14px;
    font-weight: 500;
    color: #3498db;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

h2 .view-more:hover {
    background-color: #f1f5f9;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 25px;
}

.game-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 25px rgba(52, 152, 219, 0.15);
}

.game-image {
    position: relative;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

.game-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-info h3 {
    font-size: 15px;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
    font-weight: 600;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.game-category {
    font-size: 12px;
    color: #718096;
    background-color: #f1f5f9;
    padding: 3px 8px;
    border-radius: 12px;
}

.game-rating {
    font-size: 12px;
    color: #f39c12;
    font-weight: 600;
}

/* Multiplayer Section */
.multiplayer-section {
    padding: 30px;
}

.multiplayer-types {
    display: flex;
    gap: 25px;
}

.multiplayer-card {
    flex: 1;
    padding: 25px;
    background-color: #f8fafc;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e2e8f0;
}

.multiplayer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.multiplayer-card h3 {
    margin-bottom: 12px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.multiplayer-card p {
    margin-bottom: 20px;
    color: #718096;
}

.explore-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.2s;
}

.explore-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Make the Play Now button invisible while keeping the overlay effect */
.game-overlay .play-button {
    display: none; /* Hide the button */
}

.game-overlay:hover {
    background-color: rgba(52, 152, 219, 0.3); /* Lighter overlay to indicate clickable */
}

.game-overlay::after {
    content: "Play Game";
    color: white;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: rgba(52, 152, 219, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.game-overlay:hover::after {
    opacity: 1;
}

/* 查看更多游戏按钮 */
.view-more-container {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 10px;
}

.view-more-btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: #3498db;
    color: white;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.view-more-btn:hover {
    transform: translateY(-3px);
    background-color: #2980b9;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

/* Additional styles for sections to enhance organization */
.featured-games {
    border-top: 5px solid #3498db;
}

.new-games {
    border-top: 5px solid #e74c3c;
}

.originals {
    border-top: 5px solid #f39c12;
}

.all-games {
    border-top: 5px solid #2ecc71;
}

/* Responsive Design adjustments */
@media screen and (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 15px 15px 15px 60px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .main-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-menu li {
        margin: 5px 10px;
    }
    
    .language-selector {
        margin-top: 15px;
    }
    
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 20px;
    }
    
    .multiplayer-types {
        flex-direction: column;
    }
    
    main {
        padding: 15px;
    }
    
    section {
        padding: 20px;
    }
}

@media screen and (max-width: 480px) {
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 15px;
    }
    
    .game-card h3 {
        font-size: 13px;
    }
    
    section {
        padding: 15px;
    }
    
    h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
} 