/* Base styles for the Game Bài page */
.page-game-bai {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--background-color, #f8f8f8); /* Inherit from shared or default light */
}

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

.page-game-bai__section {
  padding: 60px 0;
  text-align: center;
}

.page-game-bai__dark-section {
  background: #B71C1C; /* Custom background color */
  color: #FFF5E1; /* Custom text color for dark backgrounds */
}

.page-game-bai__light-bg {
  background: #ffffff; /* Explicitly white for clear contrast */
  color: #333333;
}

.page-game-bai__section-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 40px;
  color: inherit; /* Inherit from parent section */
}

.page-game-bai__section-title--gold {
  color: #F4D34D; /* Custom gold text color */
}

.page-game-bai__intro-text {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* HERO Section */
.page-game-bai__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.page-game-bai__hero-image-container {
  width: 100%;
  height: 100%;
  position: relative;
  margin-bottom: 20px;
}

.page-game-bai__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16/9;
  border-radius: 8px;
}

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

.page-game-bai__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #FFF5E1; /* Custom text color */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-game-bai__hero-description {
  font-size: 20px;
  color: #FFF5E1; /* Custom text color */
  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; /* Allow wrapping on smaller screens */
}

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  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: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Custom button color */
  color: #7A0E0E; /* Deep Red text for contrast */
  border: none;
  box-shadow: 0 4px 15px rgba(255, 216, 106, 0.4);
}

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

.page-game-bai__btn-secondary {
  background: #D32F2F; /* Card BG color */
  color: #FFF5E1; /* Custom text color */
  border: 2px solid #F2B544; /* Custom border color */
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
}

.page-game-bai__btn-secondary:hover {
  transform: translateY(-2px);
  background: #E53935; /* Auxiliary color on hover */
  box-shadow: 0 6px 20px rgba(211, 47, 47, 0.6);
}

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

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

/* Article Body / Generic Content Area */
.page-game-bai__content-area {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.page-game-bai__article-body p {
  margin-bottom: 20px;
  font-size: 17px;
  line-height: 1.7;
  color: inherit;
}

.page-game-bai__text-main p {
  color: #FFF5E1;
}

.page-game-bai__article-figure {
  width: 100%;
  height: auto;
  max-width: 800px;
  margin: 30px auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Feature List (Why Choose) */
.page-game-bai__feature-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-game-bai__feature-item {
  background: #D32F2F; /* Card BG color */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  text-align: left;
  border: 1px solid #F2B544; /* Border color */
  color: #FFF5E1; /* Text Main color */
}

.page-game-bai__feature-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #F4D34D; /* Gold text color */
}

.page-game-bai__feature-item p {
  font-size: 16px;
  line-height: 1.6;
  color: #FFF5E1;
}

/* Popular Games Grid */
.page-game-bai__games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-game-bai__game-card {
  background: #D32F2F; /* Card BG color */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
  text-align: center;
  padding-bottom: 20px;
  border: 1px solid #F2B544; /* Border color */
  color: #FFF5E1; /* Text Main color */
}

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

.page-game-bai__game-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #F4D34D; /* Gold text color */
}

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

.page-game-bai__btn-link {
  display: inline-block;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Custom button color */
  color: #7A0E0E; /* Deep Red text for contrast */
  padding: 10px 25px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.page-game-bai__btn-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 216, 106, 0.5);
}

/* Guide List */
.page-game-bai__guide-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
}

.page-game-bai__guide-item {
  background: #ffffff;
  padding: 25px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-left: 5px solid #C91F17; /* Main color as accent */
  text-align: left;
}

.page-game-bai__guide-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #C91F17; /* Main color */
}

.page-game-bai__guide-item p {
  font-size: 16px;
  color: #555555;
}

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

.page-game-bai__promo-card {
  background: #D32F2F; /* Card BG color */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  text-align: center;
  padding-bottom: 20px;
  border: 1px solid #F2B544; /* Border color */
  color: #FFF5E1; /* Text Main color */
}

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

.page-game-bai__promo-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #F4D34D; /* Gold text color */
}

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

/* Tips Section */
.page-game-bai__tips-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.page-game-bai__tips-item {
  background: #ffffff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  text-align: left;
  border: 1px solid #e0e0e0;
}

.page-game-bai__tips-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #C91F17; /* Main color */
}

.page-game-bai__tips-item p {
  font-size: 16px;
  color: #555555;
}

/* FAQ Section */
details.page-game-bai__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: left;
}
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: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}
.page-game-bai__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #C91F17; /* Main color for toggle */
  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 8px 8px;
  color: #555555;
  font-size: 16px;
}

/* Conclusion Section */
.page-game-bai__conclusion-section {
  padding-bottom: 80px;
}

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

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

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

  .page-game-bai__hero-description {
    font-size: 18px;
  }

  .page-game-bai__feature-list,
  .page-game-bai__games-grid,
  .page-game-bai__promo-grid,
  .page-game-bai__tips-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
  }

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

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

@media (max-width: 768px) {
  .page-game-bai__container {
    padding: 0 15px !important; /* Force padding for mobile content */
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  /* HERO 主图区域 */
  .page-game-bai__hero-section {
    padding-top: 10px; /* Small top padding */
    padding-bottom: 30px;
  }

  .page-game-bai__hero-image-container {
    margin-bottom: 15px;
  }

  .page-game-bai__hero-image {
    object-fit: contain !important; /* Prevent cropping on mobile */
    aspect-ratio: unset !important; /* Allow natural aspect ratio */
    width: 100% !important;
    height: auto !important;
  }

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

  .page-game-bai__main-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-game-bai__hero-description {
    font-size: 16px;
    margin-bottom: 25px;
  }

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

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

  /* 装饰主标题 + 长文 SEO 区 */
  .page-game-bai__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .page-game-bai__intro-text {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-game-bai__content-area, .page-game-bai__article-body {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 10px;
    box-sizing: border-box !important;
  }

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

  .page-game-bai__article-figure {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 20px auto !important;
    box-sizing: border-box !important;
  }

  /* 产品展示图区域 (Game Cards) */
  .page-game-bai__games-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for game cards */
    gap: 15px;
    overflow-x: hidden !important;
    padding: 0 10px;
  }
  .page-game-bai__game-card {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-game-bai__game-image {
    height: 150px; /* Adjust height for mobile */
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: cover;
  }
  .page-game-bai__game-title {
    font-size: 18px;
  }
  .page-game-bai__game-description {
    font-size: 14px;
    padding: 0 10px;
  }
  .page-game-bai__btn-link {
    font-size: 14px;
    padding: 8px 15px;
  }

  .page-game-bai__feature-list,
  .page-game-bai__promo-grid,
  .page-game-bai__tips-list {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 10px;
  }

  .page-game-bai__feature-item,
  .page-game-bai__guide-item,
  .page-game-bai__promo-card,
  .page-game-bai__tips-item {
    padding: 20px;
  }

  .page-game-bai__feature-title,
  .page-game-bai__guide-title,
  .page-game-bai__promo-title,
  .page-game-bai__tips-title {
    font-size: 18px;
  }

  .page-game-bai__feature-item p,
  .page-game-bai__guide-item p,
  .page-game-bai__promo-description,
  .page-game-bai__tips-item p {
    font-size: 15px;
  }

  .page-game-bai__promo-image {
    height: 180px;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  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;
    margin-left: 10px;
  }
  details.page-game-bai__faq-item .page-game-bai__faq-answer {
    padding: 0 15px 15px;
  }
}