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

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

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

.page-game-bai__dark-section {
  background-color: #E53935; /* Main brand color */
  color: #ffffff; /* White text for dark background */
}

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

.page-game-bai__card {
  background-color: #FFFFFF;
  color: #333333;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-bai__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.page-game-bai__dark-bg {
  background-color: #E53935;
  color: #ffffff;
  border: none;
}

/* Hero Section */
.page-game-bai__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding */
  padding-bottom: 60px;
  overflow: hidden;
}

.page-game-bai__hero-image-wrapper {
  width: 100%;
  height: 500px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.page-game-bai__hero-content {
  text-align: center;
  padding: 40px 20px 0;
  max-width: 900px;
  margin: 0 auto;
}

.page-game-bai__main-title {
  font-size: 2.8em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
  max-width: 100%;
}

.page-game-bai__lead-text {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-game-bai__cta-buttons--centered {
  margin-top: 40px;
}

.page-game-bai__btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.page-game-bai__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: none;
}

.page-game-bai__btn-primary:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

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

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

/* General Section Titles */
.page-game-bai__section-title {
  font-size: 2.2em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: inherit; /* Inherit from section, ensures contrast */
}

.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;
}

/* Why Choose Section */
.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-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 15px;
  color: #E53935;
}

.page-game-bai__feature-text {
  font-size: 1em;
  color: #333333;
}

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

.page-game-bai__game-card {
  text-align: center;
  overflow: hidden;
}

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

.page-game-bai__game-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #E53935;
}

.page-game-bai__game-text {
  font-size: 0.95em;
  color: #333333;
  margin-bottom: 20px;
}

.page-game-bai__game-btn {
  padding: 10px 20px;
  font-size: 1em;
}

/* How To Play Section */
.page-game-bai__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-game-bai__step-card {
  text-align: center;
  padding: 30px;
  position: relative;
}

.page-game-bai__step-number {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #FF5A4F;
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5em;
  font-weight: 700;
  border: 3px solid #E53935;
}

.page-game-bai__step-title {
  font-size: 1.3em;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #ffffff;
}

.page-game-bai__step-text {
  font-size: 0.95em;
  color: #f0f0f0;
}

/* Tips Section */
.page-game-bai__tips-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.page-game-bai__tips-text {
  flex: 2;
}

.page-game-bai__tip-heading {
  font-size: 1.5em;
  font-weight: 600;
  margin-top: 25px;
  margin-bottom: 10px;
  color: #E53935;
}

.page-game-bai__tips-text p {
  font-size: 1em;
  margin-bottom: 15px;
  color: #333333;
}

.page-game-bai__tips-image-wrapper {
  flex: 1;
  min-width: 300px;
  max-width: 680px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

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

.page-game-bai__promo-card {
  text-align: center;
}

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

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

.page-game-bai__promo-btn {
  background-color: #ffffff;
  color: #E53935;
  border: 2px solid #ffffff;
  padding: 10px 20px;
  font-size: 1em;
}

.page-game-bai__promo-btn:hover {
  background-color: #f0f0f0;
  color: #E53935;
}

/* Security and Support Section */
.page-game-bai__info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-game-bai__info-item {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page-game-bai__info-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 15px;
  color: #E53935;
}

.page-game-bai__info-text {
  font-size: 1em;
  color: #333333;
}

/* Conclusion Section */
.page-game-bai__conclusion-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Image global responsive */
.page-game-bai img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Responsive Styles --- */

@media (max-width: 1024px) {
  .page-game-bai__main-title {
    font-size: 2.5em;
  }

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

  .page-game-bai__hero-image-wrapper {
    height: 400px;
  }

  .page-game-bai__tips-content {
    flex-direction: column;
    align-items: center;
  }

  .page-game-bai__tips-image-wrapper {
    margin-top: 30px;
    width: 100%;
    max-width: 600px; /* Constrain max width on tablets */
  }
}

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

  /* 1. Top section title + dual CTA */
  .page-game-bai__hero-section {
    padding-top: 10px !important; /* Enforce small top padding */
    padding-bottom: 40px;
  }

  .page-game-bai__hero-image-wrapper {
    height: 300px;
  }

  .page-game-bai__main-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

  .page-game-bai__lead-text {
    font-size: 1em;
    margin-bottom: 25px;
  }

  /* 4. Buttons and button containers */
  .page-game-bai__cta-buttons {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }

  .page-game-bai__btn,
  .page-game-bai__game-btn,
  .page-game-bai__promo-btn {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 15px;
    font-size: 1em;
  }

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

  .page-game-bai__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

  /* 2. Single column long text containers */
  .page-game-bai__features-grid,
  .page-game-bai__games-grid,
  .page-game-bai__steps-grid,
  .page-game-bai__promo-grid,
  .page-game-bai__info-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-bai__feature-card,
  .page-game-bai__game-card,
  .page-game-bai__step-card,
  .page-game-bai__promo-card,
  .page-game-bai__info-item {
    padding: 20px;
  }

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

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

  .page-game-bai__tips-content {
    flex-direction: column;
    gap: 20px;
  }

  .page-game-bai__tips-image-wrapper {
    width: 100%;
    max-width: 100%;
    order: -1; /* Image appears before text on mobile */
  }

  .page-game-bai__tip-heading {
    font-size: 1.3em;
  }

  /* 5. Registration tutorial and FAQ blocks - steps grid already handled */
  .page-game-bai__step-number {
    top: -10px;
    width: 35px;
    height: 35px;
    font-size: 1.3em;
  }

  .page-game-bai__step-title {
    margin-top: 15px;
    font-size: 1.2em;
  }

  .page-game-bai__conclusion-content {
    padding: 30px 15px;
  }
}

@media (max-width: 480px) {
  .page-game-bai__main-title {
    font-size: 1.8em;
  }

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

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