:root {
  --theme-color: #f0ff31;
  --close-btn-svg-fill: #fff;
  --menu-text-color: #fff;
  --page-title-color: #000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
ul,
li {
  list-style: none;
}

a {
  text-decoration: none;
  color: #000;
}
html {
  height: 100%;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  background: #ededed;
  font-family: fangsong;
}

/* 确保主体内容区域字体为黑色 */
body .main-content,
body .main-content * {
  color: #000 !important;
}

footer.footer,
footer.footer * {
  color: #000 !important;
  background-color: var(--theme-color) !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.lh15 {
  line-height: 1.5;
}
.lh2 {
  line-height: 2;
}

.w100p {
  width: 100%;
}

.f4 {
  color: #999999;
}
.fff {
  color: #fff;
}
.bg-fff {
  background-color: #fff;
}
.bg-white {
  background-color: #fff;
}
/* 确保主体内容区域背景为白色 */
body > .main-content,
body .main-content {
  background-color: #fff !important;
}
footer.footer {
  /* background-color: #fff !important; */
}
.base1 {
  color: var(--theme-color);
}
.bg-base {
  background-color: var(--theme-color);
}
.flex {
  display: flex;
}
.jc-c {
  justify-content: center;
}
.jc-sb {
  justify-content: space-between;
}
.jc-sa {
  justify-content: space-around;
}
.jc-se {
  justify-content: space-evenly;
}
.aic {
  align-items: center;
}

.fdc {
  flex-direction: column;
}

.fg1 {
  flex-grow: 1;
}
.fww {
  flex-wrap: wrap;
}
.tac {
  text-align: center;
}
.fcc {
  display: flex;
  justify-content: center;
  align-items: center;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  transform: none;
  width: 100%;
  background: var(--theme-color);
  z-index: 1000;
  padding: 10px 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: 60px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo p {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
}

.header-actions {
  display: flex;
  gap: 15px;
}

.search-btn,
.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.search-btn:hover,
.menu-btn:hover {
  background-color: var(--theme-color);
  opacity: 0.7;
  border-radius: 5px;
}

.search-btn svg,
.menu-btn svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.search-panel {
  position: fixed;
  top: 0;
  left: 0;
  transform: none;
  width: 100%;
  height: 100vh;
  background: var(--theme-color);
  z-index: 1003;
  padding: 20px;
  display: none;
}

.search-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.back-btn {
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 15px;
  padding: 10px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-btn:hover {
  background-color: var(--theme-color);
  opacity: 0.7;
  border-radius: 50%;
}

.back-btn svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: #fff;
}

.search-title {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
}

.search-input-container {
  position: relative;
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  padding: 15px;
  border: 2px solid var(--theme-color);
  border-radius: 25px;
  font-size: 16px;
  background: #fff;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--theme-color);
  opacity: 0.8;
  box-shadow: 0 0 10px rgba(146, 207, 244, 0.3);
}

.search-clear {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #000;
  transition: color 0.3s ease;
}

.search-clear:hover {
  color: #333;
}

.search-results {
  flex: 1;
  overflow-y: auto;
}

.search-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 14px;
  margin-top: 20px;
}

.sidebar {
  position: fixed;
  top: 0;
  right: -70%;
  width: 70%;
  height: 100vh;
  background: var(--theme-color);
  z-index: 1004;
  transition: right 0.3s ease;
  padding: 20px;
  display: none;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
}

.sidebar.open {
  right: 0;
  display: block;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
}

.sidebar-header {
  display: flex;
  justify-content: flex-start;
  padding: 5px 0;
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn svg {
  width: 32px;
  height: 32px;
  fill: var(--close-btn-svg-fill);
  stroke-width: 2;
}

.menu-list {
  list-style: none;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 60px;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:hover {
  background-color: var(--theme-color);
  border-radius: 10px;
  padding-left: 15px;
  padding-right: 15px;
}

.menu-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.menu-text {
  font-size: 17px;
  color: var(--menu-text-color);
  font-weight: 500;
  line-height: 1.4;
}

.footer {
  background: var(--theme-color);
  padding: 20px;
  text-align: center;
}

.footer-links {
  margin-bottom: 15px;
}

.footer-links a {
  margin: 0 10px;
  color: #fff;
  font-size: 14px;
}

.footer-copyright {
  color: #fff;
  font-size: 12px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s;
}

.btn-primary {
  background: var(--theme-color);
  color: #333;
}

.btn-primary:hover {
  background: var(--theme-color);
  opacity: 0.8;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(146, 207, 244, 0.3);
}

.page-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--page-title-color);
  margin: 0;
}

.game-card {
  background: #f8fcff;
  /* border-radius: 15px; */
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 20px;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.game-card .game-thumbnail,
.featured-games .game-thumbnail {
  position: relative;
  width: 100%;
  height: 100px;
  overflow: hidden;
}

.game-card .game-thumbnail img,
.featured-games .game-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-badge {
  position: absolute;
  background: var(--theme-color);
  opacity: 0.9;
  color: #fff;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.game-rating {
  top: 10px;
  left: 10px;
  background: var(--theme-color);
  opacity: 0.9;
  color: #fff;
}

.game-players {
  top: 10px;
  right: 10px;
  background: var(--theme-color);
  opacity: 0.9;
  color: #fff;
}

.game-info {
  padding: 8px 15px;
  background: #fff;
}

.game-title {
  font-size: 18px;
  font-weight: bold;
  color: #000;
  margin-bottom: 8px;
}

.game-description {
  color: #000;
  font-size: 14px;
  line-height: 1.4;
}

.category-buttons {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 5px;
  scrollbar-width: thin;
  scrollbar-color: var(--theme-color) #f0f0f0;
}

.category-buttons::-webkit-scrollbar {
  height: 6px;
}

.category-buttons::-webkit-scrollbar-track {
  background: var(--theme-color);
  border-radius: 3px;
}

.category-buttons::-webkit-scrollbar-thumb {
  background: var(--theme-color);
  opacity: 0.8;
  border-radius: 3px;
}

.category-buttons::-webkit-scrollbar-thumb:hover {
  background: var(--theme-color);
  opacity: 0.9;
}

.category-btn {
  background: var(--theme-color);
  color: #fff;
  border: none;
  padding: 12px 20px;
  /* border-radius: 25px; */
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.category-btn:hover {
  background: var(--theme-color);
  opacity: 0.8;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(146, 207, 244, 0.3);
}

.category-btn svg {
  width: 16px;
  height: 16px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: #f8fcff;
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-result-item:hover {
  background-color: var(--theme-color);
  opacity: 0.6;
}

.search-result-icon {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f8fcff;
}

.search-result-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-result-info {
  flex: 1;
}

.search-result-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

.search-result-category {
  font-size: 14px;
  color: #666;
}

.main-content {
  margin-top: 60px;
  min-height: calc(100vh - 60px - 120px);
  background-image: linear-gradient(to top, #fce7d5, #f69558);

  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0;
}

.category-section {
  margin: 10px 0 10px 0;
  /* background: var(--theme-color); */
  width: 100%;
  box-sizing: border-box;
}

.category-buttons {
  background: #f8fcff;
  padding: 8px;
  border-radius: 15px;
  margin: 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--theme-color) #f0f0f0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #fff;
  margin: 20px;
  padding: 30px;
}

.section-icon {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

.featured-games {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  background: #f8fcff;
  padding:5px 15px;
  border-radius: 15px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom:20px;
}

@media (min-width: 768px) {
  .featured-games {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1200px;
    margin: 0 auto;
  }
}

.game-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.game-card-link:hover .game-card {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
}

.game-card {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.game-card .game-thumbnail {
  margin: 0 auto;
  position: relative;
  width: 60%;
  height: 80px; 
  overflow: hidden;
  background: #f8fcff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 40%;
  
}

.game-card .game-thumbnail::before {
  content: "Loading...";
  position: absolute;
  color: var(--theme-color);
  font-size: 14px;
  z-index: 1;
}

.game-card .game-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 2;
}

.game-badge {
  position: absolute;
  background: #333;
  opacity: 0.9;
  color: #fff;
  padding: 2px 5px;
  border-radius: 15px;
  font-size: 10px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 3;
}

.game-badge svg {
  width: 11px;
  height: 11px;
}

.game-info {
  padding: 8px 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.game-title {
  font-size: 15px;
  font-weight: bold;
  color: #000;
  margin-bottom: 8px;
  line-height: 1.3;
}

.game-description {
  font-size: 12px;
  color: #000;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-wrapper {
  width: 100%;
  max-width: 95%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
}

.game-main-content {
  text-align: center;
  width: 100%;
  max-width: 95%;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

.game-title-section {
  margin: 5px 0 10px 0;
  text-align: center;
  width: 100%;
}

.game-title-subtitle {
  font-size: 26px;
  font-weight: bold;
  color: #000;
  margin: 0;
}

.game-card-container {
  padding: 20px;
  margin: 0 10px 20px 10px;
  max-width: 400px;
  position: relative;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-card-container .game-thumbnail {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 20px;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: block;
  margin-left: auto;
  margin-right: auto;
  position: static;
  overflow: visible;
}

.game-card-container .game-thumbnail img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 20px;
}

.play-now-btn {
  background: var(--theme-color);
  opacity: 0.9;
  color: #fff;
  border: none;
  padding: 16px 35px;
  border-radius: 15px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0;
  width: 100%;
  max-width: 350px;
  margin-left: auto;
  margin-right: auto;
}

.play-now-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.advertisement-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto 0;
  position: relative;
}

.advertisement-label {
  background: var(--theme-color);
  opacity: 0.9;
  color: #fff;
  padding: 8px 16px;
  border-radius: 0;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
  display: inline-block;
  width: auto;
  position: relative;
}

.advertisement-label::before,
.advertisement-label::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 150px;
  height: 2px;
  background: #999999;
  transform: translateY(-50%);
  z-index: 1;
  opacity: 1;
  visibility: visible;
}

.advertisement-label::before {
  right: 100%;
  margin-right: 0;
}

.advertisement-label::after {
  left: 100%;
  margin-left: 0;
}

.description-section {
  padding: 20px;
  margin: 0 10px 20px 10px;
  text-align: left;
  width: 100%;
}

.section-title {
  font-size: 24px;
  font-weight: bold;
  color: #000;
  margin-bottom: 15px;
}

.description-text {
  font-size: 16px;
  line-height: 1.5;
  color: #000;
  margin-bottom: 20px;
}

.game-info-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  align-items: flex-start;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
}

.info-label {
  font-size: 16px;
  font-weight: bold;
  color: #000;
}

.info-value {
  font-size: 16px;
  font-weight: normal;
  color: #000;
}

.star-icon {
  width: 20px;
  height: 20px;
  fill: #ffd700;
}

.more-games-section {
  padding: 20px;
  margin: 0 10px 20px 10px;
  width: 100%;
}

.more-games-title {
  font-size: 24px;
  font-weight: bold;
  color: #000;
  margin-bottom: 25px;
  text-align: left;
}

.more-games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.more-game-card {
  background: #f8fcff;
  border: 2px solid var(--theme-color);
  border-radius: 15px;
  padding: 18px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  user-select: none;
}

.more-game-card:active {
  transform: translateY(0);
  transition: transform 0.1s;
}

.more-game-icon {
  width: 65px;
  height: 65px;
  border-radius: 10px;
  margin: 0 auto 12px;
  overflow: hidden;
}

.more-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.more-game-name {
  font-size: 11px;
  font-weight: 500;
  color: #333;
  line-height: 1.3;
}

.loading {
  text-align: center;
  padding: 50px;
  color: #666;
}

.error {
  text-align: center;
  padding: 50px;
  color: #f44336;
}

/* .category-section {
  background: #f8fcff;
  border-radius: 15px;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
} */

.content-container {
  width: 100%;
  max-width: 95%;
  padding: 0 10px;
  margin: 0 auto;
  box-sizing: border-box;
}

.category-header {
  background: var(--theme-color);
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--theme-color);
  justify-content: center;
}

.category-icon {
  width: 35px;
  height: 35px;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.category-title {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  margin: 0;
  flex: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.category-count {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  margin-left: auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.sort-options {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  justify-content: center;
}

.sort-btn {
  background: var(--theme-color);
  color: #fff;
  border: 2px solid var(--theme-color);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sort-btn.active {
  background: var(--theme-color);
  color: #fff;
  border-color: var(--theme-color);
  opacity: 0.8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sort-btn:hover {
  background: var(--theme-color);
  opacity: 0.8;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.no-games {
  text-align: center;
  padding: 50px;
  color: #666;
  width: 100%;
}

.no-games h3 {
  margin-bottom: 15px;
}

.back-home-btn {
  background: #f8fcff;
  color: #333;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s;
}

.back-home-btn:hover {
  background: #f8fcff;
  opacity: 0.8;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(146, 207, 244, 0.3);
}

.about-container,
.privacy-container,
.terms-container {
  max-width: 95%;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.about-section,
.privacy-section,
.terms-section {
  margin-bottom: 30px;
  text-align: left;
}

.about-section h2,
.privacy-section h2,
.terms-section h2 {
  font-size: 18px;
  font-weight: bold;
  color: #000;
  margin-bottom: 15px;
  text-align: left;
}

.about-section p,
.privacy-section p,
.terms-section p {
  font-size: 15px;
  line-height: 1.6;
  color: #000;
  margin-bottom: 20px;
  text-align: left;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-top: 20px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 15px;
  text-align: center;
  border: 2px solid #999999;
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 15px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: bold;
  color: #000;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 13px;
  color: #000;
  line-height: 1.5;
}

.page-title {
  font-size: 28px;
  font-weight: bold;
  color: #000;
  text-align: center;
  font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
    "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
}

.ads {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.ads > div {
  width: 100%;
  max-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.top-btn {
  position: fixed;
  top: calc(50% + 60px);
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--theme-color);
  color: white;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
  z-index: 9999;
  box-shadow: 0 0 20px var(--theme-color);
}
