/* Base styles for the page-ban-ca */
.page-ban-ca {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main); /* Light text on dark body background */
  background-color: var(--background); /* Dark background from custom palette */
}

.page-ban-ca__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 15px;
}

.page-ban-ca__section {
  padding: 60px 0;
  text-align: center;
}

.page-ban-ca__section--light {
  background-color: #f8f8f8;
  color: #333333;
}

.page-ban-ca__dark-section {
  background-color: var(--card-bg); /* Darker background for contrast sections */
  color: var(--text-main);
}

.page-ban-ca__section-title {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 30px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
}

.page-ban-ca__section-title--light {
  color: var(--gold);
}

.page-ban-ca__text-block {
  font-size: 17px;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-main);
}

.page-ban-ca__text-block a {
  color: var(--gold);
  text-decoration: underline;
}

/* Hero Section */
.page-ban-ca__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  background-color: var(--card-bg);
  overflow: hidden;
}

.page-ban-ca__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.page-ban-ca__hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Darken image for text readability */
}

.page-ban-ca__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  text-align: center;
  color: var(--text-main);
  padding: 20px;
}

.page-ban-ca__main-title {
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--gold);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-ban-ca__description {
  font-size: 19px;
  margin-bottom: 40px;
  color: var(--text-main);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

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

.page-ban-ca__btn-primary,
.page-ban-ca__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%;
}

.page-ban-ca__btn-primary {
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 176, 74, 0.4);
}

.page-ban-ca__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 176, 74, 0.6);
}

.page-ban-ca__btn-secondary {
  background: var(--deep-red);
  color: var(--text-main);
  border: 2px solid var(--gold);
}

.page-ban-ca__btn-secondary:hover {
  background: var(--gold);
  color: var(--deep-red);
  transform: translateY(-2px);
}

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

.page-ban-ca__card {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  text-align: left;
  color: var(--text-main);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-ban-ca__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-ban-ca__feature-title,
.page-ban-ca__game-title,
.page-ban-ca__step-title,
.page-ban-ca__tip-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--gold);
}

.page-ban-ca__feature-description,
.page-ban-ca__game-description,
.page-ban-ca__step-description,
.page-ban-ca__tip-description {
  font-size: 16px;
  color: var(--text-main);
}

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

.page-ban-ca__game-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-ban-ca__game-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 2px solid var(--border);
}

.page-ban-ca__game-card .page-ban-ca__btn-primary {
  margin-top: auto; /* Push button to bottom */
  width: fit-content;
  padding: 12px 25px;
  font-size: 16px;
}

