/* ==================== List Page Styles ==================== */

html, body {
  margin: 0 !important;
  padding: 0 !important;
  height: auto !important;
  /*overflow: visible !important;*/
}

/* List Main Container */
.list-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    width: 100%;
    /* 关键修复：禁止自身滚动 */
    height: auto;
    overflow: visible;
}

/* Toolbar */
.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.list-tabs {
    display: flex;
    gap: 4px;
}

.list-tab {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #8f98a0;
    padding: 8px 16px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.list-tab:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.list-tab.active {
    background: rgba(103,193,245,0.15);
    border-color: rgba(103,193,245,0.4);
    color: #66c0f4;
}

.list-sort {
    flex-shrink: 0;
}

.sort-select {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #8f98a0;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%238f98a0' d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.sort-select:hover {
    border-color: rgba(255,255,255,0.2);
}

.sort-select option {
    background: #1b2838;
    color: #c6d4df;
}

/* Game List - 5 columns grid */
.game-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

/* Game List Item */
.game-list-item {
    display: flex;
    flex-direction: column;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: visible;
    transition: all 0.25s ease;
    position: relative;
}

.game-list-item:hover {
    background: rgba(0,0,0,0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 10;
}

/* Game List Link (main card link) */
.game-list-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

/* Cover Image */
.game-list-cover {
    width: 100%;
    aspect-ratio: 460/215;
    overflow: hidden;
    background: #1b2838;
    border-radius: 4px 4px 0 0;
}

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

.game-list-item:hover .game-list-cover img {
    transform: scale(1.05);
}

/* Game Info */
.game-list-info {
    padding: 10px;
    flex: 1;
}

.game-list-title {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-list-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
    padding: 10px;
}

.game-list-tags a {
    font-size: 10px;
    color: #67c1f5;
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 2px;
    display: inline-block;
    text-decoration: none;
    transition: all 0.2s;
}

.game-list-tags a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

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

.game-list-review {
    font-size: 11px;
    font-weight: 500;
}

.game-list-review.positive {
    color: #a1cd44;
}

.game-list-review.mixed {
    color: #c7a531;
}

.game-list-review.negative {
    color: #e05d5d;
}

/* Price */
.game-list-price {
    padding: 10px;
    padding-top: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.game-list-original {
    font-size: 11px;
    color: #5c7a99;
    text-decoration: line-through;
}

.game-list-discount {
    font-size: 12px;
    font-weight: 700;
    color: #a1cd44;
    background: rgba(161,205,68,0.15);
    padding: 2px 6px;
    border-radius: 2px;
}

.game-list-current {
    font-size: 14px;
    font-weight: 700;
    color: #c6d4df;
}

/* Hover Description - Floating overlay */
.game-list-desc {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1b2838;
    border: 1px solid rgba(103,193,245,0.2);
    border-radius: 0 0 6px 6px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.6;
    color: #8f98a0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    pointer-events: none;
    z-index: 20;
    will-change: transform, opacity;
}

.game-list-desc::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #66c0f4, #4fc1e8, #66c0f4);
    border-radius: 2px;
}

.game-list-item:hover .game-list-desc {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.page-btn {
    min-width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #8f98a0;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.page-btn.active {
    background: rgba(103,193,245,0.2);
    border-color: rgba(103,193,245,0.5);
    color: #66c0f4;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-ellipsis {
    color: #5c7a99;
    padding: 0 4px;
    font-size: 14px;
}

.pagination a {
    min-width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #8f98a0;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    transition: all 0.2s ease;
}

.pagination > b {
    min-width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #66c0f4;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    transition: all 0.2s ease;
}

.pagination a:hover:not(:disabled) {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.pagination a.active {
    background: rgba(103,193,245,0.2);
    border-color: rgba(103,193,245,0.5);
    color: #66c0f4;
}

.pagination a:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
/* ==================== Responsive ==================== */

/* 3 columns */
@media (max-width: 1024px) {
    .game-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

/* 2 columns */
@media (max-width: 860px) {
    .game-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .list-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* 2 columns mobile */
@media (max-width: 600px) {
    .game-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .list-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .list-tabs::-webkit-scrollbar {
        display: none;
    }

    .list-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .game-list-title {
        font-size: 12px;
    }

    .game-list-tag {
        font-size: 9px;
    }

    .game-list-current {
        font-size: 13px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }

    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* 1 column on very small screens */
@media (max-width: 380px) {
    .game-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}