.page-tai-xiu {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light body background */
    background-color: #FFFFFF; /* Default body background */
}

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

.page-tai-xiu__section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #017439;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

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

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow long words to break */
    box-sizing: border-box;
    max-width: 100%;
}

.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: #FFFFFF;
    color: #C30808; /* Register/Login color */
    border: 2px solid #C30808;
}

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

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

/* HERO Section */
.page-tai-xiu__hero-section {
    padding-top: 10px; /* Small top padding, relying on body for header offset */
    padding-bottom: 60px;
    background-color: #FFFFFF;
}

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

.page-tai-xiu__hero-image-wrapper {
    flex: 1 1 500px; /* Adjust base width for image */
    text-align: center;
}

.page-tai-xiu__hero-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.page-tai-xiu__hero-content {
    flex: 1 1 500px; /* Adjust base width for content */
    color: #333333;
}

.page-tai-xiu__hero-title {
    font-size: clamp(2rem, 4vw, 3.5rem); /* Responsive font size */
    font-weight: 800;
    color: #017439;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-tai-xiu__hero-description {
    font-size: 1.15rem;
    margin-bottom: 30px;
    color: #555555;
}

.page-tai-xiu__hero-cta-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

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

.page-tai-xiu__light-bg {
    background-color: #FFFFFF;
    color: #333333;
}

.page-tai-xiu__dark-bg {
    background-color: #017439;
    color: #FFFFFF;
}

.page-tai-xiu__dark-bg .page-tai-xiu__section-title,
.page-tai-xiu__dark-bg .page-tai-xiu__section-description,
.page-tai-xiu__dark-bg .page-tai-xiu__why-item-title,
.page-tai-xiu__dark-bg .page-tai-xiu__why-item-text,
.page-tai-xiu__dark-bg .page-tai-xiu__tip-card-title,
.page-tai-xiu__dark-bg .page-tai-xiu__tip-card-text,
.page-tai-xiu__dark-bg .page-tai-xiu__more-tips-text,
.page-tai-xiu__dark-bg .page-tai-xiu__faq-qtext,
.page-tai-xiu__dark-bg .page-tai-xiu__faq-answer {
    color: #FFFFFF;
}

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

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

.page-tai-xiu__icon-box-media {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 25px;
    border: 5px solid #017439;
}

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

.page-tai-xiu__feature-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #017439;
    margin-bottom: 15px;
}

.page-tai-xiu__feature-text {
    font-size: 1rem;
    color: #555555;
}

/* Why kc88 Section */
.page-tai-xiu__why-kc88-section {
    padding: 80px 0;
}

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

.page-tai-xiu__why-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-tai-xiu__why-item-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.page-tai-xiu__why-item-text {
    font-size: 1rem;
    color: #f0f0f0;
}

/* How to Play Section */
.page-tai-xiu__how-to-play-section {
    padding: 80px 0;
}

.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 {
    text-align: center;
    background-color: #f8f8f8;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-tai-xiu__step-icon {
    width: 60px;
    height: 60px;
    background-color: #017439;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

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

.page-tai-xiu__step-text {
    font-size: 1rem;
    color: #555555;
}

.page-tai-xiu__step-text a {
    color: #017439;
    text-decoration: underline;
}

.page-tai-xiu__step-text a:hover {
    color: #005f2c;
}

/* Tips & Strategies Section */
.page-tai-xiu__tips-strategies-section {
    padding: 80px 0;
}

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

.page-tai-xiu__tip-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-tai-xiu__tip-card-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-tai-xiu__tip-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #017439;
    padding: 20px 20px 10px;
}

.page-tai-xiu__tip-card-text {
    font-size: 1rem;
    color: #555555;
    padding: 0 20px 20px;
}

.page-tai-xiu__more-tips-text {
    text-align: center;
    margin-top: 40px;
    font-size: 1.1rem;
    color: #FFFFFF;
}

.page-tai-xiu__more-tips-text a {
    color: #FFFF00; /* Register/Login font color */
    text-decoration: underline;
}

.page-tai-xiu__more-tips-text a:hover {
    color: #e0e000;
}

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

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

