/* style/game-bai.css */
:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --card-bg: #111111;
  --text-main: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --dark-bg-body: #0A0A0A; /* Body background from shared.css */
}

.page-game-bai {
  font-family: 'Arial', sans-serif;
  background-color: var(--dark-bg-body);
  color: var(--text-main); /* Light text on dark body background */
}

.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(--primary-color);
  text-align: center;
  margin-bottom: 15px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-game-bai__section-subtitle {
  font-size: 1.2em;
  color: #cccccc;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.5;
}

.page-game-bai__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  margin-bottom: 60px;
}

.page-game-bai__hero-image-wrapper {
  width: 100%;
  max-height: 675px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 30px;
}

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

.page-game-bai__hero-content {
  text-align: center;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  max-width: 900px;
  width: 100%;
  margin-top: -80px; /* Overlap with image for visual effect */
  position: relative;
  z-index: 1;
}

.page-game-bai__dark-bg {
  background-color: var(--card-bg);
  color: var(--text-main);
}

.page-game-bai__hero-title {
  font-size: clamp(2em, 3.5vw, 3em); /* Responsive H1 font size */
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-game-bai__hero-description {
  font-size: 1.1em;
  color: #e0e0e0;
  margin-bottom: 30px;
  line-height: 1.6;
}

.page-game-bai__hero-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary,
.page-game-bai__btn-tertiary,
.page-game-bai__btn-link {
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-game-bai__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 211, 107, 0.4);
}

.page-game-bai__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 211, 107, 0.6);
}

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

.page-game-bai__btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--card-bg);
  transform: translateY(-3px);
}

.page-game-bai__advantages-section {
  padding: 60px 0;
  margin-bottom: 60px;
}

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

.page-game-bai__advantage-card {
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}

.page-game-bai__advantage-icon {
  width: 100%;
  height: auto;
  max-width: 250px;
  margin: 0 auto 20px;
  object-fit: contain;
  display: block;
}

.page-game-bai__advantage-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.4;
}

.page-game-bai__advantage-card p {
  color: #cccccc;
  line-height: 1.6;
}

.page-game-bai__games-list-section {
  padding: 60px 0;
  margin-bottom: 60px;
  background-color: var(--card-bg);
}

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

.page-game-bai__game-card {
  background-color: #0A0A0A;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  text-align: center;
  padding-bottom: 20px;
}

.page-game-bai__game-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  margin-bottom: 20px;
}

.page-game-bai__game-title {
  font-size: 1.5em;
  color: var(--secondary-color);
  margin-bottom: 10px;
  padding: 0 15px;
  font-weight: bold;
}

.page-game-bai__game-card p {
  color: #cccccc;
  font-size: 0.95em;
  line-height: 1.5;
  padding: 0 15px 20px;
}

.page-game-bai__btn-tertiary {
  background: var(--primary-color);
  color: var(--card-bg);
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
}

.page-game-bai__btn-tertiary:hover {
  background: #e0b03e;
  transform: translateY(-2px);
}

.page-game-bai__how-to-play-section {
  padding: 60px 0;
  margin-bottom: 60px;
}

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

.page-game-bai__step-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  position: relative;
}

.page-game-bai__step-number {
  width: 60px;
  height: 60px;
  background: var(--button-gradient);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: bold;
  margin: 0 auto 20px;
  box-shadow: 0 2px 10px rgba(255, 211, 107, 0.5);
}

.page-game-bai__step-title {
  font-size: 1.3em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.3;
}

.page-game-bai__step-card p {
  color: #cccccc;
  line-height: 1.6;
  margin-bottom: 20px;
}

.page-game-bai__btn-link {
  color: var(--secondary-color);
  text-decoration: underline;
  font-weight: bold;
  padding: 0;
  border-radius: 0;
  background: none;
}

.page-game-bai__btn-link:hover {
  color: #FFD36B;
  text-decoration: none;
}

.page-game-bai__strategy-section {
  padding: 60px 0;
  margin-bottom: 60px;
  background-color: var(--card-bg);
}

.page-game-bai__strategy-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.page-game-bai__strategy-heading {
  font-size: 1.8em;
  color: var(--secondary-color);
  margin-top: 40px;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.3;
}

.page-game-bai__strategy-content p {
  color: #e0e0e0;
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 1.05em;
}

.page-game-bai__strategy-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-top: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-game-bai__promotions-section {
  padding: 60px 0;
  margin-bottom: 60px;
}

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

.page-game-bai__promotion-card {
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}

