/* 全局样式重置 */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    }

    body {
      background-color: #121212; /* 深色背景 */
      color: white;
      min-height: 100vh;
    }

    /* 头部导航 */
    .header {
      background-color: #2d5bff; /* 主题蓝 */
      padding: 15px 12px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .header h1 {
      font-size: 1.4rem;
      font-weight: 700;
      display: flex;
      align-items: center;
    }

    .header h1::before {
      margin-right: 8px;
    }

    .menu-icon {
      font-size: 1.5rem;
      cursor: pointer;
    }

    /* 返回按钮（详情页用） */
    .back-btn {
      background: none;
      border: none;
      color: white;
      font-size: 1.2rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    /* 分类标题 */
    .category-title {
      padding: 16px 12px 8px;
      font-size: 1.1rem;
      font-weight: 600;
      color: #f0f0f0;
    }

    /* 前10图专属容器：两行布局，精准控制比例 */
    .card-container-top10 {
      display: grid;
      grid-template-rows: repeat(2, 1fr); /* 2行等高 */
      gap: 8px;
      padding: 0 12px 16px;
    }

    /* 第一行：3/4 + 1/4 比例 */
    .top10-row1 {
      display: grid;
      grid-template-columns: 3fr 1fr; /* 左侧75%，右侧25% */
      gap: 8px;
      height: 100%;
    }

    /* 第二行：50% + 50% 比例 */
    .top10-row2 {
      display: grid;
      grid-template-columns: 1fr 1fr; /* 左右各50% */
      gap: 8px;
      height: 100%;
    }

    /* 后续游戏容器（保持原有布局） */
    .card-container {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      padding: 0 12px 16px;
    }

    /* 卡片基础样式 */
    .card {
      border-radius: 8px;
      overflow: hidden;
      background-color: #1e1e1e;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
      transition: transform 0.2s ease;
      position: relative;
      cursor: pointer;
    }

    .card:hover {
      transform: scale(1.02);
    }

    /* 图片样式 */
    .card-img {
      width: 100%;
      height: 100%;
      object-fit: cover; /* 避免拉伸，裁剪多余部分 */
      display: block;
    }

    /* 第一行左侧75%大图 */
    .big-left-75 {
      height: 100%;
    }

    /* 第一行右侧25%竖排3小图 */
    .small-right-25 {
      display: grid;
      grid-template-rows: repeat(3, 1fr); /* 3行均分 */
      gap: 8px;
      height: 100%;
    }

    /* 第二行左侧50%：上2下1布局 */
    .small-left-50 {
      display: grid;
      grid-template-rows: max-content;
      gap: 8px;
      height: 100%;
    }

    /* 第二行右侧50%：上1下2布局 */
    .small-right-50 {
      display: grid;
      grid-template-rows: max-content;
      gap: 8px;
      height: 100%;
    }

    /* 内部小卡片 */
    .inner-card {
      border-radius: 6px;
      overflow: hidden;
      height: 100%;
      transition: transform 0.2s ease;
      cursor: pointer;
    }

    .inner-card:hover {
      transform: scale(1.03);
    }

    /* 原有布局类（后续游戏用） */
    .card-banner {
      grid-column: span 3;
      height: 180px;
    }

    .card-small {
      grid-column: span 1;
    }

    /* 标签样式 */
    .card-tag {
      position: absolute;
      top: 6px;
      left: 6px;
      background-color: #ff3b30;
      color: white;
      font-size: 0.7rem;
      padding: 2px 6px;
      border-radius: 3px;
      font-weight: 600;
    }

    /* 详情页样式 - 在单独页面中默认显示 */
    .detail-page {
      padding: 16px 12px;
      display: block;
    }
    
    /* 相似游戏推荐样式 */
    .similar-games {
      margin: 20px 0;
    }
    
    .similar-games-title {
      font-size: 1.2rem;
      font-weight: 600;
      margin-bottom: 12px;
      color: #f0f0f0;
    }
    
    .similar-games-container {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      padding: 0;
    }
    
    /* 确保相似游戏中的卡片正确显示 */
    .similar-games-container .card-small {
      height: 120px;
    }


    .detail-header {
      margin-bottom: 16px;
      text-align: center;
    }

    .detail-title {
      font-size: 1.5rem;
      font-weight: 700;
      margin-bottom: 8px;
    }

    .detail-img {
      width: 100%;
      border-radius: 8px;
      margin-bottom: 16px;
      max-height: 300px;
      object-fit: cover;
    }

    /* Play按钮样式 */
    .play-button {
      width: 100%;
      padding: 16px;
      background-color: #2563eb;
      color: white;
      border: none;
      border-radius: 12px;
      font-size: 18px;
      font-weight: bold;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-bottom: 20px;
      transition: all 0.3s ease;
      box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
    }

    .play-button:hover {
      background-color: #1d4ed8;
      transform: translateY(-2px);
      box-shadow: 0 6px 12px rgba(37, 99, 235, 0.4);
    }

    .play-button:active {
      transform: translateY(0);
    }

    .play-button.disabled {
      background-color: #94a3b8;
      cursor: not-allowed;
      box-shadow: none;
    }

    .play-button.disabled:hover {
      transform: none;
      background-color: #94a3b8;
    }
/* 详情描述容器样式 */
.detail-desc {
  /* 基础布局 */
  width: 100%;
  max-width: 1200px; /* 限制最大宽度，避免大屏过宽 */
  margin: 0 auto; /* 水平居中 */
  padding: 24px; /* 内边距，避免文字贴边 */
  box-sizing: border-box;

  /* 文本基础样式 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; /* 基础字号 */
  line-height: 1.8; /* 行高，提升可读性 */
  color: #fcfcfc; /* 主文本色，避免纯黑刺眼 */
  letter-spacing: 0.02em; /* 字间距，优化阅读体验 */

  /* 背景与边框 */
  border-radius: 8px; /* 圆角，柔和视觉 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* 轻微阴影，增加层次感 */
}

/* 描述文本内的段落样式 */
.detail-desc p {
  margin: 0 0 16px 0; /* 段落间距 */
  text-align: justify; /* 两端对齐，更整洁 */
}

/* 最后一个段落取消底部间距 */
.detail-desc p:last-child {
  margin-bottom: 0;
}

/* 标题样式（如果desc中有小标题） */
.detail-desc h3 {
  font-size: 18px;
  color: #222;
  margin: 24px 0 12px 0;
  font-weight: 600;
}

.detail-desc h4 {
  font-size: 17px;
  color: #ffffff;
  margin: 20px 0 10px 0;
  font-weight: 600;
}
.detail-like{
  padding: 0px 16px;
}
.detail-like i {
  font-size: 16px;
  color: #fff; /* 强制图标白色（防止继承其他颜色） */
}
/* 列表样式（如果有有序/无序列表） */
.detail-desc ul,
.detail-desc ol {
  margin: 12px 0 16px 24px;
  padding-left: 8px;
}

.detail-desc li {
  margin-bottom: 8px;
}

/* 链接样式 */
.detail-desc a {
  color: #1890ff; /* 主题色链接 */
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.detail-desc a:hover {
  color: #096dd9;
  border-bottom-color: #096dd9; /* hover下划线效果 */
}

/* 强调文本样式（如strong标签） */
.detail-desc strong {
  color: #222;
  font-weight: 600;
}

/* 引用样式（如果有blockquote） */
.detail-desc blockquote {
  border-left: 3px solid #eee;
  padding: 8px 16px;
  margin: 16px 0;
  background-color: #fafafa;
  border-radius: 0 4px 4px 0;
  color: #666;
}

/* 响应式适配（移动端） */
@media (max-width: 768px) {
  .detail-desc {
    padding: 16px;
    font-size: 15px;
    line-height: 1.7;
  }

  .detail-desc h3 {
    font-size: 17px;
    margin: 20px 0 10px 0;
  }

  .detail-desc h4 {
    font-size: 16px;
  }

  .detail-desc ul,
  .detail-desc ol {
    margin-left: 16px;
  }
}
    /* 底部导航栏 */
    .footer {
      background-color: #1e1e1e;
      padding: 12px;
      text-align: center;
      font-size: 0.8rem;
      color: #8a8a8a;
      border-top: 1px solid #333;
    }

    .footer-links {
      margin-top: 8px;
    }

    .footer-links a {
      color: #8a8a8a;
      margin: 0 6px;
      text-decoration: none;
    }

    .footer-links a:hover {
      color: #2d5bff;
    }

    /* 响应式适配（平板） */
    @media (min-width: 768px) {
      .card-container-top10 {
        height: 650px;
      }
      .card-container {
        grid-template-columns: repeat(4, 1fr);
      }
      .card-banner {
        height: 220px;
      }
      .card-small {
        height: 180px;
      }
      .detail-img {
        max-height: 400px;
      }
    }
/* 分类弹窗样式 */
.category-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  display: none; /* 默认隐藏 */
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

/* 弹窗显示时的动画 */
.category-modal.active {
  display: block;
}

.category-modal.active .modal-content {
  transform: translateX(0);
}



/* 筛选后的分类标题 */
.filtered-title {
  padding: 16px 12px 8px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filtered-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: #333;
  margin-left: 8px;
}

/* 响应式适配平板 */
@media (min-width: 768px) {
  .modal-content {
    width: 50%;
  }
}
/* 详情页样式（共用） */
.detail-page {
  padding: 16px 12px;
}


#detailTitle {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

#detailImg {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 16px;
  max-height: 300px;
  object-fit: cover;
}


/* 分类弹窗样式（首页用） */
.category-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 75%;
  max-width: 300px;
  height: 100%;
  background-color: #1e1e1e;
  padding: 0;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.category-modal.active {
  display: block;
}

.category-modal.active .modal-content {
  transform: translateX(0);
  background:#fff;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #ffffff;
  border-bottom: 1px solid #4e4e4e;
  padding: 15px 15px 15px 40px;
  background:#2d5bff
}

.category-list {
  display: flex;
  flex-direction: column;
}


.category-item {
  padding: 14px 16px;
  background-color: #ffffff;
  border-radius: 8px;
  color: #767676;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid transparent; /* 左侧预留边框位置 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 图标样式 */
.category-item i {
  font-size: 1.2rem;
  width: 24px; /* 固定图标宽度，对齐更整齐 */
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a8a8a; /* 默认图标灰色 */
  transition: color 0.25s ease;
}

/* 悬停效果 */
.category-item:hover {
  background-color: #ffffff;
  color: #909090;
  transform: translateX(4px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.category-item:hover i {
  color: #909090; /* 悬停时图标变主题蓝 */
}
/* 分类页游戏容器（一行3个） */
.category-card-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 核心：一行3个 */
  gap: 8px;
  padding: 0 12px 16px;
}
/* 选中状态（当前分类） */
.category-item.active {
  background-color: #254ede;
  color: #ffffff;
  border-left-color: #ff9500; /* 左侧橙色指示条 */
}

.category-item.active i {
  color: #ffffff; /* 选中时图标白色 */
}

/* 第一个分类项特殊样式（All Games） */
.category-item:first-child {
  background-color: #fff9e6;
  color: #333333;
}

.category-item:first-child i {
  color: #ff9500; /* All Games 图标用橙色 */
}

.category-item:first-child:hover {
  background-color: #fff3cd;
  transform: translateX(4px);
}

.close-modal {
  position: absolute;
  top: 16px;
  left: 16px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: white;
}

/* 无结果提示（共用） */
.no-result {
  padding: 40px 12px;
  text-align: center;
  color: #8a8a8a;
  font-size: 1rem;
}

.no-result i {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

/* 底部导航（共用） */
.footer {
  background-color: #1e1e1e;
  padding: 12px;
  text-align: center;
  font-size: 0.8rem;
  color: #8a8a8a;
  border-top: 1px solid #333;
}

.footer-links {
  margin-top: 8px;
}

.footer-links a {
  color: #8a8a8a;
  margin: 0 6px;
  text-decoration: none;
}

.footer-links a:hover {
  color: #2d5bff;
}

/* 响应式适配 */
@media (min-width: 768px) {
  /* 首页后续游戏（保持4列） */
  .home-card-container {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* 卡片高度优化 */
  .home-card-small {
    height: 180px;
  }
  
  .home-card-banner {
    height: 220px;
  }
  
  .category-card-small {
    height: 180px;
  }
  
  .category-card-banner {
    height: 220px;
  }
  
  /* 弹窗宽度 */
  .modal-content {
    width: 50%;
  }
}
/* 首页后续游戏容器（2列布局，保持原有） */
.home-card-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 12px 16px;
}
.home-card-banner {
  grid-column: span 3;
  height: 180px;
}
.category-page{
  min-height: 60vh;
}
/* 分类页标题 */
.category-page-title {
  padding: 16px 12px 8px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 小屏手机适配（分类页自动改为2列） */
@media (max-width: 375px) {
  .category-card-container {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .category-card-banner {
    grid-column: span 2;
  }
}