/* style/game-bai.css */

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

.page-game-bai {
  color: var(--rr99-text-main); /* Body background is dark (#08162B), so text should be light */
  background-color: transparent; /* Rely on shared.css for body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.page-game-bai__content-area {
  max-width: 1170px;
  margin: 0 auto;
  padding: 40px 16px;
  box-sizing: border-box;
}

.page-game-bai__section-title {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--rr99-gold-color);
  text-align: center;
  margin-bottom: 20px;
}

.page-game-bai__section-subtitle {
  font-size: 1.8em;
  font-weight: bold;
  color: var(--rr99-gold-color);
  text-align: center;
  margin-top: 30px;
  margin-bottom: 20px;
}

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

.page-game-bai__text-block {
  font-size: 1em;
  color: var(--rr99-text-main);
  margin-bottom: 20px;
  text-align: justify;
}

/* Hero Section */
.page-game-bai__hero-section {
  padding-top: 10px; /* Small top padding as per rules */
  padding-bottom: 60px;
  background-color: var(--rr99-deep-navy);
}

.page-game-bai__hero-container {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding: 40px 16px;
  box-sizing: border-box;
}

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

.page-game-bai__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Use clamp for H1 */
  font-weight: 800;
  line-height: 1.2;
  color: var(--rr99-gold-color);
  margin-bottom: 20px;
}

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

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

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-game-bai__btn-primary {
  background: var(--rr99-button-gradient);
  color: var(--rr99-text-main);
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-game-bai__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-game-bai__btn-secondary:hover {
  background: var(--rr99-gold-color);
  color: var(--rr99-deep-navy);
  transform: translateY(-2px);
}

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

.page-game-bai__hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  display: block;
  margin: 0 auto;
}

/* Intro Section */
.page-game-bai__intro-section {
  padding: 60px 0;
  background-color: var(--rr99-deep-navy);
}

/* Game Types Section */
.page-game-bai__game-types-section {
  padding: 60px 0;
  background-color: var(--rr99-card-bg);
  color: var(--rr99-text-main);
}

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

.page-game-bai__game-card {
  background-color: var(--rr99-deep-navy);
  border: 1px solid var(--rr99-border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

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

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

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

.page-game-bai__game-card-title a {
  color: var(--rr99-gold-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-game-bai__game-card-title a:hover {
  color: var(--rr99-glow-color);
}

.page-game-bai__game-card-description {
  font-size: 0.95em;
  color: var(--rr99-text-secondary);
  padding: 0 20px 20px;
}

/* Why rr99 Section */
.page-game-bai__why-rr99-section {
  padding: 60px 0;
  background-color: var(--rr99-deep-navy);
}

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

.page-game-bai__feature-item {
  background-color: var(--rr99-card-bg);
  border: 1px solid var(--rr99-border-color);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.page-game-bai__feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-game-bai__feature-image {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-game-bai__feature-title {
  font-size: 1.4em;
  font-weight: bold;
  color: var(--rr99-gold-color);
  margin-bottom: 10px;
}

.page-game-bai__feature-description {
  font-size: 0.95em;
  color: var(--rr99-text-secondary);
}

/* How to Play Section */
.page-game-bai__how-to-play-section {
  padding: 60px 0;
  background-color: var(--rr99-card-bg);
  color: var(--rr99-text-main);
}

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

.page-game-bai__step-item {
  background-color: var(--rr99-deep-navy);
  border: 1px solid var(--rr99-border-color);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-game-bai__step-title {
  font-size: 1.3em;
  font-weight: bold;
  color: var(--rr99-gold-color);
  margin-bottom: 10px;
}

.page-game-bai__step-description {
  font-size: 0.95em;
  color: var(--rr99-text-secondary);
}

.page-game-bai__inline-link {
  color: var(--rr99-gold-color);
  text-decoration: underline;
}

.page-game-bai__inline-link:hover {
  color: var(--rr99-glow-color);
}

.page-game-bai__game-trial-wrapper {
    background-color: var(--rr99-deep-navy);
    border: 1px solid var(--rr99-border-color);
    border-radius: 12px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-game-bai__game-trial-frame {
    border: none;
    border-radius: 8px;
    width: 100%;
    height: 600px;
    display: block;
    margin-top: 20px;
}

/* FAQ Section */
.page-game-bai__faq-section {
  padding: 60px 0;
  background-color: var(--rr99-deep-navy);
}

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

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

.page-game-bai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: var(--rr99-gold-color);
  cursor: pointer;
  list-style: none; /* For details summary */
  transition: background-color 0.3s ease;
}

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

.page-game-bai__faq-item[open] > .page-game-bai__faq-question {
  background-color: var(--rr99-primary-color);
}

.page-game-bai__faq-question:hover {
  background-color: var(--rr99-primary-color);
}

.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(--rr99-gold-color);
}

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

/* CTA Section */
.page-game-bai__cta-section {
  padding: 80px 0;
  background-color: var(--rr99-primary-color);
  text-align: center;
}

.page-game-bai__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-game-bai__cta-content .page-game-bai__section-title {
  color: var(--rr99-gold-color);
  margin-bottom: 25px;
}

.page-game-bai__cta-content .page-game-bai__section-description {
  color: var(--rr99-text-main);
  margin-bottom: 40px;
}

.page-game-bai__btn-large {
  font-size: 1.3em;
  padding: 18px 40px;
  display: inline-block;
  min-width: 250px;
}

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

  .page-game-bai__hero-content,
  .page-game-bai__hero-image-wrapper {
    flex: 1 1 100%;
  }

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

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

@media (max-width: 768px) {
  .page-game-bai__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
  }

  .page-game-bai__hero-container {
    padding: 30px 15px;
    gap: 30px;
  }

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

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

  .page-game-bai__cta-buttons {
    flex-direction: column; /* Buttons stack vertically */
    gap: 15px;
    width: 100%;
  }

  .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-left: 15px !important; /* Ensure padding inside button */
    padding-right: 15px !important;
  }

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

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

  .page-game-bai__content-area {
    padding: 30px 15px; /* General content area padding */
    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;
    display: block !important;
  }

  .page-game-bai__game-list,
  .page-game-bai__feature-grid,
  .page-game-bai__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-bai__game-card-image {
    height: 160px; /* Adjust height for mobile */
  }

  .page-game-bai__feature-image {
    max-width: 200px;
  }

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

  .page-game-bai__faq-answer {
    padding: 10px 20px 15px;
    font-size: 0.95em;
  }

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