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

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

.page-game-bai__section-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: #1F2D3D; /* Text Main */
  text-align: center;
  margin-bottom: 30px;
  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, #4A8BFF, #2F6BFF);
  border-radius: 2px;
}

.page-game-bai__section-title--white {
  color: #FFFFFF;
}

.page-game-bai__section-title--white::after {
  background: #FFFFFF;
}

.page-game-bai__section-description {
  font-size: 18px;
  color: #1F2D3D;
  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: #2F6BFF;
  margin-top: 30px;
  margin-bottom: 15px;
}

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

.page-game-bai__article-body p {
  margin-bottom: 15px;
}

.page-game-bai__article-body--white p,
.page-game-bai__article-body--white li {
  color: #FFFFFF;
}

.page-game-bai__list {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 15px;
}

.page-game-bai__numbered-list {
  list-style-type: decimal;
  margin-left: 20px;
  margin-bottom: 15px;
}

.page-game-bai__list li,
.page-game-bai__numbered-list li {
  margin-bottom: 8px;
}

/* Hero Section */
.page-game-bai__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding */
  padding-bottom: 60px;
  background-color: #F4F7FB;
  overflow: hidden;
}

.page-game-bai__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-game-bai__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.7);
}

.page-game-bai__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  color: #FFFFFF;
  padding: 80px 20px;
}

.page-game-bai__main-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #FFFFFF;
  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: 40px;
  line-height: 1.5;
  color: #F0F0F0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

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

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  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%;
  text-align: center;
}

.page-game-bai__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #FFFFFF;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.4);
}

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

.page-game-bai__btn-secondary {
  background: #FFFFFF;
  color: #2F6BFF;
  border: 2px solid #2F6BFF;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-game-bai__btn-secondary:hover {
  background: #F0F0F0;
  border-color: #4A8BFF;
  color: #4A8BFF;
  transform: translateY(-2px);
}

/* Introduction Section */
.page-game-bai__introduction-section,
.page-game-bai__guide-section,
.page-game-bai__providers-section,
.page-game-bai__faq-section {
  padding: 60px 0;
  background-color: #F4F7FB; /* Background */
}

.page-game-bai__dark-bg {
  background-color: #2F6BFF;
  padding: 60px 0;
  color: #FFFFFF;
}

.page-game-bai__light-bg {
  background-color: #F4F7FB;
  color: #1F2D3D;
}

/* Games Showcase Section */
.page-game-bai__games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.page-game-bai__game-card {
  background: #FFFFFF; /* Card B G */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: #1F2D3D; /* Text Main */
}

.page-game-bai__game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

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

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

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

.page-game-bai__btn-play {
  display: inline-block;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #FFFFFF;
  padding: 10px 25px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 20px;
  transition: background 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: calc(100% - 30px); /* Account for padding */
  margin-left: 15px;
  margin-right: 15px;
}

.page-game-bai__btn-play:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
}

/* Providers Section */
.page-game-bai__provider-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.page-game-bai__provider-card {
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease;
  color: #1F2D3D;
}

.page-game-bai__provider-card:hover {
  transform: translateY(-5px);
}

.page-game-bai__provider-logo {
  max-width: 150px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-game-bai__provider-name {
  font-size: 20px;
  font-weight: 700;
  color: #2F6BFF;
  margin-bottom: 10px;
}

.page-game-bai__provider-desc {
  font-size: 15px;
  color: #1F2D3D;
}

/* FAQ Section */
details.page-game-bai__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #D6E2FF; /* Border */
  overflow: hidden;
  background: #FFFFFF; /* Card B G */
}

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

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

.page-game-bai__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #2F6BFF;
  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: #1F2D3D;
}

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

/* CTA Bottom Section */
.page-game-bai__cta-bottom-section {
  padding: 80px 0;
  background-color: #2F6BFF;
  color: #FFFFFF;
  text-align: center;
}

.page-game-bai__cta-bottom-section .page-game-bai__section-description {
  color: #F0F0F0;
}

.page-game-bai__text-center {
  text-align: center;
}

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

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

  .page-game-bai__games-grid,
  .page-game-bai__provider-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

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

  .page-game-bai__main-title {
    font-size: clamp(28px, 4.5vw, 48px);
  }

  .page-game-bai__hero-description {
    font-size: clamp(16px, 2.2vw, 20px);
  }

  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary {
    font-size: 16px;
    padding: 12px 25px;
  }

  .page-game-bai__section-title {
    font-size: clamp(22px, 3.5vw, 32px);
  }

  .page-game-bai__sub-title {
    font-size: clamp(18px, 2.5vw, 24px);
  }

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

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-game-bai__hero-section {
    padding-top: 10px; /* 約 10px 頂距 */
    padding-bottom: 40px;
  }
  .page-game-bai__hero-image {
    object-fit: contain !important; /* 禁止 cover 裁切两侧 */
    aspect-ratio: unset !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-game-bai__hero-image-wrapper {
    position: relative;
    height: auto;
    padding-bottom: 56.25%; /* 16:9 aspect ratio for initial display */
    top: unset;
    left: unset;
  }
  .page-game-bai__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  .page-game-bai__hero-content {
    padding: 30px 15px;
    color: #1F2D3D; /* Adjust text color for better contrast if hero image is less dominant */
    text-shadow: none;
    background-color: #F4F7FB; /* Ensure content block has a background */
  }
  .page-game-bai__main-title {
    font-size: clamp(26px, 7vw, 32px);
    color: #1F2D3D;
  }
  .page-game-bai__hero-description {
    font-size: 16px;
    color: #333333;
  }

  /* 产品展示图区域 */
  .page-game-bai__games-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    overflow-x: hidden; /* 防止横向滚动 */
  }
  .page-game-bai__game-card {
    margin-left: 15px;
    margin-right: 15px;
  }
  .page-game-bai__game-image {
    height: 180px;
  }
  .page-game-bai__btn-play {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: 0;
    margin-right: 0;
  }

  /* 装饰主标题 + 长文 SEO 区 */
  .page-game-bai__section-title {
    font-size: clamp(20px, 6vw, 28px);
    text-align: center;
    margin-left: 15px;
    margin-right: 15px;
  }
  .page-game-bai__article-body {
    font-size: 15px;
    padding: 0 15px;
    max-width: 100%;
    box-sizing: border-box;
  }
  .page-game-bai__article-body img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* 通用图片与容器 */
  .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,
  .page-game-bai__provider-grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-game-bai__provider-grid {
    grid-template-columns: 1fr;
  }
  .page-game-bai__provider-logo {
    max-width: 100px;
  }

  /* 按钮与按钮容器 */
  .page-game-bai__cta-buttons {
    flex-direction: column; /* 移动端垂直排列 */
    gap: 10px;
    padding: 0 15px;
  }
  .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;
  }

  /* FAQ Section */
  details.page-game-bai__faq-item summary.page-game-bai__faq-question {
    padding: 15px;
  }
  .page-game-bai__faq-qtext {
    font-size: 15px;
  }
  .page-game-bai__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
    margin-left: 10px;
  }
  details.page-game-bai__faq-item .page-game-bai__faq-answer {
    padding: 0 15px 15px;
  }

  .page-game-bai__introduction-section,
  .page-game-bai__guide-section,
  .page-game-bai__providers-section,
  .page-game-bai__faq-section,
  .page-game-bai__dark-bg,
  .page-game-bai__cta-bottom-section {
    padding: 40px 0;
  }
}