/* 基础复位 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #FEF9F4;
  font-family: "Nunito", Nunito;
  color: #333;
}

header {
  max-width: 1300px;
  margin: 0 auto;
}

.drawer-item a {
  display: inline-block;
  width: 100%;
  height: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  /* padding: 0 15px; */
}

.hero-wrapper {
  background-color: #a34100;
  width: 100%;
}

nav {
  background: #333333;
  border-radius: 0px 0px 24px 24px;
  border: 2px solid #e09d78;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 40px;
  flex-wrap: wrap;
  gap: 15px;
  border-top: 0px solid #e09d78;
}

.logo a {
  color: #ff7f00;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 1px;
}

.he {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 5px;
  scrollbar-width: none;
  margin: 0 auto;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links li {
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
  font-weight: 800;
  font-size: 16px;
  line-height: 24px;
}

.nav-links li a {
  color: #666666;
}

.nav-links li.active a {
  color: #ff7f00;
}

.nav-links li:hover a {
  color: white;
}

/* Mobile Header Icons */
.mobile-icons {
  display: none;
  align-items: center;
  gap: 25px;
}

.mobile-icons svg {
  cursor: pointer;
  transition: transform 0.2s;
}

.mobile-icons svg:active {
  transform: scale(0.9);
}

.mobile-icons .icon-home {
  color: #d35400;
}

.mobile-icons .icon-menu,
.mobile-icons .icon-search {
  color: #ADADAD;
}

.card-header-most::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background-color: white;
}

/* Drawer Styles */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: #fdfaf5;
  z-index: 1001;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.drawer.active {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 30px;
}

.close-drawer {
  cursor: pointer;
  color: #999;
  padding: 10px;
}

.drawer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-item {
  background: #fff;
  border: 1px solid #ffe4d1;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.drawer-item.active {
  background: #fdf5e6;
  color: #ff7f00;
}

.drawer-item:hover {
  border-color: #ff7f00;
}

.search-box {
  background: #adadad;
  border-radius: 100px;
  cursor: pointer;
  padding: 6px 18px 1px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-section {
  display: flex;
  padding: 24px 0px;
  gap: 24px;
  align-items: center;
}

.hero-text {
  width: 264px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-text h2 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  color: white;
  margin-bottom: 10px;
}

.hero-text p {
  font-weight: 400;
  font-size: 22px;
  color: #f5f1e6;
  line-height: 1.2;
  text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.showcase-cards {
  flex: 1;
  display: flex;
  gap: 15px;
}

.card {
  background-color: #fdf5e6;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.card-img {
  background-color: #ddd;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-card {
  width: 400px;
  flex-shrink: 0;
}

.featured-card .img-box {
  height: 280px;
}

.small-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 12px;
  flex: 1;
}

.small-card .img-box {
  height: 100px;
}

.card-info {
  padding: 8px 12px;
  background: #fdf5e6;
}

.card-name {
  font-weight: bold;
  font-size: 16px;
  color: #333333;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stars {
  display: flex;
  gap: 2px;
}

.stars span {
  color: #ff7f00;
  font-size: 16px;
}

.youbian {
  margin-left: 12px;
}

.youbian span {
  color: #ffcc00;
  margin-left: 2px;
}

.content-body {
  padding: 20px 0;
  background: #fef9f4;
}

.trending-box {
  border: 1px dashed #d1b48c;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #fff9f0 0%, #ffffff 100%);
  background-image: url(../image/bj.svg);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  color: #a24400;
  line-height: 24px;
  margin-bottom: 15px;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background-color: #a34100;
}

.trending-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.trending-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.thumb-box {
  border-radius: 8px;
  overflow: hidden;
}

.thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-label {
  font-weight: bold;
  font-size: 16px;
  color: #C49222;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-columns {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  margin-bottom: 30px;
}

.new-games-card {
  background-color: #f5f1e6;
  border-radius: 12px;
  padding: 24px;
}

.circle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 10px;
  margin-top: 20px;
}

.circle-item-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0px 1px 4px 0px rgba(255, 86, 0, 0.38);
  border-radius: 100px 100px 12px 12px;
  width: 100%;
}

