:root {
  --ball88-primary-color: #FF8C1A;
  --ball88-secondary-color: #FFA53A;
  --ball88-card-bg: #17191F;
  --ball88-background: #0D0E12;
  --ball88-text-main: #FFF3E6;
  --ball88-border: #A84F0C;
  --ball88-glow: #FFB04D;
  --ball88-deep-orange: #D96800;
}

.page-game-bai {
  font-family: 'Arial', sans-serif;
  color: var(--ball88-text-main);
  background: var(--ball88-background);
  line-height: 1.6;
}

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

.page-game-bai__section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--ball88-primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-game-bai__section-description {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--ball88-text-main);
}

.page-game-bai__text-block {
  font-size: 16px;
  max-width: 900px;
  margin: 20px auto;
  text-align: left;
  color: var(--ball88-text-main);
}

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

/* Buttons */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary,
.page-game-bai__btn-play {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  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, var(--ball88-secondary-color) 0%, var(--ball88-deep-orange) 100%);
  color: var(--ball88-text-main);
  border: none;
  box-shadow: 0 4px 15px rgba(255, 140, 26, 0.4);
}

.page-game-bai__btn-primary:hover {
  background: linear-gradient(180deg, var(--ball88-deep-orange) 0%, var(--ball88-secondary-color) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 140, 26, 0.6);
}

.page-game-bai__btn-secondary {
  background: transparent;
  color: var(--ball88-primary-color);
  border: 2px solid var(--ball88-primary-color);
}

.page-game-bai__btn-secondary:hover {
  background: var(--ball88-primary-color);
  color: var(--ball88-text-main);
  transform: translateY(-2px);
}

.page-game-bai__btn-play {
  background: var(--ball88-primary-color);
  color: var(--ball88-text-main);
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
}

.page-game-bai__btn-play:hover {
  background: var(--ball88-secondary-color);
  transform: translateY(-1px);
}

.page-game-bai__cta-buttons {
  display: flex;
  gap: 20px;
  margin-top: 40px;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-game-bai__cta-buttons--center {
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-game-bai__hero-section {
  position: relative;
  padding-top: 10px; /* Small padding, body handles header offset */
  color: var(--ball88-text-main);
  overflow: hidden;
}

.page-game-bai__hero-image-wrapper {
  width: 100%;
  height: 600px; /* Adjust as needed */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

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

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

.page-game-bai__hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--ball88-primary-color);
}

.page-game-bai__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: var(--ball88-text-main);
}

/* Intro Section */
.page-game-bai__intro-section {
  background: var(--ball88-background);
}

/* Game Categories Section */
.page-game-bai__dark-section {
  background: var(--ball88-card-bg);
}

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

.page-game-bai__game-card {
  background: var(--ball88-background);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  text-align: center;
  padding-bottom: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--ball88-border);
}

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

.page-game-bai__game-card-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ball88-secondary-color);
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-game-bai__game-card-description {
  font-size: 15px;
  color: var(--ball88-text-main);
  margin-bottom: 20px;
  padding: 0 15px;
  flex-grow: 1;
}

/* Why Choose Us Section */
.page-game-bai__feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  list-style: none;
  padding: 0;
  margin-top: 40px;
}

.page-game-bai__feature-item {
  background: var(--ball88-card-bg);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 1px solid var(--ball88-border);
}

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

.page-game-bai__feature-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ball88-secondary-color);
  margin-bottom: 15px;
}

.page-game-bai__feature-item p {
  font-size: 15px;
  color: var(--ball88-text-main);
}

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

.page-game-bai__step-item {
  background: var(--ball88-background);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 1px solid var(--ball88-border);
}

.page-game-bai__step-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-game-bai__step-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ball88-secondary-color);
  margin-bottom: 15px;
}

.page-game-bai__step-item p {
  font-size: 15px;
  color: var(--ball88-text-main);
}

/* Tips & Strategies Section */
.page-game-bai__strategy-list {
  list-style: none;
  padding: 0;
  max-width: 900px;
  margin: 40px auto;
  text-align: left;
}

