.page--g {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light background */
  line-height: 1.6;
  font-size: 16px;
  background-color: #ffffff; /* Explicitly set for contrast */
}

.page--g__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

/* Hero Section */
.page--g__hero-section {
  position: relative;
  padding-top: 10px; /* Small decorative top padding, not --header-offset */
  padding-bottom: 40px;
  background-color: #f0f8ff; /* Light background for the hero section */
  text-align: center;
}

.page--g__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.page--g__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page--g__hero-content {
  padding: 0 20px;
}

.page--g__hero-title {
  font-size: 3em;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 15px;
  line-height: 1.2;
}

.page--g__hero-description {
  font-size: 1.2em;
  color: #64748b;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

.page--g__hero-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Ensure buttons wrap on smaller screens */
}

/* Buttons */
.page--g__btn-primary,
.page--g__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1em;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons don't exceed container */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page--g__btn-primary {
  background-color: #2563eb;
  color: #ffffff;
  border: 2px solid #2563eb;
}

.page--g__btn-primary:hover {
  background-color: #1e40af;
  border-color: #1e40af;
}

.page--g__btn-secondary {
  background-color: #ffffff;
  color: #2563eb;
  border: 2px solid #2563eb;
}

.page--g__btn-secondary:hover {
  background-color: #e0e7ff;
  color: #1e40af;
  border-color: #1e40af;
}

.page--g__btn-large {
  padding: 18px 35px;
  font-size: 1.3em;
}

/* Section Titles */
.page--g__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: #2563eb;
  text-align: center;
  margin-bottom: 30px;
  padding-top: 40px;
}

.page--g__text-block {
  max-width: 900px;
  margin: 0 auto 30px auto;
  text-align: center;
  color: #4a5568;
}

/* Intro Section */
.page--g__intro-section {
  padding-bottom: 40px;
}

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

.page--g__content-item {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 30px;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.page--g__content-image {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page--g__item-title {
  font-size: 1.8em;
  color: #2563eb;
  margin-bottom: 15px;
}

.page--g__item-description {
  color: #4a5568;
  flex-grow: 1; /* Allow description to grow and fill space */
}

.page--g__feature-list {
  list-style: none;
  padding-left: 0;
  margin-top: 15px;
  color: #4a5568;
}

.page--g__feature-list li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}

.page--g__feature-list li::before {
  content: '✔';
  color: #2563eb;
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Games Section */
.page--g__games-section {
  background-color: #2563eb; /* Dark background */
  color: #ffffff; /* White text */
  padding-bottom: 60px;
}

.page--g__games-section .page--g__section-title,
.page--g__games-section .page--g__text-block {
  color: #ffffff;
}

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

.page--g__game-card {
  background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white for cards */
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page--g__game-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.page--g__game-title {
  font-size: 1.5em;
  color: #ffffff;
  margin-bottom: 10px;
}

.page--g__game-description {
  color: #e0e7ff;
  font-size: 0.95em;
  flex-grow: 1;
}

.page--g__cta-button-container {
  text-align: center;
  margin-top: 40px;
}

/* Rules Section */
.page--g__rules-section {
  padding-top: 40px;
  padding-bottom: 40px;
}

.page--g__rule-list,
.page--g__betting-steps {
  list-style: none;
  padding-left: 0;
  margin-top: 15px;
  color: #4a5568;
}

.page--g__rule-list li,
.page--g__betting-steps li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}

.page--g__rule-list li::before {
  content: '•';
  color: #2563eb;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.page--g__betting-steps li::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  background-color: #2563eb;
  color: #ffffff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8em;
  position: absolute;
  left: 0;
  top: 0;
}

.page--g__betting-steps {
  counter-reset: step-counter;
}

/* Tips Section */
.page--g__tips-section {
  background-color: #64748b; /* Secondary dark background */
  color: #ffffff; /* White text */
  padding-bottom: 60px;
}

.page--g__tips-section .page--g__section-title,
.page--g__tips-section .page--g__text-block {
  color: #ffffff;
}

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

.page--g__tip-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page--g__tip-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.page--g__tip-title {
  font-size: 1.5em;
  color: #ffffff;
  margin-bottom: 10px;
}

.page--g__tip-description {
  color: #e2e8f0;
  font-size: 0.95em;
  flex-grow: 1;
}

/* Promo Section */
.page--g__promo-section {
  padding-top: 40px;
  padding-bottom: 60px;
}

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

.page--g__promo-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page--g__promo-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page--g__card-title {
  font-size: 1.8em;
  color: #2563eb;
  margin-bottom: 15px;
}

.page--g__card-description {
  color: #4a5568;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* Responsibility Section */
.page--g__responsibility-section {
  background-color: #2563eb;
  color: #ffffff;
  padding-top: 60px;
  padding-bottom: 60px;
}

.page--g__responsibility-section .page--g__section-title,
.page--g__responsibility-section .page--g__text-block {
  color: #ffffff;
}

/* FAQ Section */
.page--g__faq-section {
  padding-top: 40px;
  padding-bottom: 60px;
}

.page--g__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
}

.page--g__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.page--g__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  font-size: 1.2em;
  font-weight: 600;
  color: #2563eb;
  background-color: #f8faff;
  transition: background-color 0.3s ease;
}

.page--g__faq-question:hover {
  background-color: #eef2ff;
}

.page--g__faq-qtext {
  pointer-events: none; /* Prevent text from blocking click event */
  flex-grow: 1;
}

.page--g__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: #64748b;
  margin-left: 15px;
  pointer-events: none; /* Prevent toggle icon from blocking click event */
  transition: transform 0.3s ease;
}

