.page-tai-xiu {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Default text color, adjusted by contrast system */
    background-color: var(--page-bg); /* Controlled by shared.css */
}

/* Custom properties for colors from the prompt */
:root {
    --primary-color: #E53935;
    --secondary-color: #FF5A4F;
    --card-bg: #FFFFFF;
    --page-bg-custom: #F5F7FA; /* This is for page content background, not body */
    --text-main: #333333;
    --border-color: #E0E0E0;
    --button-gradient: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    --header-offset: 120px; /* Default, will be overridden by shared.css */
}

/* Ensure page background is applied to sections for contrast */
.page-tai-xiu__intro-section,
.page-tai-xiu__how-to-play-section,
.page-tai-xiu__strategy-section,
.page-tai-xiu__faq-section,
.page-tai-xiu__conclusion-section {
    background-color: var(--page-bg-custom); /* Light background for most content */
    color: var(--text-main);
}

.page-tai-xiu__dark-section {
    background-color: var(--primary-color);
    color: #ffffff;
}

.page-tai-xiu__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Ensure image is above content */
    align-items: center;
    text-align: center;
    overflow: hidden;
    padding-bottom: 40px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background: var(--primary-color); /* Fallback background for hero */
}

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

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

.page-tai-xiu__hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    max-width: 900px;
    width: 100%;
    color: #ffffff;
    margin-top: -80px; /* Overlap slightly for visual flow */
    background: rgba(0, 0, 0, 0.3); /* Semi-transparent background for text readability */
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.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: 15px;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-tai-xiu__hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #f0f0f0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-tai-xiu__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-tai-xiu__btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    text-align: center;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    max-width: 100%;
}

.page-tai-xiu__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-tai-xiu__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.page-tai-xiu__btn-secondary {
    background: #ffffff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.page-tai-xiu__section-padding {
    padding: 60px 20px;
}

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

.page-tai-xiu__section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-main);
}

.page-tai-xiu__dark-section .page-tai-xiu__section-title {
    color: #ffffff;
}

.page-tai-xiu__sub-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 20px;
    color: inherit;
}

.page-tai-xiu__text-block {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.8;
    color: inherit;
}

.page-tai-xiu__text-block a {
    color: var(--secondary-color);
    text-decoration: underline;
    font-weight: bold;
}

.page-tai-xiu__text-block a:hover {
    color: var(--primary-color);
}

.page-tai-xiu__flex-wrapper {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
}