/* 游戏列表样式 */
.game-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
  gap: 20px;
}

.game-list-items {
  width: 100%;
  margin-bottom: 20px;
}

.game-list-items .game-item-single {
  display: block;
  height: 200px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 10px;
}

.game-list-items .game-item-single img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
}

.game-list-items .game-item-more {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  position: relative;
  gap: 4px;
  padding: 0;
  margin-top: 10px;
}

.game-list-items .game-item-more .more-items-list {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.07);
  text-decoration: none;
}

.game-list-items .game-item-more .more-items-list img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

.game-list-items .game-item-more .more-items-list .game-thumb-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 4;
  line-height: 1.2;
}

.game-list-items a {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  border: 2px solid transparent;
  box-sizing: border-box;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.07);
  text-decoration: none;
}

.game-list-items a:hover {
  border-color: #a48eff;
  box-shadow: 0 0 7px 1px rgba(0, 0, 0, 0.57);
  cursor: pointer;
}

.game-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-thumb-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 4;
}

.go-to-top {
  display: flex;
  -webkit-box-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  align-items: center;
  gap: 24px;
  flex-direction: row;
  width: 100%;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.go-to-top-button {
  border-radius: 30px;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 800;
  font-size: 16px;
  box-sizing: border-box;
  padding: calc(var(--base-unit) * 1) calc(var(--base-unit) * 2);
  color: var(--white-100);
  background: var(--brand-100);
  min-width: 200px;
  height: 50px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.go-to-top-button:hover {
  background: var(--brand-130);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(104, 66, 255, 0.4);
}

.go-to-top-button:active {
  transform: translateY(0);
}

.go-to-top-button svg {
  display: inline-block;
  fill: currentcolor;
  height: 20px;
  width: 20px;
  margin-right: calc(var(--base-unit) * 1);
}

.go-to-top-button .button-text {
  display: inline;
}

/* 响应式设计 */

/* 手机端样式 (< 768px) */
@media (max-width: 767px) {
  .game-list {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 12px;
  }

  .game-list-items {
    width: 100%;
    margin-bottom: 12px;
  }

  .game-list-items .game-item-single {
    height: auto;
    margin-bottom: 10px;
  }

  .game-list-items .game-item-more {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
  }

  .game-list-items .game-item-more .more-items-list {
    width: 100%;
  }

  .game-list-items .game-item-more .more-items-list img {
    border-radius: 6px;
  }

  .game-list-items .game-item-more .more-items-list .game-thumb-title {
    font-size: 10px;
    padding: 3px 4px;
  }

  .game-thumb-title {
    font-size: 12px;
    padding: 6px;
  }

  .category-section {
    margin-bottom: 30px;
    scroll-margin-top: 70px;
  }

  /* 移动端触摸优化 */
  .game-list-items a {
    -webkit-tap-highlight-color: rgba(164, 142, 255, 0.3);
    touch-action: manipulation;
  }

  /* 移动端返回顶部按钮样式 */
  .go-to-top {
    position: fixed;
    bottom: 20%;
    right: 20px;
    width: auto;
    padding: 0;
    z-index: 1000;
  }

  .go-to-top-button {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .go-to-top-button svg {
    height: 24px;
    width: 24px;
    margin-right: 0;
  }

  .go-to-top-button .button-text {
    display: none;
  }

  .go-to-top-button:active {
    transform: scale(0.95);
    background: var(--brand-130);
  }
}

/* iPad端样式 (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .game-list {
    grid-template-columns: repeat(2, 1fr);
    padding: 15px;
    gap: 16px;
  }

  .game-list-items {
    width: 100%;
  }

  .game-list-items .game-item-single {
    height: 180px;
  }

  .game-list-items .game-item-more {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
  }

  .game-list-items .game-item-more .more-items-list {
    width: 100%;
  }

  .game-list-items .game-item-more .more-items-list .game-thumb-title {
    font-size: 11px;
    padding: 4px 5px;
  }

  .game-thumb-title {
    font-size: 13px;
  }

  .category-section {
    scroll-margin-top: 80px;
  }

  /* iPad端返回顶部按钮样式 */
  .go-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: auto;
    padding: 0;
    z-index: 1000;
  }

  .go-to-top-button {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .go-to-top-button svg {
    height: 26px;
    width: 26px;
    margin-right: 0;
  }

  .go-to-top-button .button-text {
    display: none;
  }

  .go-to-top-button:active {
    transform: scale(0.95);
    background: var(--brand-130);
  }
}

/* 大屏iPad和桌面端 (> 1024px) */
@media (min-width: 1025px) {
  .game-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .game-list-items .game-item-more {
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
  }
}
