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

.page-game-bai__section {
  padding: 40px 0;
  background-color: #F5F7FA;
}

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

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

.page-game-bai__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 30px;
  color: #E53935; /* Main brand color for titles */
  line-height: 1.2;
}

.page-game-bai__dark-section .page-game-bai__section-title {
  color: #ffffff; /* White title for dark section */
}

.page-game-bai p {
  margin-bottom: 1em;
  font-size: 1em;
}

.page-game-bai a {
  color: #E53935; /* Link color */
  text-decoration: none;
}

.page-game-bai a:hover {
  text-decoration: underline;
}

/* Hero Section */
.page-game-bai__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding */
  padding-bottom: 50px;
  text-align: center;
  overflow: hidden; /* Ensure content doesn't overflow */
}

.page-game-bai__hero-image-wrap {
  position: relative;
  width: 100%;
  height: auto;
  margin-bottom: 30px;
}

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

.page-game-bai__hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.page-game-bai__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive font size */
  font-weight: 900;
  color: #E53935; /* Main brand color */
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-game-bai__description {
  font-size: 1.15em;
  margin-bottom: 30px;
  color: #333333;
}

.page-game-bai__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-game-bai__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure button doesn't overflow */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-game-bai__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(229, 57, 53, 0.3);
}

.page-game-bai__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.4);
}

.page-game-bai__btn-secondary {
  background-color: #ffffff;
  color: #E53935;
  border: 2px solid #E53935;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-game-bai__btn-secondary:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.page-game-bai__btn-small {
  padding: 8px 18px;
  font-size: 0.95em;
  border-radius: 6px;
}

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

.page-game-bai__dark-section .page-game-bai__btn-outline {
  color: #ffffff;
  border-color: #ffffff;
}

.page-game-bai__btn-outline:hover {
  background-color: #E53935;
  color: #ffffff;
}

.page-game-bai__dark-section .page-game-bai__btn-outline:hover {
  background-color: #ffffff;
  color: #E53935;
}

/* Article Content */
.page-game-bai__figure {
  margin: 30px auto;
  text-align: center;
  max-width: 100%;
}

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

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

/* Game List Section */
.page-game-bai__game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.page-game-bai__game-card {
  background-color: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-game-bai__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

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

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

.page-game-bai__game-card-desc {
  font-size: 0.95em;
  color: #555555;
  flex-grow: 1; /* Make description take available space */
  margin-bottom: 20px;
}

/* Download & Register Section */
.page-game-bai__step-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.page-game-bai__step-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.page-game-bai__step-card-title {
  font-size: 1.6em;
  font-weight: 700;
  color: #E53935;
  margin-bottom: 20px;
}

.page-game-bai__step-list {
  list-style-type: decimal;
  padding-left: 20px;
  margin-bottom: 25px;
  flex-grow: 1;
}

.page-game-bai__step-list li {
  margin-bottom: 10px;
  color: #333333;
}

.page-game-bai__step-card .page-game-bai__btn {
  margin-top: auto; /* Push button to the bottom */
  width: fit-content;
  align-self: center;
}

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

.page-game-bai__promo-card {
  background-color: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-game-bai__promo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

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

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

.page-game-bai__promo-card-desc {
  font-size: 0.95em;
  color: #555555;
  flex-grow: 1;
  margin-bottom: 20px;
}

.page-game-bai__text-center {
  text-align: center;
  margin-top: 30px;
  font-size: 1.1em;
}

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

.page-game-bai__feature-item {
  background-color: #FFFFFF;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-bai__feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

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

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

.page-game-bai__faq-item {
  background-color: #ffffff;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

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


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

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .page-game-bai__article-wrap {
    padding: 0 25px;
  }

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

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

  .page-game-bai__description {
    font-size: 1.05em;
  }

  .page-game-bai__game-cards,
  .page-game-bai__step-cards,
  .page-game-bai__promo-cards,
  .page-game-bai__feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }
}

/* Mobile (max-width: 768px) - Mandatory blocks */
@media (max-width: 768px) {
  /* 1. Top section (H1 + CTA) padding/spacing/stacking */
  .page-game-bai__hero-section {
    padding-top: 10px !important; /* Small top padding */
    padding-bottom: 30px;
  }

  .page-game-bai__hero-content {
    padding: 0 15px;
  }

  .page-game-bai__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em) !important; /* Ensure H1 font size is not too large */
    margin-bottom: 10px;
  }

  .page-game-bai__description {
    font-size: 1em !important;
    margin-bottom: 20px;
  }

  .page-game-bai__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    padding: 0 15px; /* Add padding to container */
  }

  /* 2. Single column long-form container */
  .page-game-bai__article-wrap {
    padding: 0 15px !important; /* Mandatory padding for content container */
  }

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

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

  .page-game-bai p,
  .page-game-bai li {
    font-size: 0.95em !important;
  }

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

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

  .page-game-bai__figure img {
    min-width: 200px; /* Ensure minimum size */
    min-height: 200px; /* Ensure minimum size */
  }

  .page-game-bai__game-card-img,
  .page-game-bai__promo-card-img {
     /* Adjust height for mobile cards */
    min-width: 200px; /* Ensure minimum size */
    min- /* Ensure minimum size */
  }

  .page-game-bai__section,
  .page-game-bai__card,
  .page-game-bai__container,
  .page-game-bai__game-card,
  .page-game-bai__step-card,
  .page-game-bai__promo-card,
  .page-game-bai__feature-item,
  .page-game-bai__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 4. Buttons and button containers */
  .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;
    padding-right: 15px;
  }

  .page-game-bai__cta-buttons,
  .page-game-bai__button-group,
  .page-game-bai__btn-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;
  }

  .page-game-bai__game-cards,
  .page-game-bai__step-cards,
  .page-game-bai__promo-cards,
  .page-game-bai__feature-grid {
    grid-template-columns: 1fr; /* Single column layout for cards */
    gap: 20px;
    padding: 0 15px; /* Ensure padding for grid containers */
  }

  /* 5. Registration tutorial and FAQ blocks */
  .page-game-bai__step-card-title {
    font-size: 1.4em !important;
  }

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

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

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

  /* Ensure content area doesn't cause horizontal scroll */
  .page-game-bai {
    overflow-x: hidden;
  }
}