.page-tai-xiu {
    --primary-color: #F2C14E;
    --secondary-color: #FFD36B;
    --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    --card-bg: #111111;
    --background-dark: #0A0A0A;
    --text-light: #FFF6D6;
    --border-color: #3A2A12;
    --glow-color: #FFD36B;
    
    font-family: 'Arial', sans-serif; /* Placeholder font, assuming a default will be loaded */
    color: var(--text-light); /* Default text color for dark background */
    background-color: var(--background-dark); /* Explicit dark background */
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll for the whole page */
}

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

.page-tai-xiu__section-title {
    font-size: 3em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-top: 40px;
}

.page-tai-xiu__sub-title {
    font-size: 1.8em;
    color: var(--text-light);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-tai-xiu__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--text-light);
}

.page-tai-xiu__highlight {
    color: var(--secondary-color);
    font-weight: bold;
}

/* Hero Section */
.page-tai-xiu__hero-section {
    position: relative;
    padding-top: 10px; /* Rely on body padding for header offset, add a small top margin */
    padding-bottom: 60px;
    text-align: center;
    background-color: var(--background-dark);
}

.page-tai-xiu__hero-image-wrapper {
    position: relative;
    width: 100%;
    max-height: 675px; /* Max height to control aspect ratio on large screens */
    overflow: hidden;
    margin-bottom: 40px;
}

.page-tai-xiu__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: brightness(0.7); /* Slightly darken image for better text contrast */
}

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

.page-tai-xiu__main-title {
    font-size: 3.8em;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    /* clamp for font size */
    font-size: clamp(2.5em, 5vw, 3.8em);
}

.page-tai-xiu__description {
    font-size: 1.3em;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-tai-xiu__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary,
.page-tai-xiu__btn-outline {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-tai-xiu__btn-primary {
    background: var(--button-gradient);
    color: var(--background-dark); /* Dark text for light button */
    border: none;
    box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
}

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

.page-tai-xiu__btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-tai-xiu__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--background-dark);
    transform: translateY(-3px);
}

.page-tai-xiu__btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px 20px;
    font-size: 0.9em;
    border-radius: 5px;
}

.page-tai-xiu__btn-outline:hover {
    background: var(--primary-color);
    color: var(--background-dark);
}

/* Dark Background Section */
.page-tai-xiu__dark-bg {
    background-color: var(--card-bg); /* Use card background for sections that need to stand out from body bg */
    padding: 60px 0;
}

/* Introduction Section */
.page-tai-xiu__introduction-section {
    padding-bottom: 60px;
}

/* Rules Section */
.page-tai-xiu__rules-section {
    padding: 60px 0;
    background-color: var(--background-dark); /* Ensure it's explicitly dark if needed */
}

.page-tai-xiu__content-grid {
    display: flex;
    gap: 40px;
    align-items: center;
}

.page-tai-xiu__content-grid--reverse {
    flex-direction: row-reverse;
}

.page-tai-xiu__text-content {
    flex: 1;
}

.page-tai-xiu__image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.page-tai-xiu__list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.page-tai-xiu__list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: var(--text-light);
}

.page-tai-xiu__list li::before {
    content: '•';
    color: var(--primary-color);
    font-size: 1.5em;
    position: absolute;
    left: 0;
    top: -3px;
    line-height: 1;
}

.page-tai-xiu__list-highlight {
    color: var(--primary-color);
    font-weight: bold;
}

.page-tai-xiu__list-item-note {
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Bet Types Section */
.page-tai-xiu__bet-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.page-tai-xiu__card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: var(--text-light); /* Ensure text is light on dark card background */
}

.page-tai-xiu__card-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.page-tai-xiu__card-text {
    font-size: 1em;
    line-height: 1.5;
    color: var(--text-light);
}

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

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

.page-tai-xiu__feature-item {
    padding: 30px;
    text-align: center;
}

.page-tai-xiu__feature-title {
    font-size: 1.6em;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.page-tai-xiu__feature-text {
    font-size: 1em;
    color: var(--text-light);
    line-height: 1.5;
}

/* How To Play Section */
.page-tai-xiu__how-to-play-section {
    padding: 60px 0;
    background-color: var(--background-dark);
}

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

.page-tai-xiu__step-item {
    padding: 30px;
    text-align: center;
}

.page-tai-xiu__step-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 15px;
    background: rgba(255, 211, 107, 0.1);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    border: 2px solid var(--secondary-color);
}

.page-tai-xiu__step-title {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.page-tai-xiu__step-text {
    font-size: 0.95em;
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Promotions Section */
.page-tai-xiu__promotions-section {
    padding-bottom: 60px;
}

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

.page-tai-xiu__promo-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.page-tai-xiu__promo-image {
    width: 100%;
    height: 250px; /* Fixed height for promo images */
    object-fit: cover;
    display: block;
}

.page-tai-xiu__promo-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-tai-xiu__promo-title {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.page-tai-xiu__promo-text {
    font-size: 1em;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* FAQ Section */
.page-tai-xiu__faq-section {
    padding: 60px 0;
    background-color: var(--background-dark);
}

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

.page-tai-xiu__faq-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    background-color: rgba(242, 193, 78, 0.1);
    user-select: none;
    transition: background-color 0.3s ease;
}

.page-tai-xiu__faq-question:hover {
    background-color: rgba(242, 193, 78, 0.2);
}

.page-tai-xiu__faq-qtext {
    flex-grow: 1;
    color: var(--primary-color);
}

.page-tai-xiu__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
    transform: rotate(45deg); /* Rotates plus to become an 'x' or similar, visually indicating open */
}

.page-tai-xiu__faq-answer {
    padding: 0 25px 20px;
    font-size: 1.05em;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.page-tai-xiu__faq-answer p {
    margin-bottom: 15px;
}

.page-tai-xiu__cta-buttons--inline {
    justify-content: flex-start;
    margin-top: 15px;
    gap: 10px;
}
.page-tai-xiu__cta-buttons--inline .page-tai-xiu__btn-primary,
.page-tai-xiu__cta-buttons--inline .page-tai-xiu__btn-secondary {
    padding: 10px 20px;
    font-size: 0.9em;
    max-width: fit-content;
}


/* Call to Action Section */
.page-tai-xiu__call-to-action-section {
    padding-top: 60px;
    padding-bottom: 80px;
}

.page-tai-xiu__cta-content {
    text-align: center;
    max-width: 900px;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-tai-xiu__container {
        padding: 0 15px;
    }

    .page-tai-xiu__hero-section {
        padding-bottom: 40px;
    }

    .page-tai-xiu__main-title {
        font-size: clamp(2.2em, 4.5vw, 3.5em);
    }

    .page-tai-xiu__description {
        font-size: 1.2em;
    }

    .page-tai-xiu__section-title {
        font-size: 2.5em;
        margin-bottom: 30px;
    }

    .page-tai-xiu__dark-bg,
    .page-tai-xiu__rules-section,
    .page-tai-xiu__how-to-play-section,
    .page-tai-xiu__faq-section,
    .page-tai-xiu__call-to-action-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .page-tai-xiu__content-grid {
        flex-direction: column;
        gap: 30px;
    }

    .page-tai-xiu__content-grid--reverse {
        flex-direction: column; /* Revert to default column for mobile */
    }

    .page-tai-xiu__promo-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-tai-xiu__hero-section {
        padding-top: 10px; /* Consistent small top padding */
        padding-bottom: 30px;
    }
    .page-tai-xiu__main-title {
        font-size: clamp(1.8em, 8vw, 2.5em) !important; /* Smaller font size for mobile H1 */
        margin-bottom: 15px;
    }
}