:root {
    --primary-color: #113B7A;
    --secondary-color: #1D5FD1;
    --text-main: #F3F8FF;
    --text-secondary: #AFC4E8;
    --card-bg: #10233F;
    --border-color: #244D84;
    --glow-color: #4FA8FF;
    --gold-color: #F2C14E;
    --divider-color: #1B3357;
    --deep-navy: #08162B; /* This is the body background from shared.css */
    --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
}

.page-game-bai {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Light text for dark body background */
    background-color: var(--deep-navy); /* Ensure consistency, though body handles it */
}

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

.page-game-bai__section {
    padding: 60px 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.page-game-bai__dark-section {
    background-color: var(--card-bg); /* Use card background for dark sections */
    color: var(--text-main);
}

.page-game-bai__section-title {
    font-size: 38px;
    font-weight: 700;
    color: var(--gold-color); /* Use gold for main titles for contrast */
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(79, 168, 255, 0.5); /* Glow effect */
    line-height: 1.3;
}

.page-game-bai__section-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-game-bai__sub-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-game-bai__content-area p,
.page-game-bai__list li {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    text-align: left;
}

.page-game-bai__content-area strong {
    color: var(--text-main);
}

.page-game-bai__list {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 20px;
    text-align: left;
}

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* Button responsive base */
    box-sizing: border-box; /* Button responsive base */
    white-space: normal; /* Button responsive base */
    word-wrap: break-word; /* Button responsive base */
}

.page-game-bai__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(43, 115, 246, 0.3);
}

.page-game-bai__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43, 115, 246, 0.4);
}

.page-game-bai__btn-secondary {
    background: transparent;
    color: var(--gold-color);
    border: 2px solid var(--gold-color);
    margin-left: 20px;
    box-shadow: 0 0 10px rgba(242, 193, 78, 0.3);
}

.page-game-bai__btn-secondary:hover {
    background: rgba(242, 193, 78, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(242, 193, 78, 0.5);
}

/* Hero Section */
.page-game-bai__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding-top: 10px; /* Small top padding, not --header-offset */
    overflow: hidden;
}

.page-game-bai__hero-image-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.page-game-bai__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-game-bai__hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.6); /* Semi-transparent background for text readability */
    border-radius: 15px;
    margin-top: 20px; /* Space from image */
}

.page-game-bai__main-title {
    font-size: clamp(32px, 4vw, 56px); /* Responsive H1 */
    font-weight: 800;
    color: var(--gold-color);
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(79, 168, 255, 0.7);
    line-height: 1.2;
}

.page-game-bai__main-description {
    font-size: clamp(16px, 1.8vw, 22px); /* Responsive description */
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-game-bai__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%; /* Button container responsive base */
    max-width: 100%; /* Button container responsive base */
    box-sizing: border-box; /* Button container responsive base */
    overflow: hidden; /* Button container responsive base */
}

/* Introduction Section */
.page-game-bai__introduction-section .page-game-bai__content-area {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.page-game-bai__image-content {
    width: 100%;
    height: auto;
    max-width: 800px;
    margin: 30px auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Games Showcase Section */
.page-game-bai__games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.page-game-bai__game-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-bai__game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--glow-color);
}

.page-game-bai__game-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    margin-bottom: 15px;
}

.page-game-bai__game-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    padding: 0 15px;
}

.page-game-bai__game-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-game-bai__game-title a:hover {
    color: var(--gold-color);
}

.page-game-bai__game-description {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding: 0 15px;
}

.page-game-bai__btn-play {
    display: inline-block;
    background: var(--button-gradient);
    color: #ffffff;
    padding: 10px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    max-width: calc(100% - 30px); /* Button responsive base */
    box-sizing: border-box; /* Button responsive base */
    white-space: normal; /* Button responsive base */
    word-wrap: break-word; /* Button responsive base */
}

.page-game-bai__btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(43, 115, 246, 0.4);
}

/* Promotions Section */
.page-game-bai__promotions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.page-game-bai__promo-card {
    background-color: var(--deep-navy);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-bai__promo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--glow-color);
}

.page-game-bai__promo-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    margin-bottom: 15px;
}

.page-game-bai__promo-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    padding: 0 15px;
}

.page-game-bai__promo-description {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding: 0 15px;
}

.page-game-bai__full-width-cta {
    margin-top: 50px;
}

/* Guide Section */
.page-game-bai__guide-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.page-game-bai__guide-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-bai__guide-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--glow-color);
}

.page-game-bai__guide-icon {
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: var(--button-gradient);
    color: #ffffff;
    border-radius: 50%;
    font-size: 30px;
    font-weight: bold;
    margin: 0 auto 20px;
    box-shadow: 0 4px 10px rgba(43, 115, 246, 0.3);
}

