/* Reset & Base */
:root {
  --primary-color: #ff4757;
  --secondary-color: #2ed573;
  --dark-bg: #1e272e;
  --light-text: #f1f2f6;
  --accent: #ffa502;
  --container-width: 1200px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: var(--dark-bg);
  color: var(--light-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: "Righteous", cursive;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.pixel-font {
  font-family: "Press Start 2P", cursive;
}

/* Utility */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

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

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Header/Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(30, 39, 46, 0.95);
  border-bottom: 3px solid var(--primary-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-family: "Press Start 2P", cursive;
  color: var(--primary-color);
  font-size: 1.2rem;
  text-decoration: none;
  text-shadow: 2px 2px 0px var(--accent);
  cursor: pointer;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  color: var(--light-text);
  text-decoration: none;
  font-family: "Righteous", cursive;
  font-size: 1.1rem;
  padding: 10px;
  transition: color 0.3s;
  cursor: pointer;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Page Header Card (Dynamic Backgrounds per page) */
.page-header-card {
  padding: 80px 20px;
  text-align: center;
  border-radius: 0 0 30px 30px;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.page-header-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
}

/* 不同的页面使用不同的 CSS 场景背景图 */
.bg-about::before {
  /* 宁静的夜晚/极光山脉场景 */
  background:
    linear-gradient(to bottom, #1a2a6c, #b21f1f, #fdbb2d),
    radial-gradient(circle at 50% 100%, #fdbb2d 10%, transparent 40%);
  background-blend-mode: overlay;
}
.bg-about::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background:
    linear-gradient(135deg, transparent 50%, #1e272e 50%),
    linear-gradient(225deg, transparent 50%, #1e272e 50%);
  background-size: 100px 100%;
  background-repeat: repeat-x;
  z-index: 0;
}

.bg-games::before {
  /* 赛博朋克/科幻落日场景 */
  background: linear-gradient(to bottom, #2b1055, #753a88);
}
.bg-games::after {
  content: "";
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 150px;
  background: linear-gradient(to bottom, #ff4757, #ffa502);
  border-radius: 50%;
  box-shadow: 0 0 50px #ff4757;
  z-index: 0;
}

.bg-faq::before {
  /* 奇幻森林/深渊场景 */
  background: linear-gradient(to top, #0f2027, #203a43, #2c5364);
}
.bg-faq::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(255, 255, 255, 0.8) 1px,
      transparent 2px
    ),
    radial-gradient(
      circle at 70% 60%,
      rgba(255, 255, 255, 0.8) 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 40% 80%,
      rgba(255, 255, 255, 0.6) 1px,
      transparent 2px
    );
  background-size: 100px 100px;
  opacity: 0.5;
  z-index: 0;
}

.bg-contact::before {
  /* 太空异星场景 */
  background: radial-gradient(circle at center, #141e30, #243b55);
}
.bg-contact::after {
  content: "";
  position: absolute;
  top: 10%;
  right: 10%;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 30% 30%, #ddd, #555);
  border-radius: 50%;
  box-shadow: inset -10px -10px 20px rgba(0, 0, 0, 0.8);
  z-index: 0;
}

.bg-privacy::before,
.bg-terms::before {
  /* 神秘迷雾场景 */
  background: linear-gradient(to bottom, #3a1c71, #d76d77, #ffaf7b);
  opacity: 0.8;
}

.page-header-card h1 {
  font-size: 3rem;
  color: #fff;
  text-shadow:
    2px 2px 4px rgba(0, 0, 0, 0.8),
    0 0 15px var(--primary-color);
  position: relative;
  z-index: 1;
}

/* Studio Mascot (CSS Drawn) */
.mascot-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  height: 150px;
}

.mascot {
  position: relative;
  animation: floatMascot 3s ease-in-out infinite;
}

.mascot-body {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--secondary-color), #27ae60);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  box-shadow:
    inset -10px -10px 20px rgba(0, 0, 0, 0.2),
    0 10px 20px rgba(46, 213, 115, 0.4);
  position: relative;
  animation: morphMascot 4s ease-in-out infinite alternate;
}

.mascot-eye {
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 25px;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
  animation: blinkMascot 4s infinite;
}

.mascot-eye::after {
  content: "";
  width: 6px;
  height: 6px;
  background: #2c3e50;
  border-radius: 50%;
  position: absolute;
  top: 4px;
  right: 2px;
}

.mascot-eye.left {
  left: 15px;
}
.mascot-eye.right {
  right: 15px;
}

.mascot-mouth {
  width: 20px;
  height: 10px;
  border-bottom: 3px solid #1e272e;
  border-radius: 0 0 10px 10px;
  position: absolute;
  bottom: 20px;
  left: 30px;
}

.mascot-shadow {
  width: 60px;
  height: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  margin: 20px auto 0;
  animation: shadowMascot 3s ease-in-out infinite;
}

@keyframes floatMascot {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes shadowMascot {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(0.6);
    opacity: 0.2;
  }
}

@keyframes morphMascot {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  50% {
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
  }
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
}

@keyframes blinkMascot {
  0%,
  96%,
  98% {
    transform: scaleY(1);
  }
  97%,
  99% {
    transform: scaleY(0.1);
  }
}

/* Home Page Hero Section with Adventure Game Scene Background */
.hero-section {
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, #1a0b2e 0%, #4b1d52 50%, #fdbb2d 100%);
}

/* 冒险游戏远山剪影 */
.hero-section::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background:
    linear-gradient(135deg, transparent 50%, #2c1030 50%),
    linear-gradient(225deg, transparent 50%, #2c1030 50%);
  background-size: 150px 100%;
  background-repeat: repeat-x;
  background-position: 0 100%;
  z-index: 1;
}

/* 冒险游戏近景山丘剪影 */
.hero-section::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 30%;
  background:
    linear-gradient(135deg, transparent 50%, #110515 50%),
    linear-gradient(225deg, transparent 50%, #110515 50%);
  background-size: 250px 100%;
  background-repeat: repeat-x;
  background-position: 50px 100%;
  z-index: 2;
}

/* 引入游戏元素图 (1024x500) 作为Banner主视觉元素，置于山丘之后 */
.hero-character-layer {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1000px;
  height: 60%;
  background: url("image/1024x500.png") no-repeat center bottom / contain;
  z-index: 2; /* 在远山(1)之上，近景山丘(2)之下/之间 */
  opacity: 0.85;
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 60%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 60%,
    rgba(0, 0, 0, 0) 100%
  );
  animation: floatCharacter 8s ease-in-out infinite alternate;
}

@keyframes floatCharacter {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  100% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* 添加一个神秘的星球/满月 */
.hero-moon {
  position: absolute;
  top: 15%;
  right: 15%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at 30% 30%, #ffeaa7, #ffb142);
  border-radius: 50%;
  box-shadow:
    0 0 60px rgba(255, 177, 66, 0.6),
    inset -10px -10px 20px rgba(211, 84, 0, 0.5);
  z-index: 0;
  animation: floatMoon 6s ease-in-out infinite alternate;
}

@keyframes floatMoon {
  0% {
    transform: translateY(0px);
  }
  100% {
    transform: translateY(-15px);
  }
}

.hero-title {
  font-size: 5rem;
  color: #fff;
  text-shadow:
    0 5px 15px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(255, 71, 87, 0.6);
  margin-bottom: 20px;
  position: relative;
  z-index: 3;
  font-family: "Press Start 2P", cursive;
}

.hero-slogan {
  font-size: 1.5rem;
  font-family: "Righteous", cursive;
  color: #ffeaa7;
  position: relative;
  z-index: 3;
  background: rgba(17, 5, 21, 0.6);
  padding: 12px 25px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 234, 167, 0.2);
}

/* General Sections */
.section {
  padding: 100px 0;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: var(--secondary-color);
  text-transform: uppercase;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.8);
}

/* About Preview in Home */
.about-preview {
  position: relative;
  overflow: hidden;
}

.about-preview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("image/1.png") no-repeat center center / cover;
  opacity: 0.15;
  z-index: 0;
  mask-image: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 1) 40%,
    rgba(0, 0, 0, 0) 80%
  );
  -webkit-mask-image: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 1) 40%,
    rgba(0, 0, 0, 0) 80%
  );
}

.about-preview .container {
  position: relative;
  z-index: 1;
}

/* Advantages / Features Section */
.advantages {
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(0, 0, 0, 0.4),
    transparent
  );
}

/* Add decorative images to Advantage Cards */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.advantage-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.advantage-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.advantage-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.4),
    inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.advantage-card:hover::before {
  opacity: 1;
}

