:root {
  --body: linear-gradient(to bottom, #f8e475, #f8e47586);
  --font: #333;
  --footer: transparent;
  --a: #fff;
  --primary: #e65a6a;
}

* {
  box-sizing: border-box;
  font-family: "Avenir", Helvetica, Arial, sans-serif;
}

body {
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: var(--font);
  background: var(--body);
  background-size: contain;
}
html {
  font-size: 16px;
}
a {
  line-height: 20px;
  text-decoration: none;
  color: var(--a);
  font-weight: 600;
}

a:hover,
a:active {
  text-decoration: none;
}

strong {
  font-weight: bolder;
}

.fx-r {
  display: flex;
  flex-direction: row;
}

.fx-h {
  display: flex;
  flex-direction: column;
}

.fx-ac {
  justify-content: center;
}

.fx-bc {
  align-items: center;
}

/* 定义全局滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  border-radius: 4px;
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #c1c1c1;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 回到顶部按钮样式 */
#back-to-top {
  font-size: 24px;
  position: fixed;
  right: 30px;
  bottom: 100px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: opacity 0.3s;
  color: white;
  border: none;
  border-radius: 50%;
  background-color: #e65a5a;
}

#back-to-top:hover {
  opacity: 0.8;
}

.back {
  z-index: 2;
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 4px 10px;
  background-color: #fff;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;

  img {
    width: 10px;
    height: 10px;
    cursor: pointer;
    background-size: 100% 100%;
  }
}
.navTitle {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  font-size: 48px;
  font-weight: 800;
}

.game-container {
  width: 100%;
  padding: 0.5rem 0;
}

/* 通用游戏卡片样式 */
.game-card {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.game-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 20px;
  transition: transform 0.3s ease;
  background-color: #f5f5f5;
}

.game-img-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.game-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.5rem;
  margin: 0;
  font-size: 0.9rem;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

/* 顶部精选游戏 */
.top-games {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border-radius: 20px;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.top-card {
  /* width: calc(16.6% - 0.5rem); */
}

/* 更多游戏列表 */
.all-games {
  justify-content: center;
  margin-bottom: 12px;
}

.all-games .game-card {
  /* width: calc(33.333% - 0.5rem); */
}

/* 悬停效果 */
.game-card:hover {
  transform: translateY(-5px);
}

.game-card:hover .game-img {
  transform: scale(1.03);
}
.navLogo {
  width: 48px;
  aspect-ratio: square;
}

.third-section {
  width: 100%;
}

.third-section .game-card {
  width: calc(25% - 0.5rem);
}

.menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.menu-panel.show {
  opacity: 1;
  visibility: visible;
}

.menu-content {
  background-color: #fff;
  width: 280px;
  height: 100%;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.menu-panel.show .menu-content {
  transform: translateX(0);
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.menu-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-items li {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.menu-items li a {
  color: var(--font);
  display: block;
}

.menu-items li a:hover {
  color: var(--primary);
}
@media (max-width: 1024px) {
  .third-section .game-card {
    width: calc(33.333% - 0.5rem);
  }
}

@media (max-width: 768px) {
  .game-info {
    padding: 0.5rem;
  }

  .game-instructions h2 {
    font-size: 1.1rem;
  }

  .tag-badge,
  .category-badge {
    font-size: 0.8125rem;
    padding: 0.25rem 0.75rem;
  }
  .game-detail-container {
    padding: 0.5rem;
  }

  .game-detail-title {
    font-size: 1.5rem;
  }
  .section-title {
    padding-left: 10px;
    padding-right: 10px;
  }
  .section-title::after {
    margin-left: 10px;
  }
  .navTitle {
    font-size: 24px;
  }

  .top-games,
  .all-games {
    width: 95% !important;
  }
  .third-section {
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }
  .third-section .game-card {
    width: 100%;
  }

  .third-section .game-img-container {
    display: flex;
    flex-direction: column;
  }

  .third-section .game-title {
    position: static;
    background: none;
    color: var(--font);
    padding: 5px 0;
    border-radius: 0;
  }
}
.section-title {
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--font);
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary);
  border-radius: 2px;
}

/* 游戏详情页样式 */
.game-detail-container {
  margin: 0 auto;
}

.game-media-container {
  flex: 1;
  min-width: 300px;
}

.game-image-wrapper {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
}

.game-detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-image-wrapper:hover .game-detail-image {
  transform: scale(1.02);
}

.play-button {
  background-color: var(--primary);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.play-button:hover {
  opacity: 0.75;
}

.detailback {
  width: 40px;
  height: 30px;
  position: absolute;
  z-index: 11;
  top: 40px;
  left: 0px;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  cursor: pointer;
  justify-content: center;
  border-top-right-radius: 40px;
  border-bottom-right-radius: 40px;
  box-shadow: 0 2px 10px 1px rgba(0, 0, 0, 0.76);
}
.game-info {
  flex: 2;
  min-width: 300px;
}

.game-detail-title {
  color: var(--font);
  line-height: 1.2;
}

.game-description {
  font-size: 1rem;
  color: #cacaca;
}

/* 游戏详情页新增信息样式 */
.category-badge {
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

.category-badge:hover {
  background-color: var(--primary/20);
}

.tag-badge {
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.tag-badge:hover {
  background-color: var(--primary/20);
  transform: translateY(-1px);
}

.game-instructions h2 {
  color: var(--font);
  font-size: 1.25rem;
}

.game-instructions div {
  line-height: 1.6;
  font-size: 0.9375rem;
}

.update-date {
  display: flex;
  align-items: center;
}

.load-more-btn {
  display: block;
  margin: 20px auto;
  padding: 12px 24px;
  background-color: #e82e2f;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.load-more-btn:hover {
  background-color: #d1292a;
}

.load-more-btn:active {
  transform: translateY(2px);
}
