/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #433264;
  min-height: 100vh;
}
.index-bg {
  position: relative;
  width: 100%;
}
.about-bg {
  position: relative;
  background: url("../images/about_bg.jpg") no-repeat center top;
  background-size: 100% auto;
  width: 100%;
}
.games-bg {
  position: relative;
  width: 100%;
  padding-bottom: 60px;
  background-color: #433264;
  overflow: hidden;
}

.games-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../images/left_bg.png") no-repeat left top;
  background-size: contain;
  opacity: 0.9;
  z-index: 1;
}
.index-bg::after,
.about-bg::after,
.games-bg::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 60%;
  height: 100%;
  background: url("../images/right_bg.png") no-repeat right bottom;
  background-size: contain;
  opacity: 0.9;
  z-index: 1;
  pointer-events: none;
}
.about-bg > *,
.games-bg > * {
  position: relative;
  z-index: 2;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 12px 0;
  transition: all 0.3s ease;
}

/* 首页导航默认透明 */
.index-bg .header {
  background: transparent;
  backdrop-filter: blur(0);
}

/* 首页导航滚动后显示背景 */
.index-bg .header.scrolled {
  background: rgba(46, 22, 96, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 游戏列表页面导航默认就有背景 */
.games-bg .header,
.about-bg .header {
  background: rgba(46, 22, 96, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 游戏列表页面导航滚动后背景加深 */
.games-bg .header.scrolled,
.about-bg .header.scrolled {
  background: rgba(46, 22, 96, 0.9);
}

.header_cont {
  width: 90%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo img {
  height: 50px;
  background-size: 100% auto;
}

.nav ul {
  display: flex;
  list-style: none;
}

.nav ul li {
  margin-left: 40px;
}

.nav ul li a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

.nav ul li a:hover,
.nav ul li a.active {
  color: #ffe88c;
}

/* Hero Section */
.hero-cont {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 250px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}
.hero-title {
  font-size: 96px;
  background: linear-gradient(to right, #f29c91, #ffcd4b, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: left;
  text-shadow: none;
}
.hero-subtitle {
  font-size: 48px;
  color: #f7e3ff;
  text-align: left;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
/*广告轮播*/
.web-banner {
  width: 100%;
  height: auto;
  overflow: hidden;
  position: relative;
  margin: 0 auto;
  z-index: 1;
}
.web-banner ul {
  width: 500%;
  height: auto;
  position: relative;
  left: 0;
  transition: transform 0.8s ease-in-out;
  display: flex;
}
.web-banner ul li {
  width: 20%;
  height: auto;
  position: relative;
}
.web-banner ul li a {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}
.web-banner ul li img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.web-banner ul li.space {
  display: none;
}
/* 移除不需要的按钮样式 */
.web-banner .btnBg,
.web-banner .btn {
  display: none;
}

/* Games Section */
.game_show {
  padding: 10px 0 70px 0;
  overflow: hidden;
}

.game_show_header {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 80px;
  position: relative;
  text-align: center;
}

.game_show_header::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 1px;
  background-color: #705e90;
}

.section-title {
  font-size: 36px;
  color: #ffffff;
  font-weight: bold;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.more-games {
  color: #dccbee;
  text-decoration: none;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 20px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.more-games:hover {
  color: #fff;
}

.more-games .arrow {
  background: url(../images/more_icon.png) no-repeat;
  width: 10px;
  height: 20px;
  background-size: 100% auto;
  margin-left: 10px;
}

.games {
  max-width: 1386px;
  margin: 0 auto;
  position: relative;
  display: flex;
  justify-content: center;
}

.carousel-wrapper {
  position: relative;
  overflow: visible;
  padding: 40px 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 2;
}

.carousel-container {
  display: flex;
  gap: 20px;
  width: fit-content;
  margin: 0 auto;
  transform: translateX(0);
  transition: transform 0.5s ease;
  will-change: transform;
}

.game-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  width: 164px;
  height: 343px;
  transition: all 0.5s ease;
  cursor: pointer;
  opacity: 0.6;
  transform: scale(0.85);
}

.game-card.active {
  width: 256px;
  height: 448px;
  opacity: 1;
  transform: scale(1);
  margin-top: -70px;
  background-size: 100% auto;
  z-index: 2;
}
.game-card.active img {
  width: 256px;
  height: 448px;
  object-fit: cover;
  border-radius: 20px;
  transition: all 0.5s ease;
  background-size: 100% auto;
}
.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  transition: all 0.5s ease;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 3;
  transition: background-color 0.3s ease;
}

.carousel-button:hover {
  background: rgba(255, 255, 255, 0.4);
}

.carousel-button.prev {
  left: 20px;
}

.carousel-button.next {
  right: 20px;
}

/* Footer */
.footer {
  background: #332946;
  padding: 45px 0;
}

.footer .container {
  display: flex;
  justify-content: space-between;
}

.footer-logo img {
  width: 122px;
  height: 50px;
  background-size: 100% auto;
}

.footer-info p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  line-height: 1.8;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  width: 30px;
  height: 30px;
  background: url(../images/nav_icon.png) no-repeat center;
  background-size: contain;
  cursor: pointer;
  z-index: 1001;
  transition: background-image 0.3s ease;
}

.menu-toggle.active {
  background: url(../images/close.png) no-repeat center;
  background-size: contain;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-card {
  animation: fadeIn 0.6s ease-out forwards;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
  animation: pulse 2s infinite ease-in-out;
}

.play-button img {
  width: 80px;
  height: 80px;
  background-size: 100% auto;
}

/* 游戏列表页面样式 */
.games-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 0 20px 0;
}

.games-nav {
  margin: 30px 0;
}

.games-nav ul {
  display: flex;
  justify-content: flex-start;
  list-style: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0;
}

.games-nav li {
  margin-right: 60px;
}

.games-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  padding: 10px 0;
  display: block;
  position: relative;
  opacity: 0.65;
  transition: opacity 0.3s;
}

.games-nav li.active a {
  opacity: 1;
}

.games-nav li.active a::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #fff;
}

.games-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 30px;
}

.game-item {
  cursor: pointer;
  transition: transform 0.3s;
  margin-bottom: 20px;
}

.game-item:hover {
  transform: translateY(-5px);
}

.game-item img {
  width: 274px;
  height: 176px;
  object-fit: cover;
  border-radius: 15px;
}

.game-info {
  padding: 10px;
}

.game-info h3 {
  color: #fff;
  width: 274px;
  font-weight: normal;
  margin: 0 0 5px;
  font-size: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-info p {
  width: 274px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 将所有移动端样式整合到这一个媒体查询中 */
@media (max-width: 768px) {
  /* 根字体设置 */
  html {
    font-size: 26.667vw;
    margin: 0 auto;
    -ms-touch-action: none;
    height: 100%;
  }
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  body {
    font-size: 0.12rem;
    margin: 0 auto;
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    background-color: #433264;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
  }

  .index-bg {
    min-height: 100vh;
    width: 100%;
    position: relative;
  }

  .header {
    padding: 0.07rem 0;
  }

  .header_cont {
    width: 92%;
    padding: 0 0.16rem;
  }

  .logo img {
    width: 0.91rem;
    height: 0.37rem;
    background-size: 100% auto;
  }

  .menu-toggle {
    display: block;
    width: 0.24rem;
    height: 0.24rem;
    background-size: 100% auto;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: rgba(43, 27, 75, 0.95);
    backdrop-filter: blur(10px);
    padding: 80px 20px 20px;
    transition: right 0.3s ease;
    z-index: 1000;
  }

  .nav.active {
    right: 0;
  }

  .nav ul {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav ul li {
    margin: 0.1rem 0;
    width: 100%;
  }

  .nav ul li a {
    font-size: 0.19rem;
    display: block;
    padding: 0.08rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Hero Section */
  .hero-cont {
    padding-top: 1.7rem;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 92%;
  }

  .hero-title {
    font-size: 0.45rem;
    text-align: left;
    width: 100%;
    background: linear-gradient(to right, #f29c91, #ffcd4b, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
  }

  .hero-subtitle {
    font-size: 0.22rem;
    text-align: left;
    width: 100%;
  }

  /* Games Section */
  .game_show {
    padding: 0 0 0.8rem 0;
  }

  .game_show_header {
    width: 92%;
    margin: 0 auto;
  }

  .game_show_header::after {
    display: none;
  }

  .section-title {
    font-size: 0.2rem;
    margin-bottom: 0.05rem;
    position: relative;
    display: inline-block;
  }

  .section-title::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.3rem;
    height: 1px;
    margin-left: 0.15rem;
    background-color: #705e90;
  }

  .games {
    width: 96%;
    margin: 0 auto;
    position: relative;
    padding-bottom: 0.3rem;
  }

  .more-games {
    font-size: 0.14rem;
    border-radius: 0.25rem;
    padding: 0.12rem 0.24rem;
    border: 2px solid #9488aa;
    position: absolute;
    left: 50%;
    bottom: -3rem;
    transform: translateX(-50%);
    width: fit-content;
    text-align: center;
  }

  .more-games .arrow {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.1rem;
  }

  .more-games:hover {
    border: 2px solid #fff;
    color: #fff;
  }

  .carousel-wrapper {
    overflow: hidden;
    padding: 0.15rem 0 0.1rem 0;
    width: 100%;
  }

  .carousel-container {
    display: flex;
    gap: 10px;
    transition: transform 0.5s ease;
    width: 100%;
  }

  .game-card {
    flex: 0 0 calc(33.333% - 7px);
    width: calc(33.333% - 7px);
    margin: 0;
    height: 1.98rem;
  }

  .game-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
  }

  .game-card.active {
    width: 0.95rem;
    height: 1.98rem;
    opacity: 1;
    transform: scale(1);
    margin-top: 0;
  }

  .game-card.active img {
    width: 0.95rem;
    height: 1.98rem;
    object-fit: cover;
    background-size: 100% auto;
  }

  .carousel-button {
    display: none;
  }
  /* Footer */
  .footer {
    padding: 0.3rem 0;
  }
  .footer .container {
    width: 96%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }

  .footer-logo img {
    height: 0.3rem;
    width: 0.72rem;
  }
  .footer-info {
    padding-bottom: 0.15rem;
  }
  .footer-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.11rem;
    line-height: 1.8;
  }
  /* 游戏列表页面样式 */
  .games-bg {
    padding-bottom: 0.25rem;
  }
  .games-bg::before {
    width: 150%;
  }
  .games-bg::after {
    width: 100%;
  }
  .about-bg::after {
    width: 100%;
    opacity: 0.7;
  }
  .games-container {
    padding: 0.5rem 0.15rem 0.15rem 0.15rem;
  }

  .games-nav {
    margin: 0.15rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .games-nav ul {
    white-space: nowrap;
  }

  .games-nav li {
    display: inline-block;
    margin-right: 0.5rem;
  }

  .games-nav a {
    font-size: 0.15rem;
  }

  .games-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .game-item {
    width: 1.68rem;
  }
  .game-item img {
    width: 1.68rem;
    height: 1.08rem;
    background-size: 100% auto;
  }

  .game-info {
    width: 1.68rem;
    padding: 0.05rem;
  }

  .game-info h3 {
    width: 1.68rem;
    font-size: 0.15rem;
  }

  .game-info p {
    width: 1.68rem;
    font-size: 0.12rem;
  }
  /* 首页广告轮播样式移动端 */
  .web-banner {
    height: calc(100vh - 74px); /* 减去header高度 */
    margin-top: 74px; /* header高度 */
  }

  .web-banner ul {
    height: 100%;
  }

  .web-banner ul li {
    height: 100%;
  }

  .web-banner ul li a {
    height: 100%;
  }

  .web-banner ul li img {
    height: 100%;
    object-fit: cover;
    object-position: 60% center;
  }
}

/* 关于我们页面样式 */
.about-container {
  width: 100%;
  padding: 0;
  position: relative;
}
.about-text {
  background: url(../images/about-us.png) no-repeat center;
  background-size: 100% auto;
  position: absolute;
  top: 180px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 224px;
}
.about-content {
  max-width: 1200px;
  padding: 320px 0 100px 0;
  margin: 0 auto;
}

.about-section {
  padding: 30px;
  color: #fff;
}

.about-section h2 {
  font-size: 36px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.about-section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
}
.contact-info p,
.about-section p {
  font-size: 20px;
  color: #f1eaff;
  line-height: 1.8;
  margin-bottom: 10px;
}
.about-section p span {
  color: #aca2c1;
}
.contact-info a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s;
}

.contact-info a:hover {
  opacity: 0.8;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
  .about-bg {
    position: relative;
    background: url("../images/about_bg2.jpg") no-repeat center top;
    background-size: 100% auto;
    width: 100%;
  }
  .about-text {
    height: 0.5rem;
    top: 1rem;
    width: 90%;
  }
  .about-content {
    width: 92%;
    padding: 1.1rem 0 0.2rem 0;
    margin: 0 auto;
  }

  .about-section {
    padding: 0.15rem;
    color: #fff;
  }
  .about-section h2 {
    font-size: 0.2rem;
    margin-bottom: 0.15rem;
    position: relative;
    padding-bottom: 0.05rem;
  }
  .contact-info p {
    font-size: 0.13rem;
  }
  .contact-info p a {
    font-size: 0.15rem;
  }
  .about-section p {
    font-size: 0.13rem;
  }
}

/* 游戏详情页样式 */
.details-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 150px 0 50px 0;
}
.game-video-container {
  background: url(../images/video_bg.png) no-repeat center;
  background-size: 100% 100%;
  width: 100%;
  padding: 40px;
  margin-bottom: 40px;
}
.video-wrapper {
  position: relative;
  width: 95%;
  margin: 0 auto;
  border-radius: 30px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 9;
}
.video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.game-video{
  margin: auto;
  height: 90%;
  top: 4.6%;
  position: relative;
}
.video-wrapper.playing .video-preview {
  display: none;
}
.video-wrapper.playing .play-button {
  opacity: 0;
  pointer-events: none;
}
.video-wrapper.playing .game-video {
  display: block;
}
.game-header {
  margin: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-meta {
  flex: 1;
}
.game-title {
  font-size: 30px;
  font-weight: normal;
  color: #fff;
  margin-bottom: 15px;
}
.game-tags {
  display: flex;
  gap: 10px;
}
.tag {
  padding: 5px 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #fff;
  font-size: 14px;
}
.game-action {
  margin-left: auto;
}
.try-btn {
  display: inline-block;
  padding: 10px 40px;
  background: #ffcf64;
  border-radius: 25px;
  color: #8e3500;
  text-decoration: none;
  font-size: 18px;
  transition: all 0.3s ease;
}
.try-btn:hover {
  background: #ffbd29;
  color: #8e3500;
  transform: translateY(-2px);
}
.game-basic-info {
  display: flex;
  align-items: center;
  gap: 20px;
}
.game-icon {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  overflow: hidden;
}
.game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
  .details-content {
    padding: 0.7rem 0.05rem 0.15rem 0.05rem;
    margin: 0 auto;
  }

  .game-video-container {
    padding: 0.1rem;
    margin-bottom: 0.2rem;
  }
  .video-wrapper {
    border-radius: 0.1rem;
  }
  .play-button img {
    width: 0.41rem;
    height: 0.41rem;
    background-size: 100% auto;
  }
  .game-header {
    margin: 0.15rem 0.1rem 0 0.1rem;
    padding-bottom: 0.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .game-basic-info {
    gap: 0.1rem;
  }
  .game-icon {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 0.1rem;
  }
  .game-title {
    font-size: 0.18rem;
    margin-bottom: 0.08rem;
  }
  .game-tags {
    gap: 0.05rem;
  }
  .tag {
    padding: 0.03rem 0.08rem;
    font-size: 0.11rem;
  }
  .try-btn {
    padding: 0.06rem 0.25rem;
    font-size: 0.14rem;
  }
}