.page-game-bai__strategy-list li {
  background: var(--ball88-card-bg);
  border-left: 5px solid var(--ball88-primary-color);
  padding: 20px 25px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  font-size: 16px;
  color: var(--ball88-text-main);
}

.page-game-bai__strategy-list li strong {
  color: var(--ball88-secondary-color);
}

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

.page-game-bai__promo-card {
  background: var(--ball88-background);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  text-align: center;
  padding-bottom: 25px;
  border: 1px solid var(--ball88-border);
}

.page-game-bai__promo-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  margin-bottom: 15px;
  display: block;
}

.page-game-bai__promo-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ball88-secondary-color);
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-game-bai__promo-text {
  font-size: 15px;
  color: var(--ball88-text-main);
  margin-bottom: 20px;
  padding: 0 15px;
}

/* Mobile App Section */
.page-game-bai__mobile-app-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  text-align: left;
}

.page-game-bai__mobile-text {
  flex: 1;
  max-width: 600px;
}

.page-game-bai__mobile-image-wrapper {
  flex-shrink: 0;
  width: 300px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ball88-primary-color), var(--ball88-secondary-color));
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.page-game-bai__mobile-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  display: block;
}

/* FAQ Section */
details.page-game-bai__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--ball88-border);
  overflow: hidden;
  background: var(--ball88-background);
}

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: rgba(var(--ball88-primary-color), 0.1);
}

.page-game-bai__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--ball88-text-main);
}

.page-game-bai__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--ball88-primary-color);
  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: var(--ball88-card-bg);
  border-radius: 0 0 5px 5px;
  color: var(--ball88-text-main);
  text-align: left;
}

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

/* Final CTA Section */
.page-game-bai__cta-final {
  padding-bottom: 80px;
}

/* General image responsiveness */
.page-game-bai img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-bai__hero-title {
    font-size: 42px;
  }

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

  .page-game-bai__games-grid,
  .page-game-bai__feature-list,
  .page-game-bai__steps-grid,
  .page-game-bai__promotion-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .page-game-bai__mobile-app-content {
    flex-direction: column;
    gap: 30px;
  }

  .page-game-bai__mobile-text {
    max-width: 100%;
    text-align: center;
  }

  .page-game-bai__mobile-image-wrapper {
    width: 280px;
    height: 380px;
  }
}

@media (max-width: 768px) {
  .page-game-bai__section {
    padding: 40px 0;
  }

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

  .page-game-bai__hero-image {
    object-fit: contain !important; /* HERO image must use contain on mobile */
    aspect-ratio: unset !important;
  }

  .page-game-bai__hero-content {
    margin-top: 20px;
    padding-bottom: 40px;
  }

  .page-game-bai__hero-title {
    font-size: clamp(28px, 8vw, 36px);
  }

  .page-game-bai__hero-description {
    font-size: 16px;
  }

  .page-game-bai__section-title {
    font-size: clamp(24px, 7vw, 30px);
  }

  .page-game-bai__section-description,
  .page-game-bai__text-block,
  .page-game-bai__strategy-list li,
  .page-game-bai__faq-answer p {
    font-size: 15px;
  }

  .page-game-bai__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary,
  .page-game-bai__btn-play,
  .page-game-bai a[class*="button"],
  .page-game-bai a[class*="btn"] {
    padding: 12px 20px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

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

  .page-game-bai__games-grid {
    grid-template-columns: 1fr;
    padding: 0 15px;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }
  
  .page-game-bai__game-card {
    margin-left: auto;
    margin-right: auto;
  }

  .page-game-bai__feature-list,
  .page-game-bai__steps-grid,
  .page-game-bai__promotion-cards {
    grid-template-columns: 1fr;
    padding: 0 15px;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  .page-game-bai__strategy-list {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  details.page-game-bai__faq-item summary.page-game-bai__faq-question {
    padding: 15px;
  }

  .page-game-bai__faq-qtext {
    font-size: 16px;
  }

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

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

  .page-game-bai__mobile-image-wrapper {
    width: 100%;
    height: auto;
    max-width: 300px;
  }
}