/* Base styles for the Game Bài page */
.page-game-bai {
  font-family: 'Arial', sans-serif;
  color: var(--text-main, #FFF6D6); /* Default text color from custom palette */
  background-color: var(--background, #0A0A0A); /* Default background from custom palette */
  line-height: 1.6;
}

.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: var(--text-main, #FFF6D6);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

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

.page-game-bai__card {
  background-color: var(--card-bg, #111111); /* Card background from custom palette */
  border: 1px solid var(--border, #3A2A12); /* Border from custom palette */
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

.page-game-bai__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient from custom palette */
  color: #111111; /* Darker text for contrast on bright button */
  border: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(242, 193, 78, 0.4);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-game-bai__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  background: transparent;
  color: var(--text-main, #FFF6D6); /* Text color from custom palette */
  border: 2px solid var(--border, #3A2A12); /* Border from custom palette */
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-bai__btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.page-game-bai__center-cta {
  text-align: center;
  margin-top: 40px;
}

/* Hero Section */
.page-game-bai__hero-section {
  padding-top: 10px; /* Small top padding, assuming body handles --header-offset */
  padding-bottom: 40px;
  background-color: var(--background, #0A0A0A);
}

.page-game-bai__hero-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 0 20px;
}

.page-game-bai__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

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

.page-game-bai__hero-text-content {
  text-align: center;
  max-width: 800px;
}

.page-game-bai__hero-title {
  font-size: clamp(2.5em, 4vw, 3.5em); /* Responsive H1 size */
  color: var(--text-main, #FFF6D6);
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 211, 107, 0.5);
}

.page-game-bai__hero-description {
  font-size: 1.2em;
  color: var(--text-main, #FFF6D6);
  margin-bottom: 30px;
}

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

/* Intro Section */
.page-game-bai__intro-section {
  padding: 60px 0;
}

.page-game-bai__dark-section {
  background-color: var(--background, #0A0A0A); /* Dark background from custom palette */
  color: var(--text-main, #FFF6D6); /* Light text for contrast */
}

/* Game Types Section */
.page-game-bai__game-types-section {
  padding: 60px 0;
  background-color: var(--background, #0A0A0A);
}

.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 {
  justify-content: space-between;
}

.page-game-bai__game-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.page-game-bai__game-card-title {
  font-size: 1.5em;
  color: var(--text-main, #FFF6D6);
  margin-bottom: 10px;
}

.page-game-bai__game-card-description {
  font-size: 0.95em;
  color: #ccc;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-game-bai__game-trial-section {
  margin-top: 60px;
  padding: 40px;
  background-color: var(--card-bg, #111111);
  border-radius: 10px;
  border: 1px solid var(--border, #3A2A12);
  text-align: center;
}

.page-game-bai__game-trial-title {
  font-size: 2em;
  color: var(--text-main, #FFF6D6);
  margin-bottom: 20px;
}

.page-game-bai__game-trial-frame {
  border: 1px solid var(--border, #3A2A12);
  border-radius: 8px;
  margin-top: 20px;
}

/* Why Choose Section */
.page-game-bai__why-choose-section {
  padding: 60px 0;
}

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

.page-game-bai__feature-card {
  padding: 30px;
}

.page-game-bai__feature-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
}

.page-game-bai__feature-title {
  font-size: 1.4em;
  color: var(--text-main, #FFF6D6);
  margin-bottom: 10px;
}

.page-game-bai__feature-description {
  font-size: 0.95em;
  color: #ccc;
}

/* How To Play Section */
.page-game-bai__how-to-play-section {
  padding: 60px 0;
  background-color: var(--background, #0A0A0A);
}

.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-card {
  padding: 30px;
}

.page-game-bai__step-icon {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #111111;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 20px;
  box-shadow: 0 0 15px var(--glow, #FFD36B);
}

.page-game-bai__step-title {
  font-size: 1.4em;
  color: var(--text-main, #FFF6D6);
  margin-bottom: 10px;
}

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

.page-game-bai__cta-banner {
  display: flex;
  align-items: center;
  background-color: var(--card-bg, #111111);
  border: 1px solid var(--border, #3A2A12);
  border-radius: 10px;
  margin-top: 60px;
  padding: 30px;
  gap: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-game-bai__cta-banner-image {
  width: 50%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

.page-game-bai__cta-banner-content {
  width: 50%;
  text-align: left;
}

.page-game-bai__cta-banner-title {
  font-size: 2em;
  color: var(--text-main, #FFF6D6);
  margin-bottom: 15px;
}

.page-game-bai__cta-banner-description {
  font-size: 1.1em;
  color: #ccc;
  margin-bottom: 25px;
}

/* Promotions Section */
.page-game-bai__promotions-section {
  padding: 60px 0;
}

.page-game-bai__promotion-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.page-game-bai__promotion-item {
  background-color: var(--card-bg, #111111);
  border: 1px solid var(--border, #3A2A12);
  border-radius: 8px;
  padding: 20px;
  font-size: 1.1em;
  color: var(--text-main, #FFF6D6);
}

.page-game-bai__promotion-item strong {
  color: var(--glow, #FFD36B);
}

/* FAQ Section */
.page-game-bai__faq-section {
  padding: 60px 0;
  background-color: var(--background, #0A0A0A);
}

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

.page-game-bai__faq-item {
  background-color: var(--card-bg, #111111);
  border: 1px solid var(--border, #3A2A12);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-game-bai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-main, #FFF6D6);
  cursor: pointer;
  list-style: none;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none;   /* Safari */
  -khtml-user-select: none;    /* Konqueror HTML */
  -moz-user-select: none;      /* Old versions of Firefox */
  -ms-user-select: none;       /* Internet Explorer/Edge */
  user-select: none;           /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
}

.page-game-bai__faq-question::-webkit-details-marker {
  display: none;
}

.page-game-bai__faq-question::marker {
  display: none;
}

.page-game-bai__faq-toggle {
  font-size: 1.5em;
  color: var(--glow, #FFD36B);
  transition: transform 0.3s ease;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
  transform: rotate(45deg);
}

.page-game-bai__faq-answer {
  padding: 0 20px 20px;
  font-size: 1em;
  color: #ccc;
}

.page-game-bai__faq-answer p {
  margin-bottom: 0;
}

/* Conclusion Section */
.page-game-bai__conclusion-section {
  padding: 60px 0;
}

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

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

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

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

  .page-game-bai__cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .page-game-bai__cta-banner-image,
  .page-game-bai__cta-banner-content {
    width: 100%;
    text-align: center;
  }

  .page-game-bai__cta-banner-title {
    font-size: 1.8em;
  }

  .page-game-bai__promotion-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-game-bai {
    font-size: 15px; /* Adjust base font size for mobile */
    line-height: 1.5;
  }

  .page-game-bai__hero-section {
    padding-top: 10px; /* Consistent small top padding for mobile */
    padding-bottom: 30px;
  }

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

  .page-game-bai__hero-title {
    font-size: clamp(1.8em, 7vw, 2.5em); /* Smaller H1 for mobile */
    margin-bottom: 15px;
  }

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

  .page-game-bai__hero-cta-buttons {
    flex-direction: column; /* Buttons stack vertically */
    gap: 15px;
    padding: 0 15px;
  }

  .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: 12px 15px; /* Adjust padding for mobile buttons */
  }

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

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

  .page-game-bai__game-grid, .page-game-bai__feature-grid, .page-game-bai__steps-grid {
    grid-template-columns: 1fr; /* Single column for cards/features/steps */
    gap: 20px;
  }

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

  .page-game-bai__game-trial-section {
    padding: 20px;
  }

  .page-game-bai__game-trial-title {
    font-size: 1.5em;
  }

  .page-game-bai__game-trial-frame {
    height: 400px; /* Adjust iframe height for mobile */
  }

  .page-game-bai__feature-icon {
    width: 80px;
    height: 80px;
  }

  .page-game-bai__cta-banner {
    padding: 20px 15px;
  }

  .page-game-bai__cta-banner-title {
    font-size: 1.5em;
  }

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

  .page-game-bai__promotion-list {
    gap: 15px;
  }

  .page-game-bai__promotion-item {
    font-size: 1em;
    padding: 15px;
  }

  .page-game-bai__faq-question {
    font-size: 1.1em;
    padding: 15px;
  }

  .page-game-bai__faq-answer {
    padding: 0 15px 15px;
  }

  /* General image and container rules for mobile */
  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }

  .page-game-bai__container,
  .page-game-bai__section,
  .page-game-bai__card,
  .page-game-bai__box,
  .page-game-bai__hero-content-wrapper,
  .page-game-bai__game-grid,
  .page-game-bai__feature-grid,
  .page-game-bai__steps-grid,
  .page-game-bai__cta-banner,
  .page-game-bai__promotion-list,
  .page-game-bai__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}