/* Base styles for the Game Bai page */
.page-game-bai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background: var(--background-color, #f8f8f8);
}

/* Ensure sections have proper spacing */
.page-game-bai section {
  padding: 40px 0;
}

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

/* Hero Section */
.page-game-bai__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding to avoid double header offset */
  color: #FFF5E1; /* Light text for dark hero */
  text-align: center;
  background: #B71C1C; /* Deep Red background for hero section */
  overflow: hidden;
}

.page-game-bai__hero-image-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
}

.page-game-bai__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.page-game-bai__hero-content-wrapper {
  position: relative;
  z-index: 10;
  padding: 40px 0 60px;
}

.page-game-bai__hero-title {
  font-size: clamp(2.2em, 4vw, 3.5em);
  font-weight: 700;
  margin-bottom: 20px;
  color: #FFD86A; /* Gold color for title */
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-game-bai__hero-description {
  font-size: clamp(1em, 1.8vw, 1.25em);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #FFF5E1;
}

.page-game-bai__hero-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* Section Titles and Descriptions */
.page-game-bai__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.8em);
  color: #C91F17; /* Primary brand red */
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.page-game-bai__section-description {
  font-size: clamp(0.95em, 1.5vw, 1.1em);
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px;
  color: #555;
}

/* Dark Section Specifics */
.page-game-bai__dark-section {
  background: #B71C1C; /* Deep Red */
  color: #FFF5E1; /* Light text */
}

.page-game-bai__dark-section .page-game-bai__section-title {
  color: #FFD86A; /* Gold title on dark background */
}

.page-game-bai__dark-section .page-game-bai__section-description,
.page-game-bai__dark-section .page-game-bai__text-block {
  color: #FFF5E1;
}

/* Text Block */
.page-game-bai__text-block {
  font-size: 1.05em;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* Buttons */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-bai__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  color: #7A0E0E; /* Deep Red text for gold button */
  border: 2px solid #F4D34D;
  box-shadow: 0 4px 15px rgba(255, 204, 102, 0.4);
}

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

.page-game-bai__btn-secondary {
  background: transparent;
  color: #FFD86A; /* Gold text */
  border: 2px solid #FFD86A;
  box-shadow: 0 2px 8px rgba(255, 216, 106, 0.2);
}

.page-game-bai__btn-secondary:hover {
  background: rgba(255, 216, 106, 0.1);
  color: #F4D34D;
  border-color: #F4D34D;
  transform: translateY(-2px);
}

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

.page-game-bai__game-card {
  background: #D32F2F; /* Card Background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #FFF5E1; /* Light text for card content */
  border: 1px solid #7A0E0E;
}

.page-game-bai__game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.page-game-bai__game-card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-bottom: 1px solid #7A0E0E;
}

.page-game-bai__game-card-title {
  font-size: 1.5em;
  color: #FFD86A; /* Gold title */
  margin: 20px 15px 10px;
  font-weight: 700;
}

.page-game-bai__game-card-description {
  font-size: 0.95em;
  padding: 0 15px 20px;
  line-height: 1.6;
}

.page-game-bai__game-card-button {
  margin-bottom: 20px;
  padding: 10px 20px;
  font-size: 1em;
}

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

.page-game-bai__feature-item {
  background: #D32F2F; /* Card Background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #FFF5E1;
  border: 1px solid #7A0E0E;
}

.page-game-bai__feature-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.page-game-bai__feature-image {
  width: 100%;
  height: 220px; /* Fixed height for feature images */
  object-fit: cover;
  margin-bottom: 20px;
  border-bottom: 1px solid #7A0E0E;
}

.page-game-bai__feature-title {
  font-size: 1.4em;
  color: #FFD86A; /* Gold title */
  margin: 0 15px 10px;
  font-weight: 700;
}

.page-game-bai__feature-text {
  font-size: 0.95em;
  padding: 0 15px;
  line-height: 1.6;
}

/* How to Play Steps */
.page-game-bai__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-game-bai__step-item {
  text-align: center;
  padding: 25px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e0e0e0;
}

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

