/* style/game-bai.css */
:root {
  --page-game-bai-primary-color: #113B7A;
  --page-game-bai-secondary-color: #1D5FD1;
  --page-game-bai-text-main: #F3F8FF;
  --page-game-bai-text-secondary: #AFC4E8;
  --page-game-bai-card-bg: #10233F;
  --page-game-bai-border-color: #244D84;
  --page-game-bai-glow-color: #4FA8FF;
  --page-game-bai-gold-color: #F2C14E;
  --page-game-bai-divider-color: #1B3357;
  --page-game-bai-deep-navy: #08162B;
  --page-game-bai-button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
}

.page-game-bai {
  color: var(--page-game-bai-text-main);
  background-color: var(--page-game-bai-deep-navy); /* Fallback if body background is not inherited */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

.page-game-bai__section-title {
  font-size: clamp(2em, 4vw, 2.8em);
  font-weight: 700;
  color: var(--page-game-bai-gold-color);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-game-bai__section-description {
  font-size: 1.1em;
  color: var(--page-game-bai-text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* Hero Section */
.page-game-bai__hero-section {
  padding-top: 10px; /* Adhering to the ~10px top spacing rule for non-header-offset sections */
  padding-bottom: 60px;
  background: var(--page-game-bai-deep-navy);
  position: relative;
  overflow: hidden;
}

.page-game-bai__hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 15px;
}

.page-game-bai__hero-content {
  flex: 1 1 45%;
  min-width: 300px;
  color: var(--page-game-bai-text-main);
}

.page-game-bai__hero-title {
  font-size: clamp(2.5em, 5vw, 3.8em);
  font-weight: 900;
  color: var(--page-game-bai-gold-color);
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
}

.page-game-bai__hero-description {
  font-size: 1.2em;
  color: var(--page-game-bai-text-secondary);
  margin-bottom: 30px;
}

.page-game-bai__hero-cta-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.page-game-bai__hero-image {
  flex: 1 1 45%;
  min-width: 300px;
  text-align: center;
}

.page-game-bai__hero-main-image {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 2px solid var(--page-game-bai-gold-color);
}

/* Buttons */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-bai__btn-primary {
  background: var(--page-game-bai-button-gradient);
  color: var(--page-game-bai-text-main);
  border: 2px solid var(--page-game-bai-glow-color);
  box-shadow: 0 5px 15px rgba(43, 115, 246, 0.4);
}

.page-game-bai__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(43, 115, 246, 0.6);
}

.page-game-bai__btn-secondary {
  background: transparent;
  color: var(--page-game-bai-glow-color);
  border: 2px solid var(--page-game-bai-glow-color);
  box-shadow: 0 5px 15px rgba(79, 168, 255, 0.2);
}

.page-game-bai__btn-secondary:hover {
  background: var(--page-game-bai-glow-color);
  color: var(--page-game-bai-deep-navy);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79, 168, 255, 0.4);
}

/* Intro Section (Features) */
.page-game-bai__intro-section {
  padding: 80px 0;
  background: var(--page-game-bai-card-bg);
}

.page-game-bai__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  text-align: center;
}

.page-game-bai__feature-item {
  background: var(--page-game-bai-deep-navy);
  border: 1px solid var(--page-game-bai-border-color);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.page-game-bai__feature-item:hover {
  transform: translateY(-10px);
}

.page-game-bai__icon-box-media {
  width: 200px;
  height: 200px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--page-game-bai-gold-color);
  box-shadow: 0 0 15px rgba(242, 193, 78, 0.6);
}

.page-game-bai__icon-box-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%; /* Ensure circular shape for image itself */
}

.page-game-bai__feature-title {
  font-size: 1.8em;
  color: var(--page-game-bai-gold-color);
  margin-bottom: 15px;
}

.page-game-bai__feature-text {
  font-size: 1em;
  color: var(--page-game-bai-text-secondary);
}

/* Game Tabs Section */
.page-game-bai__game-tabs-section {
  padding: 80px 0;
  background: var(--page-game-bai-deep-navy);
}

.page-game-bai__tab-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
  border-bottom: 2px solid var(--page-game-bai-divider-color);
  padding-bottom: 15px;
}

.page-game-bai__tab-button {
  background: transparent;
  border: 2px solid var(--page-game-bai-border-color);
  color: var(--page-game-bai-text-secondary);
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 1.05em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-bai__tab-button:hover,
.page-game-bai__tab-button.is-active {
  background: var(--page-game-bai-button-gradient);
  color: var(--page-game-bai-text-main);
  border-color: var(--page-game-bai-glow-color);
  box-shadow: 0 0 10px rgba(43, 115, 246, 0.5);
}

.page-game-bai__tab-content {
  position: relative;
  min-height: 400px; /* Ensure space for content */
}

.page-game-bai__game-panel {
  display: none;
  animation: fadeIn 0.5s ease-out forwards;
}

.page-game-bai__game-panel.is-active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-game-bai__game-card {
  background: var(--page-game-bai-card-bg);
  border: 1px solid var(--page-game-bai-border-color);
  border-radius: 15px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.page-game-bai__game-image {
  max-width: 800px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 25px;
  border: 1px solid var(--page-game-bai-glow-color);
}

.page-game-bai__game-title {
  font-size: 2em;
  color: var(--page-game-bai-gold-color);
  margin-bottom: 15px;
}

.page-game-bai__game-description {
  font-size: 1.1em;
  color: var(--page-game-bai-text-secondary);
  margin-bottom: 30px;
  max-width: 700px;
}

/* Guide Section */
.page-game-bai__guide-section {
  padding: 80px 0;
  background: var(--page-game-bai-deep-navy);
}

.page-game-bai__guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}

.page-game-bai__guide-item {
  background: var(--page-game-bai-card-bg);
  border: 1px solid var(--page-game-bai-border-color);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.page-game-bai__guide-media {
  margin-bottom: 25px;
}

.page-game-bai__guide-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--page-game-bai-glow-color);
}