.page-tai-xiu__promo-card {
    background-color: #f8f8f8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.page-tai-xiu__promo-card-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-tai-xiu__promo-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #017439;
    padding: 20px 20px 10px;
}

.page-tai-xiu__promo-card-text {
    font-size: 1rem;
    color: #555555;
    padding: 0 20px 20px;
}

.page-tai-xiu__promo-card-text a {
    color: #017439;
    text-decoration: underline;
}

.page-tai-xiu__promo-card-text a:hover {
    color: #005f2c;
}

.page-tai-xiu__promo-btn {
    margin-bottom: 20px;
}

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

.page-tai-xiu__faq-list {
    margin-top: 40px;
}

.page-tai-xiu__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-tai-xiu__faq-item summary {
    list-style: none;
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #FFFFFF;
    position: relative;
}

.page-tai-xiu__faq-item summary::-webkit-details-marker {
    display: none;
}

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

.page-tai-xiu__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    color: #FFFF00; /* Register/Login font color */
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
    transform: rotate(45deg);
}

.page-tai-xiu__faq-answer {
    padding: 0 25px 20px;
    font-size: 1rem;
    color: #f0f0f0;
}

.page-tai-xiu__faq-answer p {
    margin-bottom: 0;
    color: #f0f0f0;
}

.page-tai-xiu__faq-answer a {
    color: #FFFF00;
    text-decoration: underline;
}

.page-tai-xiu__faq-answer a:hover {
    color: #e0e000;
}

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

    .page-tai-xiu__hero-content {
        order: 2;
        flex: 1 1 100%;
    }

    .page-tai-xiu__hero-image-wrapper {
        order: 1;
        flex: 1 1 100%;
    }

    .page-tai-xiu__hero-cta-group {
        justify-content: center;
    }

    .page-tai-xiu__features-grid,
    .page-tai-xiu__why-list,
    .page-tai-xiu__steps-grid,
    .page-tai-xiu__tips-grid,
    .page-tai-xiu__promo-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-tai-xiu__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

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

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

    /* HERO Section Mobile */
    .page-tai-xiu__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px;
    }

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

    .page-tai-xiu__hero-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        text-align: center;
    }

    .page-tai-xiu__hero-description {
        font-size: 1rem;
        text-align: center;
    }

    .page-tai-xiu__hero-cta-group {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .page-tai-xiu__btn-primary,
    .page-tai-xiu__btn-secondary,
    .page-tai-xiu__hero-cta {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Intro Section Mobile */
    .page-tai-xiu__intro-section {
        padding: 40px 0;
    }

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

    .page-tai-xiu__icon-box-media {
        width: 200px;
        height: 200px;
        margin: 0 auto 20px;
    }

    /* Why kc88 Section Mobile */
    .page-tai-xiu__why-kc88-section {
        padding: 60px 0;
    }

    .page-tai-xiu__why-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-tai-xiu__why-item {
        padding: 20px;
    }

    /* How to Play Section Mobile */
    .page-tai-xiu__how-to-play-section {
        padding: 60px 0;
    }

    .page-tai-xiu__steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-tai-xiu__step-item {
        padding: 20px;
    }

    /* Tips & Strategies Section Mobile */
    .page-tai-xiu__tips-strategies-section {
        padding: 60px 0;
    }

    .page-tai-xiu__tips-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-tai-xiu__tip-card-title,
    .page-tai-xiu__tip-card-text {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-tai-xiu__more-tips-text {
        font-size: 1rem;
    }

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

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

    .page-tai-xiu__promo-card-title,
    .page-tai-xiu__promo-card-text {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-tai-xiu__promo-btn {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

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

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

    .page-tai-xiu__faq-answer {
        padding: 0 20px 15px;
    }

    /* General Image Responsive */
    .page-tai-xiu img:not(.page-tai-xiu__icon-box-media img) {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__hero-image-wrapper,
    .page-tai-xiu__feature-item,
    .page-tai-xiu__why-item,
    .page-tai-xiu__step-item,
    .page-tai-xiu__tip-card,
    .page-tai-xiu__promo-card,
    .page-tai-xiu__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden; /* Ensure no overflow from content */
    }
}