.page-game-bai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333;
  background-color: #ffffff;
}

.page-game-bai__hero-section {
  padding-top: 10px; /* Minimal padding-top, relying on body for header offset */
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #ffffff;
  background-color: #017439; /* Brand primary color for section background */
}

.page-game-bai__hero-image-wrapper {
  width: 100%;
  max-height: 675px; /* Max height for hero image wrapper */
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.page-game-bai__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly darken image for text readability */
}

.page-game-bai__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 40px 20px;
  margin-top: -150px; /* Pull content up over the image slightly */
  background: linear-gradient(to top, rgba(1, 116, 57, 0.9), rgba(1, 116, 57, 0.7)); /* Gradient overlay for content area */
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.page-game-bai__main-title {
  font-size: clamp(2.2em, 4vw, 3.5em);
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #FFFF00; /* Custom color for main title */
}

.page-game-bai__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-game-bai__hero-cta-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-game-bai__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.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: #e02020;
  transform: translateY(-2px);
}

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

.page-game-bai__btn-secondary:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

.page-game-bai__btn-small {
  padding: 8px 15px;
  font-size: 0.9em;
  border-radius: 5px;
  background-color: #017439;
  color: #ffffff;
  border: 1px solid #017439;
}

.page-game-bai__btn-small:hover {
  background-color: #005f2e;
}

.page-game-bai__section {
  padding: 60px 0;
}

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

.page-game-bai__container--narrow {
  max-width: 800px;
}

.page-game-bai__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #017439;
}

.page-game-bai__introduction .page-game-bai__section-title {
  color: #017439;
}

.page-game-bai__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: justify;
}

.page-game-bai__figure {
  margin: 40px auto;
  text-align: center;
  max-width: 100%;
}

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

.page-game-bai__figcaption {
  font-size: 0.9em;
  color: #555;
  margin-top: 10px;
}

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

.page-game-bai__game-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #333333;
}

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

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

.page-game-bai__card-description {
  font-size: 0.95em;
  color: #555;
  margin-bottom: 20px;
  padding: 0 15px;
  flex-grow: 1;
}

.page-game-bai__view-all-games {
  text-align: center;
  margin-top: 50px;
}

.page-game-bai__dark-section {
  background-color: #017439;
  color: #ffffff;
}

.page-game-bai__dark-section .page-game-bai__section-title,
.page-game-bai__dark-section .page-game-bai__card-title,
.page-game-bai__dark-section .page-game-bai__feature-title,
.page-game-bai__dark-section .page-game-bai__promo-title,
.page-game-bai__dark-section .page-game-bai__faq-question {
  color: #ffffff;
}

.page-game-bai__dark-section .page-game-bai__text-block,
.page-game-bai__dark-section .page-game-bai__feature-description,
.page-game-bai__dark-section .page-game-bai__promo-description,
.page-game-bai__dark-section .page-game-bai__faq-answer {
  color: #f0f0f0;
}

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

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

.page-game-bai__feature-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.page-game-bai__feature-title {
  font-size: 1.6em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-game-bai__feature-description {
  font-size: 1em;
  color: #f0f0f0;
}

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

.page-game-bai__step-item {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-game-bai__step-title {
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 20px;
  color: #017439;
}

.page-game-bai__step-item .page-game-bai__figure {
  margin: 20px auto;
}

.page-game-bai__step-description {
  font-size: 1em;
  color: #555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-game-bai__promo-card {
  display: flex;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-game-bai__promo-image {
  width: 40%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-game-bai__promo-content {
  width: 60%;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-game-bai__promo-title {
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-game-bai__promo-description {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 25px;
}

.page-game-bai__promo-note {
  text-align: center;
  font-style: italic;
  color: #f0f0f0;
  margin-top: 30px;
}

.page-game-bai__promo-note a {
  color: #FFFF00;
  text-decoration: underline;
}

.page-game-bai__tips-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
}

.page-game-bai__tips-list li {
  background-color: #ffffff;
  margin-bottom: 20px;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.page-game-bai__list-item-title {
  font-size: 1.4em;
  color: #017439;
  margin-bottom: 10px;
}

.page-game-bai__tips-list li p {
  font-size: 1em;
  color: #555;
  text-align: left;
}

.page-game-bai__faq-list {
  margin-top: 40px;
}

.page-game-bai__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 20px 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.page-game-bai__faq-question {
  font-size: 1.3em;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 10px;
}

.page-game-bai__faq-answer {
  font-size: 1em;
  color: #f0f0f0;
}

.page-game-bai__final-cta {
  text-align: center;
}

.page-game-bai__final-cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-game-bai__hero-content {
    padding: 30px 20px;
    margin-top: -100px;
  }

  .page-game-bai__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }

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

  .page-game-bai__promo-card {
    flex-direction: column;
  }

  .page-game-bai__promo-image,
  .page-game-bai__promo-content {
    width: 100%;
  }

  .page-game-bai__promo-image {
    height: 250px;
  }

  .page-game-bai__promo-content {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  /* 1. Top section title + CTA */
  .page-game-bai__hero-section {
    padding-top: 10px !important; /* Ensure minimal padding-top */
  }

  .page-game-bai__hero-content {
    margin-top: -80px !important;
    padding: 25px 15px !important;
  }

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

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

  .page-game-bai__hero-cta-buttons {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .page-game-bai__btn,
  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary,
  .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;
  }

  /* 2. Single column long text container */
  .page-game-bai__container,
  .page-game-bai__container--narrow {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-game-bai__section {
    padding: 40px 0 !important;
  }

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

  .page-game-bai__text-block {
    font-size: 1em !important;
  }

  .page-game-bai__game-grid,
  .page-game-bai__features-grid,
  .page-game-bai__steps-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .page-game-bai__game-card,
  .page-game-bai__feature-item,
  .page-game-bai__step-item,
  .page-game-bai__faq-item {
    padding: 20px !important;
  }

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

  .page-game-bai__card-title {
    font-size: 1.3em !important;
  }

  .page-game-bai__promo-card {
    flex-direction: column !important;
  }

  .page-game-bai__promo-image,
  .page-game-bai__promo-content {
    width: 100% !important;
    padding: 20px !important;
  }

  .page-game-bai__promo-image {
    height: 200px !important;
  }

  .page-game-bai__promo-title {
    font-size: 1.6em !important;
  }

  .page-game-bai__promo-description {
    font-size: 1em !important;
  }

  .page-game-bai__list-item-title {
    font-size: 1.2em !important;
  }

  .page-game-bai__faq-question {
    font-size: 1.1em !important;
  }

  .page-game-bai__final-cta-buttons {
    flex-direction: column !important;
    gap: 10px !important;
  }

  /* 3. Generic images and figures */
  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-game-bai__figure {
    margin: 20px auto !important;
  }

  /* 4. Buttons and button containers (already covered above with .page-game-bai__btn, etc.) */
  .page-game-bai__hero-cta-buttons,
  .page-game-bai__final-cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
  }

  /* 5. FAQ section (no special tutorial section here, using FAQ as example) */
  .page-game-bai__faq-item {
    margin-bottom: 10px !important;
  }

  .page-game-bai__faq-question {
    font-size: 1.1em !important;
  }

  .page-game-bai__faq-answer {
    font-size: 0.95em !important;
  }
}