.page-game-bai {
  font-family: 'Arial', sans-serif;
  color: #333333;
  line-height: 1.6;
  background-color: #ffffff; /* Default light background for content */
}

.page-game-bai__article-wrap {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-game-bai__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding as shared.css handles body padding */
  padding-bottom: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background-color: #017439;
}

.page-game-bai__hero-image-wrapper {
  width: 100%;
  max-height: 600px;
  overflow: hidden;
  margin-bottom: 20px;
}

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

.page-game-bai__hero-content {
  position: relative; /* Ensure content is above image but not overlapping */
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.page-game-bai__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-game-bai__hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 30px;
  color: #ffffff;
}

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

.page-game-bai__cta-buttons--single {
  margin-top: 30px;
}

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-bai__btn-primary {
  background-color: #C30808; /* Register/Login button color */
  color: #FFFF00; /* Register/Login text color */
  border: 2px solid #C30808;
}

.page-game-bai__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
}

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

.page-game-bai__btn-secondary:hover {
  background-color: #ffffff;
  color: #017439;
}

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

.page-game-bai__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-game-bai__dark-section {
  background-color: #017439;
  color: #ffffff;
}

.page-game-bai__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: inherit;
}

.page-game-bai__sub-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 600;
  margin-top: 35px;
  margin-bottom: 20px;
  color: inherit;
}

.page-game-bai__paragraph {
  font-size: 1.05rem;
  margin-bottom: 15px;
}

.page-game-bai__figure {
  margin: 30px auto;
  max-width: 680px;
  text-align: center;
}

.page-game-bai__image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-game-bai__figcaption {
  font-size: 0.9rem;
  color: #666666;
  margin-top: 10px;
}

.page-game-bai__dark-section .page-game-bai__figcaption {
  color: #cccccc;
}

.page-game-bai__list {
  list-style: disc;
  margin-left: 25px;
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.page-game-bai__list-item {
  margin-bottom: 10px;
}

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

.page-game-bai__game-card {
  background-color: #ffffff;
  color: #333333;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-game-bai__card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-game-bai__card-title a {
  color: #017439;
  text-decoration: none;
}

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

.page-game-bai__card-description {
  font-size: 0.95rem;
  color: #555555;
  padding: 0 15px;
  flex-grow: 1;
  margin-bottom: 15px;
}

.page-game-bai__btn-play {
  display: inline-block;
  background-color: #017439;
  color: #ffffff;
  padding: 10px 25px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
  margin-top: auto;
  max-width: calc(100% - 30px);
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-bai__btn-play:hover {
  background-color: #005f2f;
}

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

.page-game-bai__promo-card {
  background-color: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.3s ease;
}

.page-game-bai__promo-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.page-game-bai__promo-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #017439;
  margin-bottom: 15px;
}

.page-game-bai__promo-description {
  font-size: 1rem;
  color: #555555;
  flex-grow: 1;
  margin-bottom: 25px;
}

.page-game-bai__copyright-section {
  padding: 20px 0;
  text-align: center;
  font-size: 0.9rem;
  color: #666666;
  border-top: 1px solid #eee;
}

.page-game-bai__copyright-text {
  margin: 0;
}

/* Responsive styles for tablets and smaller desktops */
@media (max-width: 1024px) {
  .page-game-bai__article-wrap {
    padding: 0 15px;
  }

  .page-game-bai__hero-section {
    padding-bottom: 30px;
  }

  .page-game-bai__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .page-game-bai__hero-description {
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  }

  .page-game-bai__section {
    padding: 50px 0;
  }

  .page-game-bai__section-title {
    font-size: clamp(1.6rem, 3.8vw, 2.5rem);
  }

  .page-game-bai__sub-title {
    font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  }

  .page-game-bai__game-grid, .page-game-bai__promo-grid {
    gap: 20px;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .page-game-bai {
    font-size: 16px;
    line-height: 1.6;
  }

  /* 1. 顶区标题 + 双 CTA */
  .page-game-bai__hero-section {
    padding-top: 10px !important; /* Small top padding */
    padding-bottom: 20px;
  }

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

  .page-game-bai__main-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
  }

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

  .page-game-bai__cta-buttons {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }

  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1rem;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* 2. 单栏长文容器 */
  .page-game-bai__article-wrap {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-game-bai__section {
    padding: 30px 0;
  }

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

  .page-game-bai__sub-title {
    font-size: 1.4rem;
    margin-top: 25px;
    margin-bottom: 15px;
  }

  .page-game-bai__paragraph,
  .page-game-bai__list-item {
    font-size: 0.95rem;
  }

  /* 3. 通用图片与 figure */
  .page-game-bai__figure {
    margin: 20px auto;
  }

  .page-game-bai__image,
  .page-game-bai__card-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .page-game-bai__game-grid,
  .page-game-bai__promo-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }

  .page-game-bai__game-card,
  .page-game-bai__promo-card {
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .page-game-bai__card-title {
    font-size: 1.3rem;
  }

  .page-game-bai__btn-play {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 15px;
    font-size: 0.95rem;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-game-bai__promo-title {
    font-size: 1.4rem;
  }

  .page-game-bai__promo-description {
    font-size: 0.9rem;
  }

  .page-game-bai__copyright-section {
    padding: 15px 15px;
  }

  /* 4. 按钮与按钮容器 (already covered in cta-buttons and btn-primary/secondary) */
  /* Ensure all button-like elements are covered */
  .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;
  }
  .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;
  }
  .page-game-bai__cta-buttons {
    flex-direction: column;
  }

  /* 5. 注册教程与 FAQ 区块 (Guide section for this page) */
  .page-game-bai__guide-section h3 {
    font-size: 1.3rem;
  }
  .page-game-bai__guide-section p {
    font-size: 0.95rem;
  }
}