/* category.css - 分类列表页专用样式 */

/* 游戏列表 */
.games-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    width: 100%; /* 确保宽度100% */
}

.list-game-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.list-game-thumbnail {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.list-game-info {
    padding: 15px;
}

.list-game-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    text-align: center; /* 居中显示游戏名称 */
    white-space: nowrap; /* 防止换行 */
    overflow: hidden; /* 隐藏超出部分 */
    text-overflow: ellipsis; /* 超出部分显示省略号 */
    max-width: 100%; /* 确保不超出容器宽度 */
}

/* 无游戏提示 */
.no-games-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
    align-items: center;
}

.page-btn {
    background: white;
    border: 1px solid #e0e0e0;
    color: #333;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}

.page-btn:hover {
    background: #f5f5f5;
    border-color: #764ba2;
    color: #764ba2;
}

.page-btn.active {
    background: #764ba2;
    border-color: #764ba2;
    color: white;
}

.page-btn.prev-btn,
.page-btn.next-btn {
    font-weight: bold;
    font-size: 18px;
    padding: 8px 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .games-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .games-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 调整主容器布局：去除右侧边栏后，主内容区域占据剩余空间 */
.main-container {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 80px);
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}