/* 游戏列表页独立样式 */

/* 顶部导航栏 - 绿色背景 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(135deg, #52c41a 0%, #45b012 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
  z-index: 1000;
}

.header-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.header-category-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.header-category-btn:active {
  background-color: rgba(255, 255, 255, 0.3);
}

.menu-icon {
  display: block;
}

/* 分类菜单弹出层 - 复用首页样式 */
.category-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-overlay.active {
  display: block;
  opacity: 1;
}

.category-panel {
  position: absolute;
  top: 50px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.category-overlay.active .category-panel {
  transform: translateY(0);
}

.category-tabs {
  display: flex;
  border-bottom: 1px solid #e8e8e8;
}

.category-tab {
  flex: 1;
  padding: 12px 0;
  background-color: transparent;
  border: none;
  font-size: 0.938rem;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-tab.active {
  color: #52c41a;
  font-weight: 600;
  border-bottom: 2px solid #52c41a;
}

.category-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.category-content {
  display: none;
}

.category-content.active {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* 网格卡片样式 */
.category-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  background-color: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 100px;
}

.category-grid-item:active {
  background-color: #f5f5f5;
  transform: scale(0.98);
}

.category-grid-name {
  font-size: 0.938rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  text-align: center;
}

.category-grid-count {
  font-size: 0.75rem;
  color: #999;
  text-align: center;
}

/* 主内容区 */
.main-content {
  padding-top: 50px;
  padding-bottom: 0;
}

/* 游戏分类快捷导航 - 第一行 */
.quick-categories {
  background-color: #fff;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  gap: 8px;
  overflow: hidden;
}

.quick-category-fixed {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background-color: #fff;
  color: #52c41a;
  border: 1px solid #52c41a;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.quick-categories-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.quick-categories-scroll::-webkit-scrollbar {
  display: none;
}

.quick-category-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background-color: #f7f7f7;
  color: #666;
  border-radius: 20px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.quick-category-item:active {
  background-color: #e8e8e8;
}

.category-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* 热门游戏横向滑动 - 第二行 */
.hot-games-section {
  background-color: #fff;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  overflow: hidden;
}

.hot-games-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.hot-games-scroll::-webkit-scrollbar {
  display: none;
}

.hot-game-item {
  flex-shrink: 0;
  padding: 6px 14px;
  background-color: #f7f7f7;
  color: #666;
  border-radius: 20px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.hot-game-item:active {
  background-color: #e8e8e8;
}


/* 排序筛选Tab */
.sort-tabs-section {
  background-color: #fff;
  padding: 0;
  border-bottom: 1px solid #f0f0f0;
}

.sort-tabs {
  display: flex;
  justify-content: space-around;
}

.sort-tab {
  flex: 1;
  padding: 14px 0;
  background-color: transparent;
  border: none;
  font-size: 0.938rem;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  font-weight: 500;
}

.sort-tab.active {
  color: #52c41a;
  font-weight: 600;
}

.sort-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background-color: #52c41a;
  border-radius: 2px 2px 0 0;
}

/* 游戏列表 */
.game-list-section {
  background-color: #fff;
  padding: 8px 12px 12px;
}

.game-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background-color: #f8f8f8;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.game-list-item:active {
  background-color: #f0f0f0;
}

.game-list-icon {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  flex-shrink: 0;
  border: 1px solid #e8e8e8;
}

.game-list-info {
  flex: 1;
  min-width: 0;
}

.game-list-name {
  font-size: 0.938rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 6px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.75rem;
  color: #999;
}

.game-list-date,
.game-list-category,
.game-list-version,
.game-list-size {
  position: relative;
}

.game-list-date::after,
.game-list-category::after,
.game-list-version::after {
  content: '|';
  margin-left: 6px;
  color: #ddd;
}

.game-list-detail {
  padding: 6px 16px;
  background-color: #52c41a;
  color: #fff;
  border-radius: 16px;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* 分页导航 */
.pagination-section {
  background-color: #fff;
  padding: 16px 12px;
  margin-bottom: 8px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.page-link {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  color: #666;
  border-radius: 4px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.page-link.active {
  background-color: #52c41a;
  color: #fff;
  font-weight: 600;
}

.page-link:not(.active):active {
  background-color: #e8e8e8;
}

.page-next {
  padding: 0 12px;
}

/* 页脚 */
.footer {
  background-color: #f5f5f5;
  padding: 16px 12px;
  margin-bottom: 0;
  text-align: center;
}

.back-to-top {
  display: inline-block;
  padding: 8px 20px;
  background-color: #fff;
  color: #52c41a;
  border: 1px solid #52c41a;
  border-radius: 20px;
  font-size: 0.875rem;
  text-decoration: none;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.back-to-top:active {
  background-color: #52c41a;
  color: #fff;
}

.footer-links {
  font-size: 0.75rem;
  color: #999;
}

.footer-link {
  color: #999;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:active {
  color: #52c41a;
}

.footer-divider {
  margin: 0 8px;
  color: #ddd;
}

/* 底部Tab导航 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background-color: #fff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.08);
  z-index: 1000;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  padding: 6px 12px;
  transition: all 0.2s ease;
}

.bottom-nav-icon {
  fill: #999;
  transition: fill 0.2s ease;
}

.bottom-nav-text {
  font-size: 0.688rem;
  color: #999;
  transition: color 0.2s ease;
}

.bottom-nav-item.active .bottom-nav-icon {
  fill: #52c41a;
}

.bottom-nav-item.active .bottom-nav-text {
  color: #52c41a;
  font-weight: 600;
}

/* 响应式调整 */
@media (max-width: 360px) {
  .game-list-icon {
    width: 64px;
    height: 64px;
  }
  
  .quick-category-fixed,
  .quick-category-item,
  .hot-game-item {
    padding: 5px 12px;
    font-size: 0.813rem;
  }
  
  .sort-tab {
    font-size: 0.875rem;
    padding: 12px 0;
  }
}

.hamburger-menu span{
  background: #fff;
}