/* Base styles for the Game Bài page */
.page-game-bai {
  font-family: 'Arial', sans-serif;
  color: var(--text-main, #333333);
  background-color: var(--background, #F5F7FA);
  line-height: 1.6;
}

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

.page-game-bai__section {
  padding: 60px 0;
  margin-bottom: 20px;
}

.page-game-bai__section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: #E53935;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

.page-game-bai__sub-title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  color: #E53935;
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-game-bai__text-block p {
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.7;
}

.page-game-bai__text-block strong {
  color: #E53935;
}

/* Hero Section */
.page-game-bai__hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  background-color: #E53935; /* Fallback color */
}

.page-game-bai__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

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

.page-game-bai__hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #ffffff;
  padding: 40px 20px;
  max-width: 900px;
  background: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for text readability */
  border-radius: 10px;
  margin-top: 100px; /* Push content down from top for image-then-text */
}

.page-game-bai__main-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.page-game-bai__hero-description {
  font-size: clamp(18px, 2.5vw, 24px);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

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

/* Buttons */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary,
.page-game-bai__btn-play {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  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: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: 2px solid #E53935;
}

.page-game-bai__btn-primary:hover {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
  border-color: #FF5A4F;
  transform: translateY(-2px);
}

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

.page-game-bai__btn-secondary:hover {
  background: #f0f0f0;
  color: #E53935;
  border-color: #FF5A4F;
  transform: translateY(-2px);
}

.page-game-bai__btn-play {
  background: #E53935;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
}

.page-game-bai__btn-play:hover {
  background: #FF5A4F;
}

/* Introduction Section */
.page-game-bai__introduction-section {
  background: #ffffff;
}

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

.page-game-bai__content-wrapper .page-game-bai__text-block {
  flex: 1;
}

.page-game-bai__content-wrapper .page-game-bai__image-block {
  flex: 1;
  min-width: 300px;
}

.page-game-bai__content-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  display: block;
}

/* Games List Section */
.page-game-bai__games-list-section {
  background: var(--background, #F5F7FA);
}

.page-game-bai__games-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.08);
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

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

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

.page-game-bai__game-card-title a {
  color: #E53935;
  text-decoration: none;
}

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

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

.page-game-bai__more-games-cta {
  text-align: center;
}

/* Benefits Section */
.page-game-bai__benefits-section {
  background: #E53935;
  color: #ffffff;
}

.page-game-bai__benefits-section .page-game-bai__section-title {
  color: #ffffff;
}

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

.page-game-bai__benefit-card {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  text-align: center;
}

.page-game-bai__benefit-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-game-bai__benefit-description {
  font-size: 16px;
  color: #f0f0f0;
}

/* Guide Section */
.page-game-bai__guide-section {
  background: #ffffff;
}

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

.page-game-bai__step-card {
  background: #ffffff;
  border: 1px solid #E0E0E0;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.page-game-bai__step-icon {
  font-size: 48px;
  font-weight: 700;
  color: #E53935;
  margin-bottom: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #fce4e4; /* Lighter shade of red */
}

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

.page-game-bai__step-description {
  font-size: 16px;
  color: #666;
}

.page-game-bai__cta-buttons--centered {
  text-align: center;
}

/* Strategy Section */
.page-game-bai__strategy-section {
  background: var(--background, #F5F7FA);
}

.page-game-bai__strategy-section .page-game-bai__content-wrapper {
  flex-direction: row-reverse; /* Image on left, text on right */
}

/* 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;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-bai__hero-content {
    padding: 30px 15px;
  }
  .page-game-bai__main-title {
    font-size: clamp(32px, 4.5vw, 50px);
  }
  .page-game-bai__hero-description {
    font-size: clamp(16px, 2.2vw, 20px);
  }
  .page-game-bai__cta-buttons {
    gap: 15px;
  }
  .page-game-bai__btn-primary, .page-game-bai__btn-secondary {
    padding: 12px 25px;
    font-size: 16px;
  }
  .page-game-bai__games-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  .page-game-bai__benefits-grid, .page-game-bai__guide-steps {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-game-bai__section {
    padding: 40px 0;
  }
  .page-game-bai__section-title {
    font-size: clamp(24px, 6vw, 36px);
  }
  .page-game-bai__section-description {
    font-size: 16px;
    margin-bottom: 25px;
  }
  .page-game-bai__sub-title {
    font-size: clamp(18px, 4vw, 24px);
  }

  /* HERO 主图区域 */
  .page-game-bai__hero-section {
    padding-top: 10px; /* Small top padding */
    min-height: 400px;
  }
  .page-game-bai__hero-image {
    object-fit: contain !important; /* Mobile: contain, not cover */
    aspect-ratio: unset !important;
  }
  .page-game-bai__hero-content {
    padding: 20px 10px;
    margin-top: 50px;
  }
  .page-game-bai__main-title {
    font-size: clamp(28px, 7vw, 40px);
  }
  .page-game-bai__hero-description {
    font-size: clamp(15px, 3.5vw, 18px);
    margin-bottom: 20px;
  }
  .page-game-bai__cta-buttons {
    flex-direction: column; /* Buttons stack vertically */
    gap: 10px;
  }
  .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;
    padding-right: 15px;
  }
  .page-game-bai__cta-buttons,
  .page-game-bai__button-group,
  .page-game-bai__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  /* General Image & Container Adaptations */
  .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;
    padding-right: 15px;
  }

  /* Introduction Section */
  .page-game-bai__content-wrapper {
    flex-direction: column;
    gap: 30px;
  }

  /* 产品展示图区域 (Games Grid) */
  .page-game-bai__games-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for mobile */
    gap: 20px;
    overflow-x: hidden;
  }
  .page-game-bai__game-card-image {
    height: 150px;
  }
  .page-game-bai__game-card-title {
    font-size: 18px;
  }
  .page-game-bai__game-card-description {
    font-size: 14px;
  }

  /* Benefits Section */
  .page-game-bai__benefits-grid {
    grid-template-columns: 1fr;
  }
  .page-game-bai__benefit-title {
    font-size: 20px;
  }

  /* Guide Section */
  .page-game-bai__guide-steps {
    grid-template-columns: 1fr;
  }
  .page-game-bai__step-icon {
    width: 60px;
    height: 60px;
    font-size: 36px;
  }
  .page-game-bai__step-title {
    font-size: 20px;
  }

  /* Strategy Section (Long article SEO area) */
  .page-game-bai__strategy-section .page-game-bai__content-wrapper {
    flex-direction: column;
  }
  .page-game-bai__article-body, .page-game-bai__article-figure {
    max-width: 100%;
    margin: 0 auto;
    text-align: left;
  }
  .page-game-bai__content-image {
    margin-bottom: 20px;
  }

  /* FAQ Section */
  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; }
}

@media (max-width: 480px) {
  .page-game-bai__hero-content {
    padding: 15px 10px;
  }
  .page-game-bai__main-title {
    font-size: clamp(24px, 8vw, 32px);
  }
  .page-game-bai__hero-description {
    font-size: clamp(14px, 4vw, 16px);
  }
  .page-game-bai__btn-primary, .page-game-bai__btn-secondary {
    font-size: 15px;
    padding: 12px 20px;
  }
  .page-game-bai__games-grid {
    grid-template-columns: 1fr;
  }
}