:root {
    --primary-color: #C91F17;
    --secondary-color: #E53935;
    --button-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
    --card-bg: #D32F2F;
    --background-color-dark: #B71C1C; /* Custom background color as requested */
    --text-main-light: #FFF5E1;
    --glow-color: #FFCC66;
    --gold-color: #F4D34D;
    --deep-red-color: #7A0E0E;
    --border-color-gold: #F2B544;
}

.page-tai-xiu {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main-light); /* Assuming body background is dark from shared.css */
    background-color: var(--background-color-dark); /* Apply custom background color */
}

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

.page-tai-xiu__section-title {
    font-size: 2.5em;
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
    text-shadow: 2px 2px 4px var(--deep-red-color);
}

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

.page-tai-xiu__sub-title {
    font-size: 1.5em;
    color: var(--gold-color);
    margin-top: 25px;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px var(--deep-red-color);
}

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

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary,
.page-tai-xiu__btn-tertiary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box; /* Ensure responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-tai-xiu__btn-primary {
    background: var(--button-gradient);
    color: var(--deep-red-color);
    border: 2px solid var(--border-color-gold);
}

.page-tai-xiu__btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.page-tai-xiu__btn-secondary {
    background: var(--deep-red-color);
    color: var(--text-main-light);
    border: 2px solid var(--border-color-gold);
}

.page-tai-xiu__btn-secondary:hover {
    background: var(--primary-color);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.page-tai-xiu__btn-tertiary {
    background: none;
    color: var(--gold-color);
    border: 1px solid var(--gold-color);
    padding: 8px 15px;
    font-size: 0.9em;
}

.page-tai-xiu__btn-tertiary:hover {
    background: rgba(255, 215, 0, 0.1);
    color: var(--text-main-light);
}

/* Hero Section */
.page-tai-xiu__hero-section {
    padding-top: 10px; /* Small top padding, relying on shared.css for body padding-top */
    padding-bottom: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-tai-xiu__hero-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column; /* Image on top, text below */
    align-items: center;
    gap: 30px;
}

.page-tai-xiu__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    display: block;
}

.page-tai-xiu__hero-text-block {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-tai-xiu__hero-title {
    font-size: clamp(2.2em, 4vw, 3.5em); /* Using clamp for responsive H1 */
    color: var(--gold-color);
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px var(--deep-red-color);
    line-height: 1.2;
    font-weight: bold;
}

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

.page-tai-xiu__hero-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Ensure responsiveness */
    width: 100%; /* Ensure responsiveness */
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    overflow: hidden;
}

/* Intro Section */
.page-tai-xiu__intro-section {
    padding: 60px 0;
    background-color: var(--background-color-dark); /* Dark background for this section */
    color: var(--text-main-light);
}

.page-tai-xiu__dark-section {
    background-color: var(--deep-red-color);
    color: var(--text-main-light);
}

.page-tai-xiu__image-content {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    display: block;
}

/* Gameplay Section */
.page-tai-xiu__gameplay-section {
    padding: 60px 0;
    background-color: var(--primary-color);
    color: var(--text-main-light);
}

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

.page-tai-xiu__content-card {
    background-color: var(--card-bg); /* Use custom card background color */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    color: var(--text-main-light);
}

.page-tai-xiu__content-card .page-tai-xiu__card-title {
    color: var(--gold-color);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.page-tai-xiu__image-content--small {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: block;
}

.page-tai-xiu__game-trial {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    text-align: center;
    margin-top: 50px;
}

.page-tai-xiu__game-trial-title {
    font-size: 2em;
    color: var(--gold-color);
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px var(--deep-red-color);
}

.page-tai-xiu__game-trial-frame {
    border: 5px solid var(--border-color-gold);
    border-radius: 10px;
    background-color: #000;
    width: 100%;
    height: 600px; /* Default height for desktop */
}

/* Rules Section */
.page-tai-xiu__rules-section {
    padding: 60px 0;
    background-color: var(--deep-red-color);
    color: var(--text-main-light);
}

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

.page-tai-xiu__rules-section li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.page-tai-xiu__rules-section li::before {
    content: '🎲'; /* Dice emoji as bullet point */
    position: absolute;
    left: 0;
    color: var(--gold-color);
}

.page-tai-xiu__rules-section li strong {
    color: var(--gold-color);
}

/* Tips Section */
.page-tai-xiu__tips-section {
    padding: 60px 0;
    background-color: var(--primary-color);
    color: var(--text-main-light);
}

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

.page-tai-xiu__tips-list li {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    color: var(--text-main-light);
}

/* Why Choose Section */
.page-tai-xiu__why-choose-section {
    padding: 60px 0;
    background-color: var(--deep-red-color);
    color: var(--text-main-light);
}

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

.page-tai-xiu__feature-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    color: var(--text-main-light);
}

