.page-tai-xiu {
  font-family: Arial, sans-serif;
  color: #333333; /* Default dark text for light body background */
  background-color: #ffffff;
}

.page-tai-xiu__hero-section {
  padding-top: 10px; /* Small top padding to avoid double header offset */
  padding-bottom: 60px;
  background: linear-gradient(to right, #e0ffe0, #ffffff);
}

.page-tai-xiu__hero-container {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 40px 16px;
  gap: 24px;
}

.page-tai-xiu__hero-content {
  flex: 1 1 45%;
  min-width: 300px;
  color: #333333;
}

.page-tai-xiu__main-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: #017439;
  margin-bottom: 20px;
}

.page-tai-xiu__intro-description {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.page-tai-xiu__cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-tai-xiu__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

.page-tai-xiu__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
}

.page-tai-xiu__btn-secondary {
  background-color: transparent;
  color: #017439;
  border: 2px solid #017439;
}

.page-tai-xiu__btn-secondary:hover {
  background-color: #017439;
  color: #ffffff;
}

.page-tai-xiu__hero-image {
  flex: 1 1 45%;
  text-align: center;
  min-width: 300px;
}

.page-tai-xiu__hero-side-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  display: block;
}

.page-tai-xiu__content-area {
  max-width: 1170px;
  margin: 0 auto;
  padding: 60px 16px;
}

.page-tai-xiu__section-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: #017439;
  text-align: center;
  margin-bottom: 20px;
}

.page-tai-xiu__section-description {
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #555555;
}

.page-tai-xiu__dark-section {
  background-color: #017439;
  color: #ffffff;
}

.page-tai-xiu__dark-section .page-tai-xiu__section-title,
.page-tai-xiu__dark-section .page-tai-xiu__section-description,
.page-tai-xiu__dark-section .page-tai-xiu__feature-title,
.page-tai-xiu__dark-section .page-tai-xiu__feature-text,
.page-tai-xiu__dark-section .page-tai-xiu__sub-title,
.page-tai-xiu__dark-section .page-tai-xiu__promo-list li {
  color: #ffffff;
}

/* Intro Section (Module 1) */
.page-tai-xiu__intro-section {
  padding: 60px 0;
}

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

.page-tai-xiu__feature-item {
  text-align: center;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-tai-xiu__icon-box-media {
  width: 240px;
  height: 240px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #ffffff;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.2);
}

.page-tai-xiu__icon-box-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.page-tai-xiu__feature-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #ffffff;
}

.page-tai-xiu__feature-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #f0f0f0;
}

/* Game Info, Strategy, How To Play, Promo Sections */
.page-tai-xiu__game-info-section,
.page-tai-xiu__strategy-section,
.page-tai-xiu__how-to-play-section,
.page-tai-xiu__promo-section {
  padding: 60px 0;
}

.page-tai-xiu__content-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 40px auto;
  display: block;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-tai-xiu__sub-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #017439;
  margin-top: 40px;
  margin-bottom: 15px;
  text-align: left;
}

.page-tai-xiu__dark-section .page-tai-xiu__sub-title {
  color: #ffffff;
}

.page-tai-xiu p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: left;
}

.page-tai-xiu__ordered-list,
.page-tai-xiu__promo-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 30px;
}

.page-tai-xiu__ordered-list li {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 10px;
  padding-left: 30px;
  position: relative;
  color: #333333;
}

.page-tai-xiu__ordered-list li strong {
  color: #017439;
}

.page-tai-xiu__ordered-list li::before {
  content: counter(list-item) ". ";
  counter-increment: list-item;
  position: absolute;
  left: 0;
  font-weight: bold;
  color: #017439;
}

.page-tai-xiu__promo-list li {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 10px;
  padding-left: 30px;
  position: relative;
  color: #ffffff;
}

.page-tai-xiu__promo-list li::before {
  content: "\2713"; /* Checkmark */
  position: absolute;
  left: 0;
  color: #FFFF00; /* Yellow for highlights */
  font-weight: bold;
  font-size: 1.2rem;
  top: 0;
}

.page-tai-xiu__btn-inline {
  margin-top: 20px;
  display: inline-flex;
}

.page-tai-xiu__step-by-step {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-tai-xiu__step-item {
  background-color: #f9f9f9;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-tai-xiu__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: #017439;
  color: #ffffff;
  border-radius: 50%;
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 20px;
}

.page-tai-xiu__step-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #017439;
  margin-bottom: 10px;
}

.page-tai-xiu__step-item p {
  font-size: 1rem;
  line-height: 1.6;
  color: #555555;
  text-align: center;
}