/* How To Play */
.page-ban-ca__step-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-ban-ca__step-item {
  background-color: var(--background);
  padding: 25px;
  border-radius: 10px;
  text-align: left;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-ban-ca__step-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-ban-ca__step-title {
  color: var(--gold);
  font-size: 22px;
  margin-bottom: 10px;
}

/* Promotions */
.page-ban-ca__promotion-banner {
  width: 100%;
  max-width: 800px;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  margin: 30px auto;
  border: 2px solid var(--gold);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.page-ban-ca__promo-list {
  list-style: none;
  padding: 0;
  margin: 30px auto;
  max-width: 800px;
  text-align: left;
  color: var(--text-main);
}

.page-ban-ca__promo-item {
  background-color: var(--card-bg);
  padding: 15px 20px;
  margin-bottom: 10px;
  border-radius: 8px;
  border-left: 5px solid var(--gold);
  font-size: 17px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* App Download */
.page-ban-ca__app-container {
  display: flex;
  align-items: center;
  gap: 50px;
  text-align: left;
}

.page-ban-ca__app-text-content {
  flex: 1;
}

.page-ban-ca__app-image {
  flex-shrink: 0;
  width: 400px;
}

.page-ban-ca__app-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 15px;
  border: 3px solid var(--gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.page-ban-ca__app-buttons {
  margin-top: 30px;
  justify-content: flex-start;
}

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

.page-ban-ca__tip-item {
  background-color: var(--card-bg);
  padding: 25px;
  border-radius: 10px;
  text-align: left;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-ban-ca__tip-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
details.page-ban-ca__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--background);
  color: var(--text-main);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
details.page-ban-ca__faq-item summary.page-ban-ca__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  color: var(--gold);
  font-weight: 600;
}
details.page-ban-ca__faq-item summary.page-ban-ca__faq-question::-webkit-details-marker {
  display: none;
}
details.page-ban-ca__faq-item summary.page-ban-ca__faq-question:hover {
  background: var(--deep-red);
  color: #fff;
}
.page-ban-ca__faq-qtext {
  flex: 1;
  font-size: 18px;
  line-height: 1.5;
  text-align: left;
}
.page-ban-ca__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold);
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
  transition: transform 0.3s ease, color 0.3s ease;
}
details.page-ban-ca__faq-item[open] .page-ban-ca__faq-toggle {
  transform: rotate(45deg);
  color: #fff;
}
details.page-ban-ca__faq-item .page-ban-ca__faq-answer {
  padding: 0 25px 25px;
  background: var(--card-bg);
  border-radius: 0 0 10px 10px;
  text-align: left;
  font-size: 16px;
}

.page-ban-ca__faq-answer p {
  margin: 0;
  color: var(--text-main);
}

/* Conclusion */
.page-ban-ca__conclusion .page-ban-ca__section-title {
  color: var(--gold);
}

.page-ban-ca__conclusion .page-ban-ca__text-block {
  color: var(--text-main);
}

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

  .page-ban-ca__main-title {
    font-size: clamp(34px, 5vw, 50px);
  }

  .page-ban-ca__description {
    font-size: 17px;
    margin-bottom: 30px;
  }

  .page-ban-ca__app-container {
    flex-direction: column;
    gap: 30px;
  }

  .page-ban-ca__app-text-content {
    text-align: center;
  }

  .page-ban-ca__app-buttons {
    justify-content: center;
  }

  .page-ban-ca__app-image {
    width: 80%;
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .page-ban-ca__section {
    padding: 40px 0;
  }

  .page-ban-ca__container {
    padding: 0 15px !important; /* Ensure padding for containers */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-ban-ca__section-title {
    font-size: clamp(24px, 6vw, 36px);
    margin-bottom: 20px;
  }

  .page-ban-ca__text-block {
    font-size: 15px;
    padding: 0 10px;
  }

  /* HERO 主图区域 */
  .page-ban-ca__hero-section {
    padding-top: 10px; /* Small top padding */
    min-height: 450px;
  }

  .page-ban-ca__hero-image img {
    object-fit: contain !important; /* Mobile: contain to avoid cropping */
    aspect-ratio: unset !important;
    filter: brightness(0.6); /* Slightly less dark for mobile */
  }

  .page-ban-ca__main-title {
    font-size: clamp(30px, 7vw, 40px);
    margin-bottom: 15px;
  }

  .page-ban-ca__description {
    font-size: 16px;
    margin-bottom: 25px;
  }

  /* 按钮与按钮容器 */
  .page-ban-ca__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }

  .page-ban-ca__btn-primary,
  .page-ban-ca__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* 产品展示图区域 (features-grid, game-grid) */
  .page-ban-ca__features-grid,
  .page-ban-ca__game-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px; /* Ensure padding for grid containers */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden; /* Prevent horizontal scroll */
  }

  .page-ban-ca__card {
    padding: 20px;
  }

  .page-ban-ca__feature-title,
  .page-ban-ca__game-title,
  .page-ban-ca__step-title,
  .page-ban-ca__tip-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  /* Hướng Dẫn Chơi (How-to-play) */
  .page-ban-ca__step-list {
    gap: 20px;
    padding: 0 15px; /* Ensure padding for list containers */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-ban-ca__step-item {
    padding: 20px;
  }

  /* Promotions */
  .page-ban-ca__promotion-banner {
    margin: 20px auto;
    width: calc(100% - 30px); /* Adjust for container padding */
  }

  .page-ban-ca__promo-list {
    padding: 0 15px;
    margin: 20px auto;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-ban-ca__promo-item {
    font-size: 15px;
    padding: 12px 15px;
  }

  /* App Download */
  .page-ban-ca__app-container {
    padding: 0 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-ban-ca__app-image {
    width: calc(100% - 30px); /* Adjust for container padding */
    margin: 0 auto;
  }

  .page-ban-ca__app-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Tips List */
  .page-ban-ca__tip-list {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px; /* Ensure padding for list containers */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-ban-ca__tip-item {
    padding: 20px;
  }

  /* FAQ Section */
  details.page-ban-ca__faq-item {
    margin-bottom: 10px;
    border-radius: 8px;
    width: calc(100% - 30px); /* Adjust for container padding */
    margin-left: auto;
    margin-right: auto;
  }
  details.page-ban-ca__faq-item summary.page-ban-ca__faq-question {
    padding: 15px 20px;
  }
  .page-ban-ca__faq-qtext {
    font-size: 16px;
  }
  .page-ban-ca__faq-toggle {
    font-size: 24px;
    width: 25px;
  }
  details.page-ban-ca__faq-item .page-ban-ca__faq-answer {
    padding: 0 20px 20px;
    font-size: 15px;
  }

  /* General Image Responsiveness */
  .page-ban-ca img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-ban-ca__section,
  .page-ban-ca__card,
  .page-ban-ca__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-ban-ca__game-thumbnail {
    height: 180px;
  }
}

/* Custom Colors */
:root {
  --primary-color: #C61F1F;
  --secondary-color: #E53030;
  --button-gradient: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
  --card-bg: #2A1212;
  --background: #140C0C;
  --text-main: #FFF1E8;
  --border: #6A1E1E;
  --gold: #F3C54D;
  --deep-red: #7E0D0D;
}