/* Base styles for .page-game-bai */
.page-game-bai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: #FFFFFF; /* Default body background */
}

.page-game-bai__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Color contrast classes */
.page-game-bai__dark-section {
  background-color: #017439;
  color: #FFFFFF;
}

.page-game-bai__light-bg {
  background-color: #FFFFFF;
  color: #333333;
}

.page-game-bai__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: inherit; /* Inherit color from parent section (dark/light) */
}

.page-game-bai__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: inherit;
}

.page-game-bai__text-block {
  margin-bottom: 20px;
  line-height: 1.8;
  color: inherit;
}

.page-game-bai__content-image {
  display: block;
  margin: 40px auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  max-width: 100%; /* Ensure button doesn't overflow */
}

.page-game-bai__btn-primary {
  background-color: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom font color for register/login */
  border: 2px solid #C30808;
}

.page-game-bai__btn-primary:hover {
  background-color: #e00b0b;
  border-color: #e00b0b;
}

.page-game-bai__btn-secondary {
  background-color: #FFFFFF;
  color: #017439;
  border: 2px solid #017439;
}

.page-game-bai__btn-secondary:hover {
  background-color: #f0f0f0;
  border-color: #017439;
}

.page-game-bai__btn-download {
  background-color: #017439;
  color: #FFFFFF;
  border: 2px solid #017439;
}

.page-game-bai__btn-download:hover {
  background-color: #005a2d;
  border-color: #005a2d;
}

.page-game-bai__btn-large {
  padding: 15px 35px;
  font-size: 1.2em;
}

/* Cards */
.page-game-bai__card {
  background-color: #FFFFFF;
  color: #333333;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.page-game-bai__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-game-bai__card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-game-bai__card-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #017439;
}

.page-game-bai__card-text {
  font-size: 1em;
  margin-bottom: 20px;
  line-height: 1.7;
  flex-grow: 1;
}

/* Hero Section */
.page-game-bai__hero-section {
  padding-top: 10px; /* Small padding, relying on shared body padding-top */
  padding-bottom: 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-game-bai__hero-image {
  width: 100%;
  height: auto;
  max-height: 700px;
  object-fit: cover;
  margin-bottom: 30px;
  border-radius: 10px;
}

.page-game-bai__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.page-game-bai__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -1px;
  color: #FFFFFF;
  margin-bottom: 20px;
  font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive font size for H1 */
}

.page-game-bai__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  color: #F0F0F0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-game-bai__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 30px;
  width: 100%; /* Ensure container takes full width */
  max-width: 100%;
  box-sizing: border-box;
}

/* Intro Section */
.page-game-bai__intro-section {
  padding: 80px 0;
}

/* Game Cards Grid */
.page-game-bai__games-list-section {
  padding: 80px 0;
}

.page-game-bai__game-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

/* Strategy Section */
.page-game-bai__strategy-section {
  padding: 80px 0;
}

.page-game-bai__strategy-item {
  background-color: #f9f9f9;
  border-left: 5px solid #017439;
  padding: 25px;
  margin-bottom: 30px;
  border-radius: 8px;
}

.page-game-bai__strategy-subtitle {
  font-size: 1.8em;
  font-weight: bold;
  color: #017439;
  margin-bottom: 15px;
}

/* Promotions Section */
.page-game-bai__promotions-section {
  padding: 80px 0;
}

.page-game-bai__promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-game-bai__promo-card .page-game-bai__card-title {
  color: #C30808; /* Use accent color for promo titles */
}

.page-game-bai__promo-note {
  text-align: center;
  margin-top: 40px;
  font-size: 1.1em;
  color: inherit;
}

.page-game-bai__promo-note a {
  color: #FFFF00; /* Custom link color for dark section */
  text-decoration: underline;
}

.page-game-bai__promo-note a:hover {
  color: #f0f000;
}

/* Guide Section */
.page-game-bai__guide-section {
  padding: 80px 0;
}