.page-game-bai__guide-title {
  font-size: 1.8em;
  color: var(--page-game-bai-gold-color);
  margin-bottom: 15px;
}

.page-game-bai__guide-text {
  font-size: 1em;
  color: var(--page-game-bai-text-secondary);
}

/* FAQ Section */
.page-game-bai__faq-section {
  padding: 80px 0;
  background: var(--page-game-bai-card-bg);
}

.page-game-bai__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-game-bai__faq-item {
  background: var(--page-game-bai-deep-navy);
  border: 1px solid var(--page-game-bai-border-color);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.page-game-bai__faq-item[open] {
  box-shadow: 0 0 20px rgba(43, 115, 246, 0.3);
}

.page-game-bai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: 600;
  color: var(--page-game-bai-text-main);
  cursor: pointer;
  background: var(--page-game-bai-primary-color);
  border-bottom: 1px solid var(--page-game-bai-divider-color);
  list-style: none; /* Hide default details marker */
  user-select: none;
}

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

.page-game-bai__faq-qtext {
  flex-grow: 1;
}

.page-game-bai__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--page-game-bai-gold-color);
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
  color: var(--page-game-bai-gold-color);
}

.page-game-bai__faq-answer {
  padding: 20px 25px;
  font-size: 1.05em;
  color: var(--page-game-bai-text-secondary);
  background: var(--page-game-bai-card-bg);
  border-top: 1px solid var(--page-game-bai-divider-color);
}

/* CTA Bottom Section */
.page-game-bai__cta-bottom-section {
  padding: 80px 0;
  background: var(--page-game-bai-deep-navy);
  text-align: center;
}

.page-game-bai__bottom-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 40px;
}

/* General Image & Container Responsive */
.page-game-bai img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-game-bai__section,
.page-game-bai__card,
.page-game-bai__container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Media Queries */
@media (max-width: 1024px) {
  .page-game-bai__hero-container {
    flex-direction: column;
    text-align: center;
  }

  .page-game-bai__hero-content {
    order: 2;
  }

  .page-game-bai__hero-image {
    order: 1;
    margin-bottom: 30px;
  }

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

@media (max-width: 768px) {
  /* HERO Section */
  .page-game-bai__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px !important;
  }
  .page-game-bai__hero-container {
    padding: 20px 15px !important;
    gap: 20px !important;
  }
  .page-game-bai__hero-title {
    font-size: 2.2em !important;
  }
  .page-game-bai__hero-description {
    font-size: 1em !important;
  }
  .page-game-bai__hero-cta-buttons {
    flex-direction: column !important;
    gap: 15px !important;
  }
  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px !important;
    font-size: 1em !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Intro Section (Features) */
  .page-game-bai__intro-section {
    padding: 50px 0 !important;
  }
  .page-game-bai__section-title {
    font-size: 2em !important;
  }
  .page-game-bai__section-description {
    font-size: 0.9em !important;
    margin-bottom: 30px !important;
  }
  .page-game-bai__features-grid {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }
  .page-game-bai__icon-box-media {
    width: 160px !important;
    height: 160px !important;
    margin-bottom: 15px !important;
  }
  .page-game-bai__feature-title {
    font-size: 1.5em !important;
  }
  .page-game-bai__feature-text {
    font-size: 0.95em !important;
  }

  /* Game Tabs Section */
  .page-game-bai__game-tabs-section {
    padding: 50px 0 !important;
  }
  .page-game-bai__tab-nav {
    flex-direction: column !important;
    gap: 10px !important;
    padding-bottom: 10px !important;
  }
  .page-game-bai__tab-button {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 0.95em !important;
    padding: 10px 15px !important;
  }
  .page-game-bai__game-card {
    padding: 20px !important;
  }
  .page-game-bai__game-title {
    font-size: 1.8em !important;
  }
  .page-game-bai__game-description {
    font-size: 0.95em !important;
  }

  /* Guide Section */
  .page-game-bai__guide-section {
    padding: 50px 0 !important;
  }
  .page-game-bai__guide-steps {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  .page-game-bai__guide-item {
    padding: 20px !important;
  }
  .page-game-bai__guide-title {
    font-size: 1.5em !important;
  }
  .page-game-bai__guide-text {
    font-size: 0.95em !important;
  }

  /* FAQ Section */
  .page-game-bai__faq-section {
    padding: 50px 0 !important;
  }
  .page-game-bai__faq-question {
    padding: 15px 20px !important;
    font-size: 1.1em !important;
  }
  .page-game-bai__faq-toggle {
    font-size: 1.2em !important;
  }
  .page-game-bai__faq-answer {
    padding: 15px 20px !important;
    font-size: 0.95em !important;
  }

  /* CTA Bottom Section */
  .page-game-bai__cta-bottom-section {
    padding: 50px 0 !important;
  }
  .page-game-bai__bottom-cta-buttons {
    flex-direction: column !important;
    gap: 15px !important;
  }

  /* General Image & Container Responsive (for content area images) */
  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-game-bai__section,
  .page-game-bai__card,
  .page-game-bai__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}