.circle-item {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  cursor: pointer;
  background: #d9d9d9;
  border-radius: 50%;
  border: 2px solid #d76126;
  max-width: 144px;
}

.circle-item:hover {
  transform: scale(1.05);
}

.circle-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.circle-label {
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 4px 12px;
  font-weight: bold;
  font-size: 16px;
  color: #d76126;
  line-height: 22px;
}

.most-played-card {
  border: 1px solid #e0d0b0;
  border-radius: 16px;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.card-header-most {
  background: linear-gradient(90deg, #d35400 0%, #e67e22 100%);
  color: white;
  padding: 14px 20px;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
}

.most-list {
  list-style: none;
  background: #f5f1e6;
  padding: 10px;
}

.most-item {
  display: flex;
  align-items: center;
  padding: 13px;
  gap: 12px;
  background: #f5f1e6;
  border-radius: 12px;
  margin-bottom: 8px;
  border-bottom: 1px dashed #eee;
  transition: background 0.2s;
}

.most-item:hover {
  background: #ffe4d1;
}

.most-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.mini-thumb {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background-color: #ccc;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.most-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.most-name {
  font-weight: bold;
  font-size: 16px;
  color: #333333;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.most-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #777;
}

.most-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: bold;
  font-size: 14px;
  color: #333333;
  line-height: 18px;
}

.start-btn {
  background: linear-gradient(180deg, #f39c12 0%, #d35400 100%);
  border: 2px dashed rgba(255, 255, 255, 0.4);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 20px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 0 #932c00;
  transition: all 0.1s;
}

.start-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #932c00;
}

.classic-grid {
  column-count: 7;
  column-gap: 14px;
  width: 100%;
}

.classic-card {
  display: inline-block;
  width: 100%;
  margin-bottom: 14px;
  break-inside: avoid;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  background-color: #ddd;
}

.classic-card:nth-child(odd) {
  height: 160px;
}

.classic-card:nth-child(even) {
  height: 200px;
}

.classic-card:nth-child(3n),
.classic-card:nth-child(7n),
.classic-card:nth-child(10n),
.classic-card:nth-child(11n) {
  height: 200px;
}

.classic-card:nth-child(4n),
.classic-card:nth-child(8n),
.classic-card:nth-child(9n) {
  height: 160px;
}

.classic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.classic-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.classic-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 15px 5px 5px 5px;
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  color: #ffffff;
  line-height: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stars-row {
  display: flex;
  gap: 2px;
  margin-left: 10px;
}

.stars-row span {
  color: #f1c40f;
  font-size: 16px;
}

.stats-icon {
  color: #f39c12;
  font-size: 14px;
}

.icon-shouye1:before,
.icon-fenlei:before {
  color: #ADADAD;
  font-size: 28px;
}

@media (max-width: 1024px) {
  .classic-grid {
    column-count: 5;
  }

  .trending-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .trending-box {
    background-image: url(none);
  }

  nav {
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .nav-links,
  .search-box {
    display: none;
  }

  .mobile-icons {
    display: flex;
  }

  .he {
    gap: 50px;
  }

  .showcase-section {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-text {
    width: 100%;
    text-align: center;
    align-items: center;
  }

  .showcase-cards {
    flex-direction: column;
  }

  .featured-card {
    width: 100%;
  }

  .main-columns {
    grid-template-columns: 1fr;
  }

  .trending-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .classic-grid {
    column-count: 3;
  }

  .container {
    padding: 0px 15px;
  }

}

@media (max-width: 480px) {
  .logo {
    font-size: 20px;
  }

  .he {
    gap: 20px;
  }

  .nav-links li {
    font-size: 13px;
  }

  .hero-text h2 {
    font-size: 28px;
  }

  .hero-text p {
    font-size: 18px;
  }

  .small-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trending-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .circle-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .classic-grid {
    column-count: 2;
  }
}

.stars .xing {
  position: relative;
  display: inline-block;
  color: #ccc;
}

/* 金色填充层 */
.stars .xing::before {
  content: "★";
  position: absolute;
  left: 0;
  top: 0;
  width: var(--percent, 0%);
  overflow: hidden;
  color: #ff7f00;
}