/* Base styles for the Game Bài page */
.page-game-bai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF6D6; /* Text Main */
  background: #0A0A0A; /* Background */
}

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

.page-game-bai__section-title {
  font-size: 36px;
  font-weight: 700;
  color: #F2C14E; /* Primary color */
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-game-bai__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, transparent, #FFD36B, transparent);
  border-radius: 2px;
}

.page-game-bai__text-block {
  font-size: 17px;
  margin-bottom: 20px;
  text-align: justify;
}

.page-game-bai__text-block strong {
  color: #FFD36B; /* Glow */
}

.page-game-bai a {
  color: #FFD36B; /* Glow */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-game-bai a:hover {
  color: #F2C14E; /* Primary color */
  text-decoration: underline;
}

/* Buttons */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary,
.page-game-bai__btn-play,
.page-game-bai__btn-promo {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-bai__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
  color: #111111; /* Dark text for contrast */
  border: none;
  box-shadow: 0 4px 15px rgba(255, 211, 107, 0.4);
}

.page-game-bai__btn-primary:hover {
  background: linear-gradient(180deg, #FFE08A 0%, #E6B02D 100%);
  box-shadow: 0 6px 20px rgba(255, 211, 107, 0.6);
  transform: translateY(-2px);
}

.page-game-bai__btn-secondary {
  background: transparent;
  color: #FFD36B; /* Glow */
  border: 2px solid #FFD36B; /* Glow */
}

.page-game-bai__btn-secondary:hover {
  background: #FFD36B;
  color: #111111; /* Dark text for contrast */
  border-color: #F2C14E; /* Primary color */
  transform: translateY(-2px);
}

.page-game-bai__btn-play,
.page-game-bai__btn-promo {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
  color: #111111;
  border: none;
  box-shadow: 0 2px 10px rgba(255, 211, 107, 0.3);
  font-size: 15px;
  padding: 10px 20px;
}

.page-game-bai__btn-play:hover,
.page-game-bai__btn-promo:hover {
  background: linear-gradient(180deg, #FFE08A 0%, #E6B02D 100%);
  box-shadow: 0 4px 12px rgba(255, 211, 107, 0.5);
  transform: translateY(-1px);
}

/* Hero Section */
.page-game-bai__hero-section {
  position: relative;
  padding-top: 10px; /* Rely on body padding for header offset */
  overflow: hidden;
  color: #FFF6D6;
  background: #0A0A0A;
}

.page-game-bai__hero-image-wrapper {
  width: 100%;
  height: 675px; /* Fixed height for desktop hero */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
}

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

.page-game-bai__hero-content {
  text-align: center;
  padding: 0 20px 60px;
  max-width: 900px;
  margin: 0 auto;
}

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

.page-game-bai__intro-text {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

/* About Section */
.page-game-bai__about-section {
  padding: 80px 0;
  background: #111111; /* Card BG */
  color: #FFF6D6;
}

/* Games List Section */
.page-game-bai__games-list-section {
  padding: 80px 0;
  background: #0A0A0A;
}

.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: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border */
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #FFF6D6;
}

.page-game-bai__game-image {
  width: 100%;
  height: 220px; /* Fixed height for game cards */
  object-fit: cover;
  display: block;
  margin-bottom: 15px;
}

.page-game-bai__game-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #F2C14E; /* Primary color */
}

.page-game-bai__game-title a {
  color: #F2C14E;
}

.page-game-bai__game-title a:hover {
  color: #FFD36B;
}

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

.page-game-bai__btn-play,
.page-game-bai__btn-promo {
  margin: 0 15px;
  width: calc(100% - 30px);
}

.page-game-bai__view-all-cta {
  text-align: center;
  margin-top: 40px;
}

/* Strategy Section */
.page-game-bai__strategy-section {
  padding: 80px 0;
  background: #111111; /* Card BG */
  color: #FFF6D6;
}

.page-game-bai__article-body {
  max-width: 900px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.7;
}

.page-game-bai__article-body h3 {
  font-size: 24px;
  color: #F2C14E; /* Primary color */
  margin-top: 35px;
  margin-bottom: 15px;
}

.page-game-bai__article-body p {
  margin-bottom: 20px;
  text-align: justify;
}

.page-game-bai__article-body strong {
  color: #FFD36B; /* Glow */
}

/* Promo Section */
.page-game-bai__promo-section {
  padding: 80px 0;
  background: #0A0A0A;
}

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

.page-game-bai__promo-card {
  background: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border */
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #FFF6D6;
}

.page-game-bai__promo-image {
  width: 100%;
  height: 180px; /* Fixed height for promo images */
  object-fit: cover;
  display: block;
  margin-bottom: 15px;
}

.page-game-bai__promo-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #F2C14E; /* Primary color */
  padding: 0 15px;
}

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

.page-game-bai__btn-promo {
  margin: 0 15px;
  width: calc(100% - 30px);
}

/* FAQ Section */
.page-game-bai__faq-section {
  padding: 80px 0;
  background: #0A0A0A;
}

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

details.page-game-bai__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #3A2A12; /* Border */
  overflow: hidden;
  background: #111111; /* Card BG */
}

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;
  color: #FFF6D6;
}

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: rgba(242, 193, 78, 0.1);
}

.page-game-bai__faq-qtext {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #F2C14E; /* Primary color */
}

.page-game-bai__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFD36B; /* Glow */
  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: rgba(255, 255, 255, 0.05);
  border-radius: 0 0 5px 5px;
  color: #FFF6D6;
}

.page-game-bai__faq-answer p {
  margin-bottom: 0;
}

/* SEO Content Section */
.page-game-bai__seo-content {
  padding: 80px 0;
  background: #111111; /* Card BG */
  color: #FFF6D6;
}

.page-game-bai__article-subtitle {
  font-size: 28px;
  color: #F2C14E; /* Primary color */
  margin-top: 45px;
  margin-bottom: 20px;
}

/* Dark background section for contrast */
.page-game-bai__dark-section {
  background: #111111;
  color: #FFF6D6;
}

/* Ensure contrast for text on brand colors */
.page-game-bai__dark-bg {
  background: #F2C14E;
  color: #ffffff;
}

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

.page-game-bai__medium-bg {
  background: #FFD36B;
  color: #000000;
}

/* Specific contrast fixes */
.page-game-bai__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-game-bai__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}

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

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

  .page-game-bai__hero-image-wrapper {
    height: 500px;
  }

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

  .page-game-bai__intro-text {
    font-size: 1.1em;
  }

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

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

  .page-game-bai__article-body {
    font-size: 16px;
  }

  .page-game-bai__article-body h3 {
    font-size: 22px;
  }

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

  .page-game-bai__promo-image {
    height: 160px;
  }

  .page-game-bai__faq-qtext {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-game-bai__container {
    padding: 0 15px;
  }

  .page-game-bai__section-title {
    font-size: 28px;
    margin-bottom: 25px;
  }

  /* HERO 主图区域 */
  .page-game-bai__hero-section {
    padding-top: 10px; /* 約 10px 頂距 */
  }

  .page-game-bai__hero-image-wrapper {
    height: 300px; /* Adjust height for mobile */
    margin-bottom: 20px;
  }

  .page-game-bai__hero-image {
    object-fit: contain !important; /* 禁止 cover 裁切两侧 */
    aspect-ratio: unset; /* 取消 aspect-ratio */
    width: 100% !important;
    height: auto !important;
  }

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

  .page-game-bai__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em); /* 更小的 clamp 范围 */
    margin-bottom: 15px;
  }

  .page-game-bai__intro-text {
    font-size: 1em;
    margin-bottom: 25px;
  }
}
}