/* 游戏列表页面样式 */

/* 游戏列表样式 */
.game-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.game-list li {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    flex: 0 0 calc(25% - 15px);
    box-sizing: border-box;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.game-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.txtImgBox {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 15px;
    flex: 1;
}

.imgBox {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

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

.imgBox:hover img {
    transform: scale(1.05);
}

.txtBox {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.txtBox .name {
    display: block;
    text-decoration: none;
    margin-bottom: 10px;
}

.txtBox .name p:first-child {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0 0 5px 0;
}

.txtBox .name p:last-child {
    font-size: 14px;
    color: #999;
    margin: 0;
}

.sizeTimeBox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
    justify-content: center;
}

.sizeTimeBox .space {
    color: #999;
}

.brief {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.textOverflow2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    align-self: center;
    margin-top: auto;
}

.btnTear-up-out {
    background: #007bff;
    color: #fff;
}

.btnTear-up-out:hover {
    background: #0069d9;
    transform: translateY(-1px);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    width: 100%;
}

.pagination a {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
}

.pagination a:hover {
    border-color: #007bff;
    color: #007bff;
}

.pagination .active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .disabled:hover {
    border-color: #ddd;
    color: #666;
}

/* 返回顶部按钮 */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #007bff;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    font-size: 24px;
    font-weight: bold;
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    background: #0069d9;
    transform: translateY(-2px);
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .game-list li {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 768px) {
    .game-list li {
        flex: 0 0 calc(50% - 10px);
    }

    .imgBox {
        width: 100px;
        height: 100px;
    }

    .sizeTimeBox {
        justify-content: center;
        flex-wrap: wrap;
    }

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

    .pagination a {
        padding: 6px 10px;
        font-size: 14px;
    }

    .back-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .game-list li {
        flex: 0 0 100%;
        padding: 15px;
    }

    .txtBox .name p:first-child {
        font-size: 16px;
    }

    .brief {
        font-size: 13px;
    }
}