.page-game-bai__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #C91F17; /* Primary Red */
  color: #FFF5E1;
  border-radius: 50%;
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(201, 31, 23, 0.4);
}

.page-game-bai__step-title {
  font-size: 1.3em;
  color: #C91F17; /* Primary Red */
  margin-bottom: 10px;
  font-weight: 700;
}

.page-game-bai__step-text {
  font-size: 0.95em;
  color: #555;
}

/* Promotion List */
.page-game-bai__promo-list {
  list-style: none;
  padding: 0;
  margin: 40px auto 0;
  max-width: 900px;
}

.page-game-bai__promo-item {
  background: #D32F2F; /* Card Background */
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  font-size: 1.05em;
  color: #FFF5E1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  position: relative;
  padding-left: 40px;
  border: 1px solid #7A0E0E;
}

.page-game-bai__promo-item::before {
  content: '★';
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #FFD86A; /* Gold star */
  font-size: 1.2em;
}

/* FAQ Section */
details.page-game-bai__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
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: #C91F17; /* Primary Red for question */
}
.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 8px 8px;
  color: #555;
}

/* CTA Bottom Section */
.page-game-bai__cta-bottom {
  margin-top: 40px;
}

.page-game-bai__cta-final-section {
  padding-bottom: 60px;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-game-bai__hero-title {
    font-size: clamp(2em, 4.5vw, 3em);
  }
  .page-game-bai__hero-description {
    font-size: clamp(0.95em, 1.8vw, 1.15em);
  }
  .page-game-bai__section-title {
    font-size: clamp(1.6em, 3vw, 2.5em);
  }
  .page-game-bai__game-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  .page-game-bai__features-grid,
  .page-game-bai__steps-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-game-bai__hero-section {
    padding-top: 10px;
  }
  .page-game-bai__hero-image {
    object-fit: contain !important;
    aspect-ratio: unset !important;
    position: static;
    height: auto;
    width: 100%;
    opacity: 1;
  }
  .page-game-bai__hero-image-wrapper {
    padding-bottom: 0;
    height: auto;
  }
  .page-game-bai__hero-content-wrapper {
    padding: 30px 0 40px;
  }
  .page-game-bai__hero-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
    margin-bottom: 15px;
  }
  .page-game-bai__hero-description {
    font-size: clamp(0.9em, 4vw, 1.1em);
    margin-bottom: 25px;
  }
  .page-game-bai__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
  }

  /* 通用容器和图片 */
  .page-game-bai__container {
    padding: 0 15px;
  }
  .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;
  }
  
  /* 产品展示图区域 (Game Grid) */
  .page-game-bai__game-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    overflow-x: hidden;
  }
  .page-game-bai__game-card {
    margin: 0 auto;
    max-width: 400px;
  }
  .page-game-bai__game-card-image {
    height: 180px;
  }

  /* 装饰主标题 + 长文 SEO 区 */
  .page-game-bai__section-title {
    font-size: clamp(1.5em, 6vw, 2em);
    margin-bottom: 15px;
  }
  .page-game-bai__section-description,
  .page-game-bai__text-block {
    font-size: 0.9em;
    margin-bottom: 15px;
    text-align: left;
  }

  /* 按钮与按钮容器 */
  .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: 12px 15px;
    font-size: 1em;
  }
  .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;
    flex-direction: column;
  }

  /* Feature Grid */
  .page-game-bai__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-game-bai__feature-item {
    max-width: 400px;
    margin: 0 auto;
  }
  .page-game-bai__feature-image {
    height: 180px;
  }

  /* Steps Grid */
  .page-game-bai__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-game-bai__step-item {
    max-width: 400px;
    margin: 0 auto;
  }
  .page-game-bai__step-number {
    width: 50px;
    height: 50px;
    font-size: 1.8em;
    margin-bottom: 15px;
  }
  .page-game-bai__step-title {
    font-size: 1.2em;
  }

  /* Promo List */
  .page-game-bai__promo-item {
    font-size: 0.95em;
    padding: 15px 15px 15px 40px;
  }

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