.page-tai-xiu {
    --primary-color: #FF8C1A;
    --secondary-color: #FFA53A;
    --card-bg: #17191F;
    --body-bg: #0D0E12;
    --text-main: #FFF3E6;
    --border-color: #A84F0C;
    --glow-color: #FFB04D;
    --deep-orange: #D96800;
    color: var(--text-main);
    background-color: var(--body-bg);
    font-family: Arial, sans-serif;
}

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

.page-tai-xiu__top-section {
    padding-top: 10px; /* Rely on body padding-top for header offset */
    padding-bottom: 40px;
    text-align: center;
    background-color: var(--deep-orange);
    background-image: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
    color: #ffffff;
}

.page-tai-xiu__main-title {
    font-size: clamp(2.5rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #ffffff;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-tai-xiu__intro-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

.page-tai-xiu__cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-tai-xiu__btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 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: linear-gradient(180deg, var(--secondary-color) 0%, var(--deep-orange) 100%);
    color: #ffffff;
    border: 2px solid var(--secondary-color);
}

.page-tai-xiu__btn-primary:hover {
    background: linear-gradient(180deg, var(--deep-orange) 0%, var(--secondary-color) 100%);
    border-color: var(--deep-orange);
    box-shadow: 0 0 15px var(--glow-color);
}

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

.page-tai-xiu__btn-secondary:hover {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 0 15px var(--glow-color);
}

.page-tai-xiu__content-area {
    padding: 50px 0;
    background-color: var(--body-bg);
    color: var(--text-main);
}

.page-tai-xiu__article-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-tai-xiu__article h2,
.page-tai-xiu__article h3 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-tai-xiu__section-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--secondary-color);
}

.page-tai-xiu__sub-title {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
}

.page-tai-xiu__article p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 15px;
    color: var(--text-main);
}

.page-tai-xiu__article p a {
    color: var(--secondary-color);
    text-decoration: underline;
}

.page-tai-xiu__article p a:hover {
    color: var(--primary-color);
}

.page-tai-xiu__list,
.page-tai-xiu__ordered-list {
    list-style-position: inside;
    margin-bottom: 20px;
    padding-left: 20px;
}

.page-tai-xiu__list li,
.page-tai-xiu__ordered-list li {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 8px;
    color: var(--text-main);
}

.page-tai-xiu__list li strong {
    color: var(--secondary-color);
}

.page-tai-xiu__figure {
    margin: 30px 0;
    text-align: center;
}

.page-tai-xiu__image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: block;
    margin: 0 auto;
}

.page-tai-xiu__figcaption {
    font-size: 0.9rem;
    color: #ccc;
    margin-top: 10px;
}

.page-tai-xiu__button-group {
    margin-top: 30px;
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

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

.page-tai-xiu__game-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-tai-xiu__game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-tai-xiu__game-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-tai-xiu__game-title {
    font-size: 1.3rem;
    font-weight: 600;
    padding: 15px;
    text-align: center;
    color: var(--secondary-color);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-tai-xiu__main-title {
        font-size: clamp(2.2rem, 4.5vw, 3rem);
    }

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

    .page-tai-xiu__sub-title {
        font-size: 1.4rem;
    }

    .page-tai-xiu__intro-text,
    .page-tai-xiu__article p,
    .page-tai-xiu__list li,
    .page-tai-xiu__ordered-list li {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    /* Top Section Title + CTA */
    .page-tai-xiu__top-section {
        padding-top: 10px !important; /* Fixed 10px top padding */
        padding-bottom: 30px;
    }
    .page-tai-xiu__main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        margin-bottom: 15px;
    }
    .page-tai-xiu__intro-text {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    .page-tai-xiu__cta-buttons {
        flex-direction: column;
        gap: 10px;
        padding: 0 15px;
    }
    .page-tai-xiu__btn {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
        font-size: 0.95rem;
    }

    /* Single Column Long Text Container */
    .page-tai-xiu__article-wrap {
        padding: 0 15px;
    }
    .page-tai-xiu__content-area {
        padding: 30px 0;
    }
    .page-tai-xiu__section-title {
        font-size: 1.8rem;
        margin-top: 25px;
        margin-bottom: 10px;
    }
    .page-tai-xiu__sub-title {
        font-size: 1.3rem;
        margin-top: 20px;
        margin-bottom: 10px;
    }
    .page-tai-xiu__article p,
    .page-tai-xiu__list li,
    .page-tai-xiu__ordered-list li {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    /* General Images and Figures */
    .page-tai-xiu__image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
        box-sizing: border-box !important;
    }
    .page-tai-xiu__figure {
        margin: 20px 0;
    }
    .page-tai-xiu__figcaption {
        font-size: 0.85rem;
    }

    /* Buttons and Button Containers */
    .page-tai-xiu__button-group {
        flex-direction: column;
        gap: 10px;
        padding: 0 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Game Cards (for other games section) */
    .page-tai-xiu__game-cards {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-tai-xiu__game-card {
        max-width: 100% !important;
        width: 100% !important;
    }
    .page-tai-xiu__game-image {
        height: 180px;
    }
    .page-tai-xiu__game-title {
        font-size: 1.2rem;
    }
}