.page-game-bai__promotion-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.4;
}

.page-game-bai__promotion-card p {
  color: #cccccc;
  line-height: 1.6;
  margin-bottom: 25px;
}

.page-game-bai__cta-bottom {
  text-align: center;
  margin-top: 50px;
}

.page-game-bai__faq-section {
  padding: 60px 0;
  margin-bottom: 60px;
  background-color: var(--card-bg);
}

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

.page-game-bai__faq-item {
  background-color: #0A0A0A;
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 20px 25px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-game-bai__faq-question {
  font-size: 1.25em;
  color: var(--primary-color);
  font-weight: bold;
  cursor: default; /* Not an accordion, just a heading */
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-game-bai__faq-answer {
  font-size: 1em;
  color: #e0e0e0;
  line-height: 1.7;
}

.page-game-bai__conclusion-section {
  padding: 80px 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.page-game-bai__conclusion-section p {
  max-width: 900px;
  margin: 0 auto 40px;
  color: #e0e0e0;
  font-size: 1.1em;
  line-height: 1.7;
}

.page-game-bai__btn-large {
  padding: 16px 35px;
  font-size: 1.1em;
}

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

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

  .page-game-bai__section-title {
    font-size: 2em;
  }

  .page-game-bai__section-subtitle {
    font-size: 1em;
  }

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

  .page-game-bai__hero-title {
    font-size: clamp(1.8em, 4vw, 2.5em);
  }

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

  .page-game-bai__hero-actions {
    flex-direction: column;
    gap: 15px;
  }

  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary {
    width: 100%;
  }

  .page-game-bai__advantages-grid,
  .page-game-bai__games-grid,
  .page-game-bai__steps-grid,
  .page-game-bai__promotions-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

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

  .page-game-bai__strategy-heading {
    font-size: 1.6em;
  }

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

@media (max-width: 768px) {
  .page-game-bai__hero-section {
    padding-top: 10px !important; /* Body handles header offset */
    margin-bottom: 40px;
  }

  .page-game-bai__hero-image-wrapper {
    margin-bottom: 20px;
  }

  .page-game-bai__hero-content {
    padding: 25px;
    margin-top: -40px; /* Adjust overlap for smaller screens */
  }

  .page-game-bai__hero-title {
    font-size: clamp(1.6em, 6vw, 2em) !important; /* More aggressive clamping for mobile */
  }

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

  .page-game-bai__hero-actions {
    gap: 10px;
  }

  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary,
  .page-game-bai__btn-tertiary,
  .page-game-bai__btn-link,
  .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;
    padding-right: 15px;
    font-size: 0.9em;
  }

  /* Button containers */
  .page-game-bai__hero-actions,
  .page-game-bai__cta-bottom {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
  }

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

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

  .page-game-bai__advantages-section,
  .page-game-bai__games-list-section,
  .page-game-bai__how-to-play-section,
  .page-game-bai__strategy-section,
  .page-game-bai__promotions-section,
  .page-game-bai__faq-section,
  .page-game-bai__conclusion-section {
    padding: 40px 0;
    margin-bottom: 40px;
  }

  .page-game-bai__advantages-grid,
  .page-game-bai__games-grid,
  .page-game-bai__steps-grid,
  .page-game-bai__promotions-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 25px;
  }

  .page-game-bai__advantage-card,
  .page-game-bai__game-card,
  .page-game-bai__step-card,
  .page-game-bai__promotion-card,
  .page-game-bai__faq-item {
    padding: 20px;
  }

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

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

  .page-game-bai__strategy-heading {
    font-size: 1.4em;
    margin-top: 30px;
  }

  .page-game-bai__strategy-content p {
    font-size: 1em;
  }

  .page-game-bai__faq-question {
    font-size: 1.05em;
  }

  .page-game-bai__faq-answer {
    font-size: 0.95em;
  }

  .page-game-bai__conclusion-section p {
    font-size: 1em;
  }

  /* All images must be responsive */
  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Ensure containers do not overflow */
  .page-game-bai__advantages-section,
  .page-game-bai__games-list-section,
  .page-game-bai__how-to-play-section,
  .page-game-bai__strategy-section,
  .page-game-bai__promotions-section,
  .page-game-bai__faq-section,
  .page-game-bai__conclusion-section,
  .page-game-bai__container,
  .page-game-bai__advantage-card,
  .page-game-bai__game-card,
  .page-game-bai__step-card,
  .page-game-bai__promotion-card,
  .page-game-bai__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}