.advantage-icon,
.advantage-card h3,
.advantage-card p {
  position: relative;
  z-index: 1;
}

.advantage-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  transition: transform 0.4s ease;
}

.advantage-card:hover .advantage-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Games Preview / List */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.game-card {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
}

.game-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  box-shadow: inset 0 0 0 2px transparent;
  border-radius: 20px;
  transition: box-shadow 0.4s ease;
  pointer-events: none;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.game-card:hover::after {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.game-icon {
  width: 100%;
  height: 512px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.game-card:hover .game-icon {
  transform: scale(1.08);
}

.game-info {
  padding: 20px;
  position: relative;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: 2;
}

.game-title {
  font-size: 1.5rem;
  color: var(--accent);
}

.game-type {
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 10px;
}

/* Our Games - Features Section */
.game-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.feature-box:hover {
  transform: translateY(-5px);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.5),
    inset 0 0 15px rgba(255, 255, 255, 0.05);
  border-color: var(--secondary-color);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* Our Games - Gallery Section */
.gallery-section-wide {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.gallery-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  height: auto;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  /* aspect-ratio: 16 / 9; */
}

.gallery-item img,
.gallery-item .gallery-placeholder {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: rgba(0, 0, 0, 0.3);
  transition: transform 0.5s;
}

.gallery-item:hover img,
.gallery-item:hover .gallery-placeholder {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 71, 87, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  color: #fff;
  font-family: "Righteous", cursive;
  font-size: 1.5rem;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.gallery-item:hover .gallery-overlay span {
  transform: translateY(0);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: var(--dark-bg);
  width: 90%;
  max-width: 800px;
  border-radius: 20px;
  border: 4px solid var(--primary-color);
  overflow: hidden;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  z-index: 10;
}

.modal-images {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.modal-images img {
  width: 100%;
  flex-shrink: 0;
  scroll-snap-align: start;
  object-fit: cover;
}

.modal-details {
  padding: 30px;
}

.btn-coming-soon {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 10px 25px;
  font-family: "Press Start 2P", cursive;
  font-size: 0.8rem;
  text-decoration: none;
  border-radius: 5px;
  margin-top: 20px;
  cursor: not-allowed;
  opacity: 0.8;
}

/* Reviews */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.review-card {
  background: linear-gradient(45deg, #2c3e50, #34495e);
  padding: 25px;
  border-radius: 15px;
  position: relative;
  border-left: 5px solid var(--accent);
}

.review-card::before {
  content: "“";
  font-size: 4rem;
  font-family: serif;
  color: rgba(255, 255, 255, 0.1);
  position: absolute;
  top: 10px;
  left: 20px;
}

/* Contact Us */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.contact-info,
.contact-form {
  flex: 1;
  min-width: 300px;
  background: rgba(255, 255, 255, 0.05);
  padding: 40px;
  border-radius: 20px;
  border: 2px dashed var(--secondary-color);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #555;
  color: #fff;
  border-radius: 8px;
  font-family: "Roboto", sans-serif;
}

.contact-form button {
  background: var(--secondary-color);
  color: #fff;
  border: none;
  padding: 15px 30px;
  font-family: "Righteous", cursive;
  font-size: 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.contact-form button:hover {
  background: #27ae60;
}

/* Footer */
.site-footer {
  background: #111;
  padding: 40px 0;
  text-align: center;
  border-top: 2px solid #333;
}

/* Utilities */
.text-center {
  text-align: center;
}
.mb-2 {
  margin-bottom: 2rem;
}
.mt-2 {
  margin-top: 2rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle .bar {
  height: 3px;
  width: 100%;
  background-color: var(--primary-color);
  border-radius: 10px;
  transition: all 0.3s ease;
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .site-header nav {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(30, 39, 46, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.3s ease;
    z-index: 999;
  }

  .site-header nav.nav-open {
    right: 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .nav-links a {
    font-size: 1.5rem;
  }

  /* Hamburger animation */
  .menu-toggle.open .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.open .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Mobile Hero Section Adjustment */
  .hero-title {
    font-size: 3rem;
  }
  .hero-slogan {
    font-size: 1.1rem;
    padding: 10px 20px;
  }
  .hero-moon {
    width: 90px;
    height: 90px;
    top: 12%;
    right: 10%;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-slogan {
    font-size: 0.9rem;
    padding: 8px 12px;
  }
  .hero-moon {
    width: 70px;
    height: 70px;
    top: 10%;
    right: 5%;
  }
  .hero-character-layer {
    height: 50%;
  }
}
