/* Biến màu sắc */
:root {
    --page-tai-xiu-primary-color: #F2C14E;
    --page-tai-xiu-secondary-color: #FFD36B;
    --page-tai-xiu-card-bg: #111111;
    --page-tai-xiu-bg: #0A0A0A;
    --page-tai-xiu-text-main: #FFF6D6;
    --page-tai-xiu-border-color: #3A2A12;
    --page-tai-xiu-glow-color: #FFD36B;
    --page-tai-xiu-btn-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
}

/* Base styles for the page */
.page-tai-xiu {
    background-color: var(--page-tai-xiu-bg);
    color: var(--page-tai-xiu-text-main);
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.page-tai-xiu__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-tai-xiu__section-padding {
    padding: 60px 0;
}

.page-tai-xiu__section-title {
    font-size: 38px;
    font-weight: bold;
    color: var(--page-tai-xiu-primary-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-tai-xiu__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--page-tai-xiu-secondary-color);
    border-radius: 2px;
}

.page-tai-xiu__text-block {
    font-size: 18px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 25px;
    color: var(--page-tai-xiu-text-main);
}

.page-tai-xiu__content-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--page-tai-xiu-border-color);
}

.page-tai-xiu__dark-section {
    background-color: var(--page-tai-xiu-card-bg);
}

/* Hero Section */
.page-tai-xiu__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, shared.css handles body padding */
    overflow: hidden;
    background-color: var(--page-tai-xiu-bg);
}

.page-tai-xiu__hero-image-wrapper {
    width: 100%;
    height: 600px; /* Fixed height for desktop hero */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-tai-xiu__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover for desktop */
    display: block;
}

.page-tai-xiu__hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 15px 60px;
    max-width: 900px;
    margin: 0 auto;
}

.page-tai-xiu__main-title {
    font-size: clamp(36px, 4vw, 56px);
    font-weight: 900;
    color: var(--page-tai-xiu-secondary-color);
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 0 15px rgba(255, 211, 107, 0.6);
}

.page-tai-xiu__hero-description {
    font-size: 20px;
    color: var(--page-tai-xiu-text-main);
    max-width: 800px;
    margin: 0 auto 30px;
}

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

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

.page-tai-xiu__btn-primary {
    background: var(--page-tai-xiu-btn-gradient);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 5px 15px rgba(242, 193, 78, 0.4);
}

.page-tai-xiu__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(242, 193, 78, 0.6);
}

.page-tai-xiu__btn-secondary {
    background: transparent;
    color: var(--page-tai-xiu-secondary-color);
    border: 2px solid var(--page-tai-xiu-secondary-color);
    box-shadow: 0 0 10px rgba(255, 211, 107, 0.3);
}

.page-tai-xiu__btn-secondary:hover {
    background: var(--page-tai-xiu-secondary-color);
    color: var(--page-tai-xiu-bg);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 211, 107, 0.5);
}

/* Introduction Section */
.page-tai-xiu__introduction-section {
    background-color: var(--page-tai-xiu-bg);
}

/* How To Play Section */
.page-tai-xiu__how-to-play-section .page-tai-xiu__ordered-list {
    list-style: none;
    padding: 0;
    max-width: 900px;
    margin: 0 auto 30px;
    text-align: left;
}

.page-tai-xiu__how-to-play-section .page-tai-xiu__ordered-list li {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--page-tai-xiu-border-color);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-size: 17px;
    color: var(--page-tai-xiu-text-main);
    position: relative;
    padding-left: 60px;
}

.page-tai-xiu__how-to-play-section .page-tai-xiu__ordered-list li::before {
    content: counter(list-item);
    counter-increment: list-item;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: var(--page-tai-xiu-primary-color);
    color: var(--page-tai-xiu-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

/* Bet Types Section */
.page-tai-xiu__bet-types-section .page-tai-xiu__unordered-list {
    list-style: none;
    padding: 0;
    max-width: 900px;
    margin: 0 auto 30px;
    text-align: left;
}

.page-tai-xiu__bet-types-section .page-tai-xiu__unordered-list li {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--page-tai-xiu-border-color);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 17px;
    color: var(--page-tai-xiu-text-main);
}

.page-tai-xiu__bet-types-section .page-tai-xiu__unordered-list strong {
    color: var(--page-tai-xiu-secondary-color);
}

/* Tips Section */
.page-tai-xiu__tips-section .page-tai-xiu__unordered-list {
    list-style: none;
    padding: 0;
    max-width: 900px;
    margin: 0 auto 30px;
    text-align: left;
}

.page-tai-xiu__tips-section .page-tai-xiu__unordered-list li {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--page-tai-xiu-border-color);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 17px;
    color: var(--page-tai-xiu-text-main);
}

.page-tai-xiu__tips-section .page-tai-xiu__unordered-list strong {
    color: var(--page-tai-xiu-secondary-color);
}

/* Advantages Section */
.page-tai-xiu__advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 40px auto 0;
}

.page-tai-xiu__advantage-card.page-tai-xiu__card {
    background-color: var(--page-tai-xiu-card-bg);
    border: 1px solid var(--page-tai-xiu-border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--page-tai-xiu-text-main);
    display: flex;
    flex-direction: column;
    text-align: center;
}

.page-tai-xiu__advantage-card.page-tai-xiu__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-tai-xiu__card-image {
    width: 100%;
    height: 200px; /* Fixed height for card images */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--page-tai-xiu-border-color);
}

