.page-game-bai {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light body background */
  background-color: #F5F7FA; /* Background color from custom palette */
}

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

.page-game-bai__section-title {
  font-size: 2.5em;
  font-weight: bold;
  color: #E53935;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-game-bai__section-title--light {
  color: #ffffff;
}

.page-game-bai__text-block {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 15px;
  text-align: justify;
  color: #333333;
}

.page-game-bai__text-block--light {
  color: #f0f0f0;
}

.page-game-bai__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px; /* Small top padding, relies on body padding-top from shared.css */
  padding-bottom: 40px;
  background-color: #E53935;
  overflow: hidden;
}

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

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

.page-game-bai__hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px;
  max-width: 900px;
  margin-top: 20px;
}

.page-game-bai__main-title {
  color: #ffffff;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 15px;
  /* clamp(min, preferred, max) for responsive font-size */
  font-size: clamp(2.2em, 4vw, 3.5em);
}

.page-game-bai__hero-description {
  color: #f0f0f0;
  font-size: 1.2em;
  line-height: 1.6;
  margin-bottom: 30px;
}

.page-game-bai__hero-cta-buttons,
.page-game-bai__final-cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

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

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

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

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

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

.page-game-bai__btn-tertiary {
  background-color: #E53935;
  color: #ffffff;
  border: none;
  padding: 8px 15px;
  font-size: 0.9em;
}

.page-game-bai__btn-tertiary:hover {
  opacity: 0.9;
}

.page-game-bai__btn-read-more {
  background-color: #E0E0E0;
  color: #333333;
  border: none;
  padding: 8px 15px;
  font-size: 0.9em;
}

.page-game-bai__btn-read-more:hover {
  background-color: #cccccc;
}

.page-game-bai__btn-link {
  color: #E53935;
  text-decoration: underline;
  font-weight: bold;
  display: block;
  margin-top: 10px;
  text-align: left;
}

.page-game-bai__btn-link:hover {
  color: #FF5A4F;
}

.page-game-bai__intro-section {
  padding: 40px 20px;
  text-align: center;
}

.page-game-bai__games-showcase-section {
  background-color: #E53935; /* Brand primary color for dark background */
  padding: 60px 20px;
}

.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 {
  background-color: #FFFFFF; /* Card background color */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-game-bai__game-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-game-bai__game-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.page-game-bai__game-card-description {
  font-size: 1em;
  line-height: 1.5;
  color: #333333;
  margin-bottom: 20px;
}

.page-game-bai__guide-box {
  padding: 40px 20px;
  background-color: #F5F7FA; /* Background color from custom palette */
  text-align: center;
}

.page-game-bai__guide-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  align-items: flex-start; /* Align items to the start to allow padding-top to work */
}

.page-game-bai__guide-card {
  flex: 0 0 calc(20% - 8px);
  max-width: calc(20% - 8px);
  text-align: center;
  text-decoration: none;
  color: #333333;
  transition: transform 0.3s ease;
  display: block;
}

.page-game-bai__guide-card:hover {
  transform: translateY(-5px);
}

.page-game-bai__guide-card img {
  aspect-ratio: 250 / 350;
  object-fit: contain;
  width: 100%;
  height: auto;
  display: block;
}

/* Specific padding for guide cards for the 'five benefits' staggered effect */
.page-game-bai__guide-card--pos-1, .page-game-bai__guide-card--pos-5 {
  padding-top: 50px;
}

.page-game-bai__guide-card--pos-2, .page-game-bai__guide-card--pos-4 {
  padding-top: 25px;
}

.page-game-bai__content-section {
  padding: 40px 20px;
  text-align: center;
}

.page-game-bai__home-content-box {
  max-width: 91%;
  margin: 40px auto 0;
  padding: 10px 16px;
  border: 5px solid #E53935;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(229, 57, 53, 0.4);
  height: 700px; /* Fixed height for desktop */
  text-align: left;
  background-color: #FFFFFF;
  color: #333333;
}

.page-game-bai__home-content-inner {
  height: 100%;
  overflow-y: auto; /* Scrollable content for desktop */
  padding-right: 10px; /* Space for scrollbar */
}

.page-game-bai__home-content-inner::-webkit-scrollbar {
  width: 8px;
}

