* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

:root {
    --primary-color: #6200ea;
    --secondary-color: #b388ff;
    --background-color: #f5f5f5;
    --card-color: #ffffff;
    --text-color: #333333;
    --sidebar-width: 250px;
    --star-color: #ffbb00;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-color);
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 100;
    overflow-y: auto;
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: none;  /* IE/Edge */
}
.sidebar::-webkit-scrollbar {
    display: none;  /* Chrome/Safari/Opera */
}
.logo {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
    color: white;
    text-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.logo span {
    color: #ffde03;
}

.category {
    margin-bottom: 15px;
}

.category-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.category-items {
    list-style: none;
}

.category-items li {
    padding: 8px 0;
    cursor: pointer;
    transition: all 0.2s;
}

.category-items li:hover {
    padding-left: 10px;
    color: #ffde03;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 20px;
    transition: margin-left 0.3s ease;
    padding-bottom: 80px;  /* 给按钮留出空间 */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-bar {
    display: flex;
    width: 60%;
    max-width: 600px;
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 30px 0 0 30px;
    outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-bar button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.game-card {
    background: var(--card-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    /* cursor: pointer; */
}

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

.game-thumbnail {
    width: 100%;
    height: 120px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
    position: relative;
}

.game-rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 3px;
}

.game-rating-badge i {
    color: var(--star-color);
    font-size: 10px;
}

.game-info {
    padding: 15px;
}

.game-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.game-category {
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
}

.game-stars {
    display: flex;
    align-items: center;
}

.stars {
    display: inline-flex;
    margin-right: 5px;
}

.star {
    color: var(--star-color);
    font-size: 14px;
}

.star-empty {
    color: #ddd;
    font-size: 14px;
}

.review-count {
    font-size: 11px;
    color: #888;
}

.desc-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 150;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 80%;
        max-width: 300px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .header {
        margin-top: 50px;
    }
    
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

.category-title i {
    margin-right: 0px;
    color: #00b4d8;
    font-size: 1.2rem;
     /* width: 25px; 保持图标对齐 */
}

.logo a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo a:hover {
    opacity: 0.8;
}

.game-card .play-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.game-card .play-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.game-card .play-btn:active {
    transform: scale(0.95);
}

.game-info-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

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

.load-more-container {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.load-more-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.load-more-btn:active {
    transform: scale(0.95);
}

#noMoreGames {
    display: none;
    padding: 20px;
    color: #666;
    position: relative;
    text-align: center;
    width: 100%;
}

#noMoreGames::before,
#noMoreGames::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background-color: #ddd;
    transform: translateY(-50%);
}

#noMoreGames::before {
    left: 0;
}

#noMoreGames::after {
    right: 0;
}