.page-tai-xiu__feature-card .page-tai-xiu__card-title {
    color: var(--gold-color);
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* Promo Section */
.page-tai-xiu__promo-section {
    padding: 60px 0;
    background-color: var(--primary-color);
    color: var(--text-main-light);
}

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

.page-tai-xiu__promo-list li {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    color: var(--text-main-light);
}

.page-tai-xiu__promo-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Ensure responsiveness */
    width: 100%; /* Ensure responsiveness */
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    overflow: hidden;
}

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

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

.page-tai-xiu__faq-item {
    background-color: var(--card-bg);
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    color: var(--text-main-light);
}

.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--gold-color);
    cursor: pointer;
    background-color: var(--deep-red-color);
    border-bottom: 1px solid var(--border-color-gold);
    transition: background-color 0.3s ease;
    list-style: none; /* Hide default details marker */
}

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

.page-tai-xiu__faq-question:hover {
    background-color: var(--primary-color);
}

.page-tai-xiu__faq-toggle {
    font-size: 1.5em;
    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: 20px 25px;
    background-color: var(--card-bg);
    font-size: 1.1em;
    color: var(--text-main-light);
}

/* CTA Bottom Section */
.page-tai-xiu__cta-bottom-section {
    padding: 60px 0;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--text-main-light);
}

.page-tai-xiu__cta-bottom-section .page-tai-xiu__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Ensure responsiveness */
    width: 100%; /* Ensure responsiveness */
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    overflow: hidden;
}

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

/* General button container styling for responsiveness */
.page-tai-xiu__hero-cta-buttons,
.page-tai-xiu__promo-cta,
.page-tai-xiu__cta-bottom-section .page-tai-xiu__cta-buttons {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .page-tai-xiu {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-tai-xiu__container {
        padding: 15px;
    }

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

    .page-tai-xiu__sub-title {
        font-size: 1.3em;
    }

    /* Hero Section */
    .page-tai-xiu__hero-section {
        padding-top: 10px !important; /* Small top padding for mobile */
        padding-bottom: 40px;
    }

    .page-tai-xiu__hero-image {
        border-radius: 10px;
    }

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

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

    .page-tai-xiu__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-tai-xiu__btn-primary,
    .page-tai-xiu__btn-secondary,
    .page-tai-xiu__btn-tertiary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px; /* Add padding for buttons */
        padding-right: 15px; /* Add padding for buttons */
    }

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

    /* Gameplay Section */
    .page-tai-xiu__gameplay-section {
        padding: 40px 0;
    }

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

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

    .page-tai-xiu__game-trial {
        padding: 20px;
        margin-top: 30px;
    }

    .page-tai-xiu__game-trial-frame {
        height: 300px; /* Smaller height for mobile iframe */
    }

    /* Rules Section */
    .page-tai-xiu__rules-section {
        padding: 40px 0;
    }

    /* Tips Section */
    .page-tai-xiu__tips-section {
        padding: 40px 0;
    }

    .page-tai-xiu__tips-list li {
        padding: 20px;
    }

    /* Why Choose Section */
    .page-tai-xiu__why-choose-section {
        padding: 40px 0;
    }

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

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

    /* Promo Section */
    .page-tai-xiu__promo-section {
        padding: 40px 0;
    }

    .page-tai-xiu__promo-list li {
        padding: 20px;
    }

    .page-tai-xiu__promo-cta {
        flex-direction: column;
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }

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

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

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

    /* CTA Bottom Section */
    .page-tai-xiu__cta-bottom-section {
        padding: 40px 0;
    }

    .page-tai-xiu__cta-bottom-section .page-tai-xiu__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* General image responsiveness */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-tai-xiu__container,
    .page-tai-xiu__hero-section,
    .page-tai-xiu__intro-section,
    .page-tai-xiu__gameplay-section,
    .page-tai-xiu__rules-section,
    .page-tai-xiu__tips-section,
    .page-tai-xiu__why-choose-section,
    .page-tai-xiu__promo-section,
    .page-tai-xiu__faq-section,
    .page-tai-xiu__cta-bottom-section,
    .page-tai-xiu__hero-cta-buttons,
    .page-tai-xiu__promo-cta,
    .page-tai-xiu__cta-bottom-section .page-tai-xiu__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}