/* 全部游戏页面样式 */

/* 游戏分组标题 */
.games-section {
  margin-bottom: 8px;
  width: 100%;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
  padding-left: 4px;
}

/* 热门游戏网格 */
.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
  width: 100% !important;
  max-width: 100% !important;
  padding-right: 35px; /* 为右侧字母索引留出空间 */
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

/* 热门游戏网格中的游戏项样式 */
.games-grid .game-item {
  padding: 6px 4px;
  gap: 3px;
  width: 100%;
  box-sizing: border-box;
}

.games-grid .game-item-icon {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  flex-shrink: 0;
}

.games-grid .game-item-name {
  font-size: 10px;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  width: 100%;
  text-align: center;
}

/* 游戏列表容器 */
.games-list-container {
  position: relative;
  padding-right: 30px; /* 为字母索引留出空间 */
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

/* 字母分类标题 */
.letter-section {
  margin-bottom: 16px;
}

.letter-header {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
  width: 100%;
  text-align: left;
}

/* 游戏列表项 */
.game-list-item {
  background: white;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.2s;
  cursor: pointer;
}

.game-list-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.game-list-icon {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}

.game-list-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-list-name {
  flex: 1;
  font-size: 13px;
  color: #333;
  font-weight: 500;
}

.game-list-arrow {
  color: #9ca3af;
  font-size: 14px;
  flex-shrink: 0;
}

/* 右侧字母索引 */
.alphabet-index {
  position: fixed;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 4px;
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* 隐藏滚动条 */
.alphabet-index::-webkit-scrollbar {
  display: none;
  width: 0;
  background: transparent;
}

.letter-item {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #6b7280;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  font-weight: 500;
}

.letter-item:hover {
  background: #f3f4f6;
  color: #8b5cf6;
}

.letter-item.active {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

/* 响应式 */
@media (max-width: 768px) {
  .games-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding-right: 30px;
  }
  
  .games-grid .game-item-icon {
    width: 40px;
    height: 40px;
  }
  
  .games-grid .game-item-name {
    font-size: 9px;
  }
  
  .games-list-container {
    padding-right: 25px;
  }
  
  .game-list-item {
    padding: 6px 10px;
    margin-bottom: 5px;
    gap: 8px;
  }
  
  .game-list-icon {
    width: 40px;
    height: 40px;
  }
  
  .game-list-name {
    font-size: 12px;
  }
  
  .alphabet-index {
    right: 4px;
    padding: 6px 3px;
  }
  
  .letter-item {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }
}