.page-game-bai__home-content-inner::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.page-game-bai__home-content-inner::-webkit-scrollbar-thumb {
  background: #E53935;
  border-radius: 10px;
}

.page-game-bai__home-content-inner::-webkit-scrollbar-thumb:hover {
  background: #FF5A4F;
}

.page-game-bai__content-subtitle {
  font-size: 1.8em;
  font-weight: bold;
  color: #E53935;
  margin-top: 25px;
  margin-bottom: 15px;
}

.page-game-bai__content-section ul,
.page-game-bai__content-section ol {
  margin-left: 25px;
  margin-bottom: 15px;
  text-align: left;
  color: #333333;
}

.page-game-bai__content-section li {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 8px;
}

.page-game-bai__app-download-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}

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

.page-game-bai__final-cta-buttons {
  margin-top: 40px;
}

.page-game-bai__blog-section {
  padding: 60px 20px;
  text-align: center;
}

.page-game-bai__blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.page-game-bai__blog-card {
  background-color: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-game-bai__blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-game-bai__blog-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

.page-game-bai__blog-card-title {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-game-bai__blog-card-title a {
  color: #E53935;
  text-decoration: none;
}

.page-game-bai__blog-card-title a:hover {
  color: #FF5A4F;
}

.page-game-bai__blog-card-meta {
  font-size: 0.9em;
  color: #777777;
  margin-bottom: 10px;
}

.page-game-bai__blog-card-excerpt {
  font-size: 1em;
  line-height: 1.5;
  color: #333333;
  margin-bottom: 20px;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-bai__hero-content {
    padding: 15px;
  }

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

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

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

  .page-game-bai__guide-card {
    flex: 0 0 calc(33.333% - 8px);
    max-width: calc(33.333% - 8px);
  }

  .page-game-bai__guide-card--pos-1, .page-game-bai__guide-card--pos-5 {
    padding-top: 0;
  }
  
  .page-game-bai__guide-card--pos-2, .page-game-bai__guide-card--pos-4 {
    padding-top: 0;
  }

  .page-game-bai__home-content-box {
    height: 600px;
  }

  .page-game-bai__blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

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

  .page-game-bai__container,
  .page-game-bai__hero-section,
  .page-game-bai__intro-section,
  .page-game-bai__games-showcase-section,
  .page-game-bai__guide-box,
  .page-game-bai__content-section,
  .page-game-bai__blog-section {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Hero Section */
  .page-game-bai__hero-section {
    padding-top: 10px !important;
    padding-bottom: 20px;
  }

  .page-game-bai__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
  }

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

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

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

  /* Game Showcase Grid */
  .page-game-bai__games-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  /* Guide Box - Five Vertical Cards */
  .page-game-bai__guide-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Temporary grid to place items */
    gap: 10px;
    padding-top: 0 !important; /* Reset staggered padding */
  }

  .page-game-bai__guide-card {
    padding-top: 0 !important; /* Ensure no top padding on mobile */
    flex: auto; /* Allow grid to manage sizing */
    max-width: 100%; /* Reset max-width for grid control */
  }

  .page-game-bai__guide-card--pos-1, .page-game-bai__guide-card--pos-2 {
    grid-column: span 3; /* Two cards on top, each spanning 3 of 6 columns */
  }
  .page-game-bai__guide-card--pos-3, .page-game-bai__guide-card--pos-4, .page-game-bai__guide-card--pos-5 {
    grid-column: span 2; /* Three cards below, each spanning 2 of 6 columns */
  }

  /* Home Content Box */
  .page-game-bai__home-content-box {
    max-width: 100% !important;
    height: auto !important; /* Auto height for mobile */
    overflow: visible !important; /* Content fully visible */
    padding: 15px !important;
    margin-top: 20px;
  }

  .page-game-bai__home-content-inner {
    height: auto !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }

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

  .page-game-bai__content-section ul,
  .page-game-bai__content-section ol {
    margin-left: 20px;
  }

  /* App Download CTA */
  .page-game-bai__app-image {
    max-width: 100%;
  }

  /* Blog Section */
  .page-game-bai__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-bai__blog-card-image {
    height: 150px;
  }

  .page-game-bai__blog-card-title {
    font-size: 1.2em;
  }

  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
}