/* 发现页整体容器 */
.discover-container {
  display: flex;
  height: calc(100vh - 120px); /* 适配底部导航高度 */
  overflow: hidden;
  background-color: #fff;
  margin: 0 -15px; /* 关键：抵消父级padding，实现贴边，不影响内容 */
  padding: 0;
  width: auto;
  position: relative; /* 恢复正常布局，不消失内容 */
}

/* 左侧导航 - 隐藏滚动条 + 修正宽度 + 完全贴左 */
.sidebar {
  width: 70px;
  background: #f8f9fa;
  padding: 10px 0;
  overflow-y: auto;
  border-right: 1px solid #eee;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0;
}
.sidebar::-webkit-scrollbar {
  display: none;
}

/* 导航项 */
.sidebar-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  cursor: pointer;
  background: transparent !important;
}
.sidebar-nav-item.active,
.sidebar-nav-item:hover {
  background: transparent !important;
}

/* 导航图片 */
.sidebar-nav-img {
  width: 52.6px;
  height: 69.65px;
  object-fit: contain;
  display: block;
}

/* 右侧内容 - 修复高度问题 */
.main-content {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  height: 100%;
}

.category-section {
  margin-bottom: 25px;
}
.category-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: bold;
  color: #333;
}
.category-more {
  font-size: 12px;
  color: #999;
}

/* 卡片网格：3列布局 */
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* 卡片整体：相对定位，方便文字叠加 */
.game-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  width: 101.73px;
  margin: 0 auto;
}

/* 图片：101.73 × 101.73 正方形 */
.card-img {
  width: 101.73px;
  height: 101.73px;
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 标题文字：按你给的尺寸 */
.game-name-overlay {
  position: absolute;
  left: 0;
  bottom: 6px;
  width: 100%;
  text-align: center;
  font-size: 14.8249px;
  font-family: "Pingfang SC", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #FFFFFF;
  padding: 0 8.47164px;
  box-sizing: border-box;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* 👇 仅 zrsx 分类：一行1个 + 宽度接近容器 + 高度 109 👇 */
.category-section[data-category="zrsx"] .game-grid {
  grid-template-columns: repeat(1, 1fr) !important;
  gap: 10px !important;
}
.category-section[data-category="zrsx"] .game-card {
  width: 100% !important;       /* 自动撑满容器宽度 */
  max-width: calc(100% - 0px) !important; /* 比容器小一点，更美观 */
  border-radius: 8px !important;
  margin: 0 auto !important;
}
.category-section[data-category="zrsx"] .card-img {
  width: 100% !important;
  height: 109px !important;  /* 高度保持你要的 */
  overflow: hidden;
}
.category-section[data-category="zrsx"] .card-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
.category-section[data-category="zrsx"] .game-name-overlay {
  font-size: 15px !important;
  bottom: 6px !important;
}