.page-tai-xiu__cta-buttons--center {
  justify-content: center;
  margin-top: 40px;
}

/* FAQ Section */
.page-tai-xiu__faq-section {
  padding: 60px 0;
}

.page-tai-xiu__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-tai-xiu__faq-item {
  background-color: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-tai-xiu__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background-color: #ffffff;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 600;
  color: #017439;
  border-bottom: 1px solid #e0e0e0;
  list-style: none; /* For details/summary */
}

.page-tai-xiu__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker */
}

.page-tai-xiu__faq-qtext {
  flex-grow: 1;
}

.page-tai-xiu__faq-toggle {
  font-size: 1.8rem;
  font-weight: bold;
  color: #017439;
  margin-left: 15px;
  user-select: none;
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-question {
  background-color: #e0ffe0;
}

.page-tai-xiu__faq-answer {
  padding: 15px 25px 20px;
  font-size: 1rem;
  line-height: 1.7;
  color: #555555;
  background-color: #f0fff0;
}

/* Final CTA Section */
.page-tai-xiu__cta-section {
  padding: 80px 0;
  text-align: center;
}

.page-tai-xiu__cta-content {
  max-width: 900px;
  margin: 0 auto;
}

/* General image responsiveness */
.page-tai-xiu img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-tai-xiu__hero-container {
    flex-direction: column;
    text-align: center;
  }

  .page-tai-xiu__hero-content,
  .page-tai-xiu__hero-image {
    flex: 1 1 100%;
    max-width: 700px;
  }

  .page-tai-xiu__main-title,
  .page-tai-xiu__intro-description {
    text-align: center;
  }

  .page-tai-xiu__cta-buttons {
    justify-content: center;
  }

  .page-tai-xiu__icon-box-media {
    width: 200px;
    height: 200px;
  }

  .page-tai-xiu__features-grid,
  .page-tai-xiu__step-by-step {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .page-tai-xiu__section-title {
    font-size: 2.2rem;
  }

  .page-tai-xiu__sub-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .page-tai-xiu__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
  }

  .page-tai-xiu__hero-container {
    padding: 30px 15px;
    gap: 20px;
  }

  .page-tai-xiu__main-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-tai-xiu__intro-description {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .page-tai-xiu__cta-buttons {
    flex-direction: column !important;
    gap: 10px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }

  .page-tai-xiu__btn-primary,
  .page-tai-xiu__btn-secondary,
  .page-tai-xiu a[class*="button"],
  .page-tai-xiu 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 !important;
    font-size: 0.95rem !important;
  }

  .page-tai-xiu__content-area,
  .page-tai-xiu__section,
  .page-tai-xiu__card,
  .page-tai-xiu__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-tai-xiu__content-area {
    padding: 40px 15px;
  }

  .page-tai-xiu__section-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }

  .page-tai-xiu__section-description {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }

  .page-tai-xiu__features-grid,
  .page-tai-xiu__step-by-step {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-tai-xiu__feature-item {
    padding: 15px;
  }

  .page-tai-xiu__icon-box-media {
    width: 180px;
    height: 180px;
    margin-bottom: 15px;
    border-width: 3px;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);
  }

  .page-tai-xiu__feature-title {
    font-size: 1.3rem;
  }

  .page-tai-xiu__feature-text {
    font-size: 0.9rem;
  }

  .page-tai-xiu__content-image {
    margin: 30px auto;
  }

  .page-tai-xiu__sub-title {
    font-size: 1.4rem;
    margin-top: 30px;
  }

  .page-tai-xiu p,
  .page-tai-xiu__ordered-list li,
  .page-tai-xiu__promo-list li {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }

  .page-tai-xiu__ordered-list li::before,
  .page-tai-xiu__promo-list li::before {
    font-size: 1rem;
  }

  .page-tai-xiu__step-number {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    margin-bottom: 15px;
  }

  .page-tai-xiu__step-title {
    font-size: 1.2rem;
  }

  .page-tai-xiu__faq-question {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .page-tai-xiu__faq-toggle {
    font-size: 1.5rem;
  }

  .page-tai-xiu__faq-answer {
    padding: 10px 20px 15px;
    font-size: 0.95rem;
  }

  .page-tai-xiu__cta-section {
    padding: 50px 0;
  }

  .page-tai-xiu__cta-content {
    padding: 0 15px;
  }

  .page-tai-xiu img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Special handling for circular images in Module 1 */
  .page-tai-xiu__icon-box-media img {
    height: 100% !important;
    object-fit: cover !important;
  }
}