.page-game-bai__guide-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.page-game-bai__guide-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.page-game-bai__guide-link {
    color: var(--gold-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    transition: color 0.3s ease;
}

.page-game-bai__guide-link:hover {
    text-decoration: underline;
    color: var(--glow-color);
}

.page-game-bai__tips-section {
    margin-top: 60px;
    padding: 40px;
    background-color: var(--deep-navy); /* Darker background for contrast */
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* FAQ Section */
details.page-game-bai__faq-item {
    margin-bottom: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

details.page-game-bai__faq-item[open] {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--glow-color);
}

details.page-game-bai__faq-item summary.page-game-bai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
    color: var(--text-main);
    font-weight: 600;
    font-size: 18px;
}

details.page-game-bai__faq-item summary.page-game-bai__faq-question::-webkit-details-marker {
    display: none;
}

details.page-game-bai__faq-item summary.page-game-bai__faq-question:hover {
    background: rgba(var(--primary-color), 0.2);
    color: var(--gold-color);
}

.page-game-bai__faq-qtext {
    flex: 1;
    text-align: left;
    line-height: 1.5;
}

.page-game-bai__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    color: var(--gold-color);
    flex-shrink: 0;
    margin-left: 15px;
    width: 30px;
    text-align: center;
    line-height: 1;
}

details.page-game-bai__faq-item .page-game-bai__faq-answer {
    padding: 0 25px 20px;
    background: var(--deep-navy);
    border-radius: 0 0 12px 12px;
    color: var(--text-secondary);
    text-align: left;
}

.page-game-bai__faq-answer p {
    margin: 0;
    font-size: 16px;
    color: var(--text-secondary);
}

/* Final CTA Section */
.page-game-bai__final-cta-section {
    padding: 80px 0;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

/* General image styling */
.page-game-bai img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-game-bai__games-grid,
    .page-game-bai__promotions-grid,
    .page-game-bai__guide-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .page-game-bai__section-title {
        font-size: 32px;
    }

    .page-game-bai__sub-title {
        font-size: 24px;
    }

    .page-game-bai__hero-content {
        padding: 30px 15px;
    }

    .page-game-bai__main-title {
        font-size: clamp(28px, 4.5vw, 48px);
    }

    .page-game-bai__main-description {
        font-size: clamp(15px, 2vw, 20px);
    }

    .page-game-bai__game-image,
    .page-game-bai__promo-image {
        height: 200px;
    }
}


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

    .page-game-bai__section {
        padding: 40px 0;
    }

    .page-game-bai__section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .page-game-bai__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-game-bai__sub-title {
        font-size: 22px;
    }

    .page-game-bai__content-area p,
    .page-game-bai__list li,
    .page-game-bai__faq-answer p {
        font-size: 15px;
    }

    /* HERO 主图区域 */
    .page-game-bai__hero-section {
        min-height: auto;
        padding-top: 10px; /* Small top padding, not --header-offset */
    }
    .page-game-bai__hero-image {
        object-fit: contain !important; /* Prevent cropping */
        aspect-ratio: unset !important; /* Allow natural aspect ratio */
        height: auto !important; /* Ensure height adjusts */
        width: 100% !important;
        max-width: 100% !important;
    }
    .page-game-bai__hero-image-wrapper {
        position: static; /* Remove absolute positioning on mobile to flow naturally */
        height: auto;
    }
    .page-game-bai__hero-content {
        padding: 20px 15px;
        border-radius: 10px;
        margin-top: 20px;
        max-width: 100%;
        width: 100%;
    }
    .page-game-bai__main-title {
        font-size: clamp(24px, 7vw, 36px);
        margin-bottom: 10px;
    }
    .page-game-bai__main-description {
        font-size: clamp(14px, 4vw, 18px);
        margin-bottom: 20px;
    }

    /* 按钮与按钮容器 */
    .page-game-bai__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px;
    }
    .page-game-bai__btn-primary,
    .page-game-bai__btn-secondary,
    .page-game-bai__btn-play,
    .page-game-bai__guide-link,
    .page-game-bai a[class*="button"],
    .page-game-bai a[class*="btn"] {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important; /* Remove margin for stacked buttons */
        padding: 12px 15px !important;
        font-size: 16px !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* 产品展示图区域 */
    .page-game-bai__games-grid,
    .page-game-bai__promotions-grid {
        grid-template-columns: 1fr !important; /* Single column on mobile */
        gap: 20px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
    .page-game-bai__games-showcase .page-game-bai__game-card,
    .page-game-bai__promotions-section .page-game-bai__promo-card {
        padding-bottom: 15px;
    }
    .page-game-bai__game-image,
    .page-game-bai__promo-image {
        height: 180px;
    }

    /* Guide Section mobile */
    .page-game-bai__guide-steps {
        grid-template-columns: 1fr !important; /* Single column */
        gap: 20px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-game-bai__guide-item {
        padding: 25px 15px;
    }
    .page-game-bai__guide-icon {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 24px;
        margin-bottom: 15px;
    }
    .page-game-bai__tips-section {
        padding: 30px 20px;
        margin-top: 40px;
    }

    /* 通用图片与容器 */
    .page-game-bai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    .page-game-bai__image-content {
        margin: 20px auto !important;
    }
}