.page--g__faq-item.active .page--g__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

.page--g__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
}

.page--g__faq-item.active .page--g__faq-answer {
  max-height: 2000px !important; /* Sufficiently large */
  padding: 20px 25px !important;
  opacity: 1;
}

.page--g__faq-answer p {
  margin-bottom: 0;
  color: #4a5568;
}

/* Final CTA Section */
.page--g__final-cta-section {
  text-align: center;
  padding-top: 60px;
  padding-bottom: 80px;
  background-color: #f0f8ff;
}

/* Copyright */
.page--g__copyright-info {
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  color: #64748b;
  border-top: 1px solid #e0e0e0;
}

/* Universal image responsiveness */
.page--g img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Ensures images cover their area without distortion */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .page--g__container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* HERO 主图区域 */
  .page--g__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile */
    padding-bottom: 30px;
  }

  .page--g__hero-title {
    font-size: 2em;
    margin-bottom: 10px;
  }

  .page--g__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page--g__hero-cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding: 0 15px;
  }

  /* 按钮与按钮容器 */
  .page--g__btn-primary,
  .page--g__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page--g__hero-cta-buttons, .page--g__cta-button-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  /* Section Titles */
  .page--g__section-title {
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-top: 30px;
  }

  .page--g__text-block {
    font-size: 0.95em;
    margin-bottom: 20px;
  }

  /* Intro Section */
  .page--g__content-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  .page--g__content-item {
    padding: 20px;
  }

  .page--g__item-title {
    font-size: 1.5em;
  }

  /* Sản phẩm展示图区域 */
  .page--g__games-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  .page--g__game-card {
    padding: 15px;
  }

  .page--g__game-title {
    font-size: 1.3em;
  }

  /* 通用图片与容器 */
  .page--g img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page--g__hero-image-wrapper,
  .page--g__content-item,
  .page--g__game-card,
  .page--g__tip-card,
  .page--g__promo-card,
  .page--g__faq-item,
  .page--g__faq-list,
  .page--g__cta-button-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Tips Section */
  .page--g__tips-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page--g__tip-card {
    padding: 15px;
  }

  .page--g__tip-title {
    font-size: 1.3em;
  }

  /* Promo Section */
  .page--g__promo-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page--g__promo-card {
    padding: 20px;
  }

  .page--g__card-title {
    font-size: 1.5em;
  }

  /* FAQ Section */
  .page--g__faq-list {
    margin-top: 20px;
  }

  .page--g__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }

  .page--g__faq-toggle {
    font-size: 1.2em;
  }

  .page--g__faq-answer {
    padding: 0 20px;
  }

  .page--g__faq-item.active .page--g__faq-answer {
    padding: 15px 20px !important;
  }

  /* Copyright */
  .page--g__copyright-info {
    font-size: 0.8em;
    padding: 15px;
  }
}