.page-tai-xiu__card-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--page-tai-xiu-primary-color);
    margin: 20px 15px 10px;
}

.page-tai-xiu__card-description {
    font-size: 16px;
    padding: 0 15px 20px;
    flex-grow: 1;
}

/* Promotions Section */
.page-tai-xiu__promotions-section {
    background-color: var(--page-tai-xiu-card-bg);
}

.page-tai-xiu__cta-center {
    text-align: center;
    margin-top: 30px;
}

/* FAQ Section */
details.page-tai-xiu__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--page-tai-xiu-border-color);
  overflow: hidden;
  background: var(--page-tai-xiu-card-bg);
  color: var(--page-tai-xiu-text-main);
}
details.page-tai-xiu__faq-item summary.page-tai-xiu__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-tai-xiu__faq-item summary.page-tai-xiu__faq-question::-webkit-details-marker {
  display: none;
}
details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question:hover {
  background: rgba(255, 255, 255, 0.05);
}
.page-tai-xiu__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--page-tai-xiu-text-main);
}
.page-tai-xiu__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--page-tai-xiu-secondary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
  padding: 0 20px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 0 5px 5px;
  font-size: 16px;
  color: var(--page-tai-xiu-text-main);
}

.page-tai-xiu__faq-answer p {
    margin-bottom: 0;
    text-align: left;
}

/* Conclusion Section */
.page-tai-xiu__conclusion-section {
    background-color: var(--page-tai-xiu-bg);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-tai-xiu__hero-image-wrapper {
        height: 500px;
    }
    .page-tai-xiu__main-title {
        font-size: clamp(32px, 5vw, 48px);
    }
    .page-tai-xiu__hero-description {
        font-size: 18px;
    }
    .page-tai-xiu__section-title {
        font-size: 32px;
    }
    .page-tai-xiu__text-block {
        font-size: 17px;
    }
    .page-tai-xiu__advantage-card.page-tai-xiu__card {
        max-width: 45%;
        margin: 0 auto;
    }
    .page-tai-xiu__advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-tai-xiu__hero-section {
        padding-top: 10px;
    }
    .page-tai-xiu__hero-image-wrapper {
        height: auto;
        aspect-ratio: 16/9; /* Maintain aspect ratio */
    }
    .page-tai-xiu__hero-image {
        object-fit: contain !important; /* Contain for mobile */
        aspect-ratio: unset;
        width: 100% !important;
        height: auto !important;
    }
    .page-tai-xiu__hero-content {
        padding: 30px 15px 40px;
    }
    .page-tai-xiu__main-title {
        font-size: clamp(28px, 8vw, 40px);
        margin-bottom: 15px;
    }
    .page-tai-xiu__hero-description {
        font-size: 16px;
        margin-bottom: 25px;
    }
    .page-tai-xiu__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%; /* Ensure container takes full width */
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
    }
    .page-tai-xiu__btn-primary,
    .page-tai-xiu__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 16px;
        padding: 12px 20px;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-tai-xiu__section-padding {
        padding: 40px 0;
    }
    .page-tai-xiu__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .page-tai-xiu__text-block {
        font-size: 16px;
        margin-bottom: 20px;
        padding: 0 10px; /* Adjust padding for smaller screens */
    }
    .page-tai-xiu__content-image {
        margin: 20px auto;
        max-width: 100% !important;
        height: auto !important;
        width: 100% !important;
    }
    .page-tai-xiu__how-to-play-section .page-tai-xiu__ordered-list li,
    .page-tai-xiu__bet-types-section .page-tai-xiu__unordered-list li,
    .page-tai-xiu__tips-section .page-tai-xiu__unordered-list li {
        font-size: 15px;
        padding: 15px 15px 15px 50px;
    }
    .page-tai-xiu__how-to-play-section .page-tai-xiu__ordered-list li::before {
        left: 15px;
        width: 25px;
        height: 25px;
        font-size: 14px;
    }
    .page-tai-xiu__advantages-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-tai-xiu__advantage-card.page-tai-xiu__card {
        max-width: 100%;
    }
    .page-tai-xiu__card-title {
        font-size: 20px;
        margin: 15px 10px 8px;
    }
    .page-tai-xiu__card-description {
        font-size: 15px;
        padding: 0 10px 15px;
    }
    details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question {
      padding: 15px;
    }
    .page-tai-xiu__faq-qtext {
      font-size: 16px;
    }
    .page-tai-xiu__faq-toggle {
      font-size: 20px;
      width: 24px;
      height: 24px;
    }
    details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
      padding: 0 15px 15px;
      font-size: 15px;
    }

    /* Universal image and container responsive styles for mobile */
    .page-tai-xiu img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block;
    }
    .page-tai-xiu__container,
    .page-tai-xiu__section,
    .page-tai-xiu__card,
    .page-tai-xiu__hero-content,
    .page-tai-xiu__cta-buttons,
    .page-tai-xiu__advantages-grid,
    .page-tai-xiu__faq-list {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow-x: hidden;
    }
    .page-tai-xiu__hero-section .page-tai-xiu__hero-image-wrapper {
        overflow: hidden; /* Ensure no overflow from image */
    }
    .page-tai-xiu__advantages-grid {
        padding-left: 0;
        padding-right: 0;
    }
}