/* Base styles for the Game Bài page */
.page-game-bai {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Dark text on light body background */
  line-height: 1.6;
}

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

.page-game-bai__section-title {
  font-size: 36px;
  font-weight: 700;
  color: #017439;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-game-bai__section-title--white {
  color: #FFFFFF;
}

.page-game-bai__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #333333;
}

.page-game-bai__section-description--white {
  color: #f0f0f0;
}

/* Buttons */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary,
.page-game-bai__card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-game-bai__btn-primary {
  background-color: #C30808; /* Custom red for register/login */
  color: #FFFF00; /* Custom yellow for register/login text */
  border: 2px solid #C30808;
}

.page-game-bai__btn-primary:hover {
  background-color: #e00b0b;
  border-color: #e00b0b;
  transform: translateY(-2px);
}

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

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

.page-game-bai__card-btn {
  background-color: #017439;
  color: #FFFFFF;
  border: none;
  padding: 10px 20px;
  font-size: 15px;
  border-radius: 5px;
}

.page-game-bai__card-btn:hover {
  background-color: #005a2d;
  transform: translateY(-1px);
}

/* Image styles */
.page-game-bai img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* 1. Hero Section */
.page-game-bai__hero-section {
  padding: 10px 0 60px;
  background-color: #FFFFFF;
}

.page-game-bai__hero-container {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-game-bai__hero-image-wrapper {
  flex: 1;
  max-width: 55%;
}

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

.page-game-bai__hero-content {
  flex: 1;
  max-width: 45%;
}

.page-game-bai__main-title {
  font-size: 48px;
  font-weight: 800;
  color: #017439;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-game-bai__description {
  font-size: 18px;
  color: #555;
  margin-bottom: 30px;
}

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

/* 2. Featured Games Section */
.page-game-bai__featured-games {
  padding: 60px 0;
  background-color: #f9f9f9;
}

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

.page-game-bai__game-card {
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
}

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

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

.page-game-bai__card-title a {
  color: #017439;
  text-decoration: none;
}

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

.page-game-bai__card-text {
  font-size: 15px;
  color: #666;
  margin-bottom: 20px;
  flex-grow: 1;
  padding: 0 15px;
}

.page-game-bai__view-all-games {
  text-align: center;
}

/* 3. Why Choose Section */
.page-game-bai__why-choose {
  padding: 80px 0;
  background-color: #017439;
}

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

.page-game-bai__feature-item {
  text-align: center;
  color: #FFFFFF;
}

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

.page-game-bai__feature-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #FFFFFF;
}

.page-game-bai__feature-text {
  font-size: 16px;
  line-height: 1.5;
  color: #f0f0f0;
}

/* 4. How to Play Section */
.page-game-bai__how-to-play {
  padding: 60px 0;
  background-color: #FFFFFF;
}

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

.page-game-bai__step-item {
  text-align: center;
  padding: 20px;
  background: #f0fdf5;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.page-game-bai__step-number {
  width: 60px;
  height: 60px;
  background-color: #017439;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 20px;
}

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

.page-game-bai__step-title a {
  color: #017439;
  text-decoration: none;
}

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

.page-game-bai__step-text {
  font-size: 15px;
  color: #666;
}

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

/* 5. Tips Section */
.page-game-bai__tips-section {
  padding: 60px 0;
  background-color: #f9f9f9;
}

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

.page-game-bai__tip-card {
  background: #FFFFFF;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-game-bai__tip-title {
  font-size: 22px;
  font-weight: 700;
  color: #017439;
  margin-bottom: 15px;
}

.page-game-bai__tip-text {
  font-size: 16px;
  color: #555;
}

/* 6. Promotions Section */
.page-game-bai__promotions-section {
  padding: 80px 0;
  background-color: #017439;
}

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

.page-game-bai__promo-card {
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.page-game-bai__promo-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  margin-bottom: 15px;
}

.page-game-bai__promo-title {
  font-size: 22px;
  font-weight: 700;
  color: #017439;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-game-bai__promo-title a {
  color: #017439;
  text-decoration: none;
}

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

.page-game-bai__promo-text {
  font-size: 15px;
  color: #666;
  margin-bottom: 20px;
  flex-grow: 1;
  padding: 0 15px;
}

.page-game-bai__view-all-promos {
  text-align: center;
}

/* 7. FAQ Section */
details.page-game-bai__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
details.page-game-bai__faq-item summary.page-game-bai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-game-bai__faq-item summary.page-game-bai__faq-question::-webkit-details-marker {
  display: none;
}
details.page-game-bai__faq-item summary.page-game-bai__faq-question:hover {
  background: #f5f5f5;
}
.page-game-bai__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}
.page-game-bai__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-game-bai__faq-item .page-game-bai__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555;
}

/* Media Queries for Responsiveness */

/* Tablet and Mobile */
@media (max-width: 1024px) {
  .page-game-bai__main-title {
    font-size: 40px;
  }

  .page-game-bai__section-title {
    font-size: 30px;
  }

  .page-game-bai__hero-section .page-game-bai__container {
    flex-direction: column;
    text-align: center;
  }

  .page-game-bai__hero-image-wrapper,
  .page-game-bai__hero-content {
    max-width: 100%;
    width: 100%;
  }

  .page-game-bai__hero-content {
    margin-top: 30px;
  }

  .page-game-bai__cta-buttons {
    justify-content: center;
  }

  .page-game-bai__game-grid,
  .page-game-bai__features-grid,
  .page-game-bai__steps-grid,
  .page-game-bai__tips-content,
  .page-game-bai__promo-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

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

/* Mobile Specific */
@media (max-width: 768px) {
  /* 1. Top Section - Hero */
  .page-game-bai__hero-section {
    padding: 10px 0 40px;
  }

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

  .page-game-bai__description {
    font-size: 16px;
    margin-bottom: 25px;
  }

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

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

  /* 2. Landing Page Dual Column Modules (simulated for general layout) */
  .page-game-bai__game-grid,
  .page-game-bai__features-grid,
  .page-game-bai__steps-grid,
  .page-game-bai__tips-content,
  .page-game-bai__promo-grid {
    grid-template-columns: 1fr; /* Single column stacking */
    gap: 20px;
  }

  /* General Images and Containers */
  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-game-bai__container,
  .page-game-bai__hero-section,
  .page-game-bai__featured-games,
  .page-game-bai__why-choose,
  .page-game-bai__how-to-play,
  .page-game-bai__tips-section,
  .page-game-bai__promotions-section,
  .page-game-bai__faq-section,
  .page-game-bai__game-card,
  .page-game-bai__feature-item,
  .page-game-bai__step-item,
  .page-game-bai__tip-card,
  .page-game-bai__promo-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Buttons */
  .page-game-bai__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }

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

  .page-game-bai__card-btn {
    padding: 10px 15px;
    font-size: 14px;
  }

  /* FAQ */
  details.page-game-bai__faq-item summary.page-game-bai__faq-question {
    padding: 15px;
  }
  .page-game-bai__faq-qtext {
    font-size: 15px;
  }
  details.page-game-bai__faq-item .page-game-bai__faq-answer {
    padding: 0 15px 15px;
  }

  /* Specific Section paddings */
  .page-game-bai__featured-games,
  .page-game-bai__how-to-play,
  .page-game-bai__tips-section {
    padding: 40px 0;
  }

  .page-game-bai__why-choose,
  .page-game-bai__promotions-section {
    padding: 60px 0;
  }

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

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