.page-game-bai__guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-game-bai__step-card .page-game-bai__card-title {
  color: #017439;
}

.page-game-bai__step-card a {
  margin-top: auto;
}

/* FAQ Section */
.page-game-bai__faq-section {
  padding: 80px 0;
}

.page-game-bai__faq-list {
  max-width: 900px;
  margin: 50px auto 0;
}

.page-game-bai__faq-item {
  background-color: #FFFFFF;
  color: #333333;
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-game-bai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  background-color: #f5f5f5;
  color: #017439;
  border-bottom: 1px solid #e0e0e0;
  list-style: none; /* For details/summary */
}

.page-game-bai__faq-question::-webkit-details-marker {
  display: none;
}

.page-game-bai__faq-item[open] > .page-game-bai__faq-question {
  border-bottom: 1px solid #d0d0d0;
  background-color: #ebebeb;
}

.page-game-bai__faq-qtext {
  flex-grow: 1;
}

.page-game-bai__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
  transform: rotate(45deg);
}

.page-game-bai__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  line-height: 1.7;
  color: #555555;
  background-color: #FFFFFF;
}

.page-game-bai__faq-answer p {
  margin-bottom: 0;
}

.page-game-bai__faq-answer a {
  color: #017439;
  text-decoration: underline;
}

.page-game-bai__faq-answer a:hover {
  color: #005a2d;
}

/* Call to Action Section */
.page-game-bai__call-to-action {
  padding: 80px 0;
  text-align: center;
}

.page-game-bai__call-to-action .page-game-bai__section-title {
  color: #FFFFFF;
}

.page-game-bai__call-to-action .page-game-bai__section-description {
  color: #F0F0F0;
  margin-bottom: 40px;
}

/* Copyright Info */
.page-game-bai__copyright-info {
  padding: 30px 0;
  text-align: center;
  font-size: 0.9em;
  color: #666666;
  border-top: 1px solid #e0e0e0;
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
  .page-game-bai__main-title {
    font-size: clamp(2em, 4.5vw, 3em);
  }

  .page-game-bai__hero-description {
    font-size: 1.2em;
  }

  .page-game-bai__section-title {
    font-size: 2em;
  }

  .page-game-bai__game-cards-grid,
  .page-game-bai__promo-grid,
  .page-game-bai__guide-steps {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .page-game-bai__card-image {
    height: 180px;
  }
}

@media (max-width: 768px) {
  .page-game-bai {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-game-bai__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* HERO 主图区域 */
  .page-game-bai__hero-section {
    padding-top: 10px !important; /* Small padding, not header offset */
    padding-bottom: 40px;
  }

  .page-game-bai__hero-image {
    max-height: 400px;
    margin-bottom: 20px;
  }

  .page-game-bai__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em) !important;
    margin-bottom: 15px;
  }

  .page-game-bai__hero-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  /* 按钮与按钮容器 */
  .page-game-bai__cta-buttons {
    flex-direction: column !important;
    gap: 15px !important;
    padding: 0 15px;
  }

  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary,
  .page-game-bai__btn-download,
  .page-game-bai a[class*="button"],
  .page-game-bai a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-game-bai__section-title {
    font-size: 1.8em;
    margin-bottom: 25px;
  }

  .page-game-bai__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  /* 通用图片与容器 */
  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-game-bai__section,
  .page-game-bai__card,
  .page-game-bai__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-game-bai__game-cards-grid,
  .page-game-bai__promo-grid,
  .page-game-bai__guide-steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-bai__card-image {
    height: 160px; /* Adjust card image height for mobile */
  }

  .page-game-bai__strategy-item {
    padding: 20px;
    margin-bottom: 20px;
  }

  .page-game-bai__strategy-subtitle {
    font-size: 1.5em;
  }

  .page-game-bai__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }

  .page-game-bai__faq-answer {
    padding: 15px 20px;
  }

  .page-game-bai__call-to-action {
    padding: 60px 0;
  }

  .page-game-bai__copyright-info {
    padding: 20px 0;
  }
}