:root {
    --color-primary: #F2C14E;
    --color-secondary: #FFD36B;
    --color-background: #0A0A0A;
    --color-card-bg: #111111;
    --color-text-main: #FFF6D6;
    --color-border: #3A2A12;
    --color-glow: #FFD36B;
    --btn-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
}

.page-tai-xiu {
    color: var(--color-text-main);
    background-color: var(--color-background);
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    padding-bottom: 40px; /* Ensure some space above the footer */
}

.page-tai-xiu a {
    color: var(--color-secondary);
    text-decoration: none;
}

.page-tai-xiu a:hover {
    text-decoration: underline;
}

.page-tai-xiu__hero-section {
    display: flex;
    flex-direction: column; /* Ensure image is above content for desktop */
    align-items: center;
    text-align: center;
    position: relative;
    padding-top: 10px; /* Small top padding, relying on body for header offset */
    padding-bottom: 40px;
    overflow: hidden;
}

.page-tai-xiu__hero-image-wrapper {
    width: 100%;
    max-height: 600px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-tai-xiu__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Cover for desktop, will change to contain for mobile */
}

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

.page-tai-xiu__main-title {
    font-size: 2.8em;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(255, 211, 107, 0.5);
}

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

.page-tai-xiu__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping for multiple buttons */
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    transition: all 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%;
}

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

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

.page-tai-xiu__btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: 0 4px 15px rgba(242, 193, 78, 0.2);
}

.page-tai-xiu__btn-secondary:hover {
    background: var(--color-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 193, 78, 0.4);
}

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

.page-tai-xiu__section-title {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 0 0 8px rgba(255, 211, 107, 0.3);
}

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

.page-tai-xiu__image-text-block {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-top: 40px;
}

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

.page-tai-xiu__image-text-block p {
    flex: 1;
    font-size: 1.05em;
}

.page-tai-xiu__list {
    list-style: disc inside;
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--color-text-main);
}

.page-tai-xiu__list li {
    margin-bottom: 10px;
}

.page-tai-xiu__list ul {
    list-style: circle inside;
    margin-left: 20px;
    margin-top: 5px;
}

.page-tai-xiu__game-trial-frame {
    border: 2px solid var(--color-primary);
    border-radius: 10px;
    margin-top: 40px;
    background-color: var(--color-card-bg);
    box-shadow: 0 0 25px rgba(242, 193, 78, 0.3);
    display: block;
}

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

.page-tai-xiu__card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-tai-xiu__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(242, 193, 78, 0.3);
}

.page-tai-xiu__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

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

.page-tai-xiu__card p {
    font-size: 0.95em;
    color: var(--color-text-main);
}

.page-tai-xiu__text-center {
    text-align: center;
    margin-top: 40px;
    font-size: 1.1em;
}

.page-tai-xiu__dark-section {
    background-color: var(--color-card-bg);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 80px 20px;
}

.page-tai-xiu__dark-section .page-tai-xiu__section-title {
    color: var(--color-primary);
    text-shadow: 0 0 12px rgba(255, 211, 107, 0.6);
}

.page-tai-xiu__dark-section .page-tai-xiu__description {
    color: var(--color-text-main);
    max-width: 800px;
    margin: 0 auto 30px auto;
    text-align: center;
}

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

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

.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    background-color: #1a1a1a;
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-question {
    background-color: #2a2a2a;
    border-color: var(--color-primary);
}

.page-tai-xiu__faq-question:hover {
    background-color: #2a2a2a;
}

.page-tai-xiu__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--color-secondary);
    margin-left: 15px;
    line-height: 1;
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
    content: '−';
}

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

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

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-tai-xiu__main-title {
        font-size: 2.5em;
    }

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

    .page-tai-xiu__image-text-block {
        flex-direction: column;
        text-align: center;
    }

    .page-tai-xiu__content-image {
        max-width: 80%;
    }

    .page-tai-xiu__card-image {
        height: 180px;
    }
}

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

    .page-tai-xiu__hero-section {
        padding-top: 10px !important;
    }

    .page-tai-xiu__hero-image-wrapper {
        max-height: 400px; /* Adjust max height for mobile hero */
    }

    .page-tai-xiu__hero-image {
        object-fit: contain !important; /* Contain for mobile, show full image */
        aspect-ratio: unset !important; /* Remove aspect ratio constraint */
        max-height: none !important;
    }

    .page-tai-xiu__hero-content {
        padding: 15px;
    }

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

    .page-tai-xiu__description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-tai-xiu__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding to button container */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-tai-xiu__btn-primary,
    .page-tai-xiu__btn-secondary,
    .page-tai-xiu a[class*="button"],
    .page-tai-xiu a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
    }

    .page-tai-xiu__section {
        padding: 40px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

    .page-tai-xiu__content-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-tai-xiu__game-trial-frame {
        height: 400px; /* Adjust height for mobile */
    }

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

    .page-tai-xiu__card {
        padding: 20px;
    }

    .page-tai-xiu__card-image {
        height: 150px; /* Smaller fixed height for mobile cards */
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-tai-xiu__dark-section {
        padding: 60px 15px;
    }

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

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

    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    .page-tai-xiu__section,
    .page-tai-xiu__card,
    .page-tai-xiu__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}