/* 列表页特定样式 */

/* 筛选区域 */
.filters-section {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filters-section h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.filter-btn:hover {
    background-color: #e9ecef;
}

.filter-btn.active {
    background-color: #e67312;
    color: white;
    border-color: #e67312;
}

.sort-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-filter label {
    font-weight: bold;
}

#sort-by {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

/* 游戏列表区域 */
.games-list-section {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.games-list-section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    background-color: #e67312;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.page-btn:hover:not(:disabled) {
    background-color: #2980b9;
}

.page-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number, .ellipsis {
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.page-number:hover {
    background-color: #f1f2f6;
}

.page-number.active {
    background-color: #3498db;
    color: white;
}

/* 列表页游戏卡片样式 */
.list-game-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

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

.list-game-banner {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.list-game-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.list-game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.list-game-card:hover .list-game-overlay {
    opacity: 1;
}

.list-game-overlay .play-btn {
    padding: 0.5rem 1.5rem;
}

.list-game-info {
    padding: 1rem;
}

.list-game-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-game-category {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-right: 0.2rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background-color: #f1f2f6;
    border-radius: 4px;
}

.list-game-meta {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.list-game-rating::before {
    content: "★";
    color: #f1c40f;
    margin-right: 0.3rem;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .category-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 1.2rem;
    }

    .games-container {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .page-numbers {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
}

@media screen and (max-width: 576px) {
    .filters-section, .games-list-section {
        padding: 1rem;
    }

    .category-filters {
        gap: 0.3rem;
    }

    .filter-btn {
        padding: 0.3rem 0.6rem;
        font-size: 1.0rem;
    }

    .games-container {
        grid-template-columns: 1fr;
    }

    .list-game-banner {
        height: 120px;
    }
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 200px; /* Ensures the loader has some vertical space */
}

.loading-gif {
    width: 50px; /* Adjust as needed */
    height: 50px;
}

.loading-text {
    margin-top: 10px;
    font-size: 16px;
    color: #555;
}