:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --background-light: #ffffff;
    --background-dark: #017439;
    --button-register: #C30808;
    --button-login: #C30808;
    --font-register-login: #FFFF00;
}

.page-tai-xiu {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light background */
    background-color: var(--background-light); /* Default body background */
}

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

.page-tai-xiu__section-title {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
}

.page-tai-xiu__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--background-dark); /* Primary color background */
    color: var(--text-light);
    overflow: hidden;
}

.page-tai-xiu__hero-content-wrapper {
    display: flex;
    flex-direction: column; /* Image above, text below */
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.page-tai-xiu__hero-image {
    width: 100%;
    max-width: 1200px;
    height: auto;
    display: block;
    border-radius: 10px;
    margin-bottom: 30px;
    object-fit: cover;
}

.page-tai-xiu__hero-text-content {
    max-width: 800px;
}

.page-tai-xiu__main-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem); /* Responsive H1 font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-light);
}

.page-tai-xiu__description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-light);
}

.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 {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 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: var(--button-register); /* Specific color for register/primary action */
    color: var(--font-register-login); /* Specific font color */
    border: 2px solid var(--button-register);
}

.page-tai-xiu__btn-primary:hover {
    background-color: #a60707; /* Darker version of #C30808 */
    border-color: #a60707;
}

.page-tai-xiu__btn-secondary {
    background-color: transparent;
    color: var(--font-register-login); /* Specific font color */
    border: 2px solid var(--font-register-login);
}

.page-tai-xiu__btn-secondary:hover {
    background-color: #e0e000; /* Slightly darker yellow */
    color: var(--button-register);
}

/* Introduction Section */
.page-tai-xiu__introduction-section {
    padding: 60px 0;
    background-color: var(--background-light);
    color: var(--text-dark);
}

.page-tai-xiu__content-block {
    text-align: justify;
    font-size: 1.1em;
    line-height: 1.8;
}

.page-tai-xiu__content-block p {
    margin-bottom: 20px;
}

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

/* Benefits Section */
.page-tai-xiu__benefits-section {
    padding: 60px 0;
    background-color: var(--background-dark);
    color: var(--text-light);
}

.page-tai-xiu__benefits-section .page-tai-xiu__section-title {
    color: var(--text-light);
}

.page-tai-xiu__benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.page-tai-xiu__benefit-card {
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white for dark background */
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-tai-xiu__benefit-card .page-tai-xiu__card-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
}

.page-tai-xiu__benefit-card .page-tai-xiu__card-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-light);
}

.page-tai-xiu__benefit-card p {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-light);
}

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

.page-tai-xiu__guide-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.page-tai-xiu__guide-step {
    text-align: center;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-tai-xiu__step-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
}

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

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

/* Strategies Section */
.page-tai-xiu__strategies-section {
    padding: 60px 0;
    background-color: var(--background-dark);
    color: var(--text-light);
}

.page-tai-xiu__strategies-section .page-tai-xiu__section-title {
    color: var(--text-light);
}

.page-tai-xiu__strategy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.page-tai-xiu__strategy-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-tai-xiu__strategy-card .page-tai-xiu__card-title {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--text-light);
    margin-bottom: 15px;
}

.page-tai-xiu__strategy-card p {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-light);
}

/* Download CTA Section */
.page-tai-xiu__download-cta-section {
    padding: 60px 0;
    background-color: var(--background-light);
    color: var(--text-dark);
}

.page-tai-xiu__text-center {
    text-align: center;
}

.page-tai-xiu__description-small {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

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

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

.page-tai-xiu__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.15em;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    background-color: var(--secondary-color);
    border-bottom: 1px solid #e0e0e0;
    list-style: none; /* For details/summary default marker */
}
.page-tai-xiu__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker */
}
.page-tai-xiu__faq-question::marker {
    display: none; /* Hide default marker for Firefox */
}

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

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

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
    transform: rotate(45deg); /* Change + to X or similar */
}

.page-tai-xiu__faq-answer {
    padding: 15px 25px 20px;
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-dark);
}

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

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

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .page-tai-xiu__container {
        padding: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

    .page-tai-xiu__main-title {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }

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

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

    .page-tai-xiu__btn-primary,
    .page-tai-xiu__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .page-tai-xiu__hero-section {
        padding-top: 10px !important; /* Ensure small padding */
    }

    /* General image responsive styles for mobile */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    .page-tai-xiu__hero-image {
        margin-bottom: 20px;
    }

    .page-tai-xiu__benefits-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-tai-xiu__benefit-card {
        padding: 25px;
    }

    .page-tai-xiu__guide-steps {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .page-tai-xiu__strategies-section {
        padding: 40px 0;
    }
    
    .page-tai-xiu__strategy-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-tai-xiu__strategy-card {
        padding: 20px;
    }

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

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

    /* Ensure content containers also adapt */
    .page-tai-xiu__introduction-section,
    .page-tai-xiu__benefits-section,
    .page-tai-xiu__how-to-play-section,
    .page-tai-xiu__strategies-section,
    .page-tai-xiu__download-cta-section,
    .page-tai-xiu__faq-section {
        padding: 40px 0 !important;
    }
}

/* @media (max-width: 1024px) - For tablets */
@media (max-width: 1024px) {
    .page-tai-xiu__container {
        padding: 20px;
    }

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

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

    .page-tai-xiu__benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .page-tai-xiu__guide-steps {
        grid-template-columns: 1fr; /* Stack on tablets */
    }

    .page-tai-xiu__strategy-grid {
        grid-template-columns: 1fr; /* Stack on tablets */
    }
}