/* style/game-bai.css */

/* General styles for the page-game-bai scope */
.page-game-bai {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--accent-color, #FFFFFF); /* Assuming shared.css defines --accent-color, default to white */
}

.page-game-bai__container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 40px 16px;
    box-sizing: border-box;
}

.page-game-bai__section-title {
    font-size: 2.5em;
    font-weight: bold;
    color: #26A9E0;
    text-align: center;
    margin-bottom: 20px;
}

.page-game-bai__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    color: #555555;
}

.page-game-bai__btn-primary {
    display: inline-block;
    background-color: #26A9E0;
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: 2px solid transparent;
    max-width: 100%; /* Ensure responsive */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-game-bai__btn-primary:hover {
    background-color: #1e87b3;
}

.page-game-bai__btn-secondary {
    display: inline-block;
    background-color: #ffffff;
    color: #26A9E0;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 2px solid #26A9E0;
    max-width: 100%; /* Ensure responsive */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-game-bai__btn-secondary:hover {
    background-color: #26A9E0;
    color: #ffffff;
}

.page-game-bai__btn-link {
    display: inline-block;
    color: #EA7C07; /* Login color for specific links as per color scheme */
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: color 0.3s ease;
}

.page-game-bai__btn-link:hover {
    color: #c26505;
}

/* Color contrast classes */
.page-game-bai__light-bg {
    background-color: #ffffff;
    color: #333333;
}

.page-game-bai__dark-section {
    background-color: #26A9E0;
    color: #ffffff;
}

.page-game-bai__dark-section .page-game-bai__section-title,
.page-game-bai__dark-section .page-game-bai__section-description,
.page-game-bai__dark-section .page-game-bai__game-title,
.page-game-bai__dark-section .page-game-bai__game-text {
    color: #ffffff;
}

/* Hero Section */
.page-game-bai__hero-section {
    padding-top: 10px; /* Small top padding as per instruction */
    padding-bottom: 60px;
    background-color: #f0f8ff; /* A very light blue tint for the hero section background, to complement the main color */
}

.page-game-bai__hero-container {
    max-width: 1170px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 40px 16px;
    gap: 24px;
}

.page-game-bai__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    text-align: left;
    color: #1e1765; /* Darker text for contrast on light hero background */
}

.page-game-bai__hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Clamp for H1, no fixed large size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #26A9E0;
}

.page-game-bai__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #555555;
    max-width: 600px;
}

.page-game-bai__hero-cta-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.page-game-bai__hero-image {
    flex: 1 1 45%;
    min-width: 300px;
    text-align: center;
}

.page-game-bai__hero-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Intro Section - Module 1 */
.page-game-bai__intro-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

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

.page-game-bai__feature-item {
    text-align: center;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page-game-bai__icon-box-media {
    width: 240px;
    height: 240px;
    aspect-ratio: 1 / 1; /* Ensures square aspect ratio */
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #26A9E0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-game-bai__icon-box-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* Make image round inside the box */
    display: block;
}

.page-game-bai__feature-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #26A9E0;
    margin-bottom: 10px;
}

.page-game-bai__feature-text {
    color: #555555;
}

/* Popular Games Section */
.page-game-bai__popular-games-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

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

.page-game-bai__game-card {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding-bottom: 20px;
}

.page-game-bai__game-card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-game-bai__game-title {
    font-size: 1.4em;
    font-weight: bold;
    color: #26A9E0;
    margin: 20px 15px 10px;
}

.page-game-bai__game-text {
    color: #555555;
    padding: 0 15px;
    margin-bottom: 15px;
}

.page-game-bai__cta-center {
    text-align: center;
    margin-top: 40px;
}

/* Guide Section */
.page-game-bai__guide-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

.page-game-bai__guide-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
    align-items: center;
}

.page-game-bai__guide-steps {
    flex: 1 1 55%;
    min-width: 300px;
}

.page-game-bai__guide-step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 15px;
}

.page-game-bai__guide-step-number {
    background-color: #26A9E0;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.2em;
    flex-shrink: 0;
}

.page-game-bai__guide-step-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #26A9E0;
    margin-bottom: 5px;
}

.page-game-bai__guide-step-text {
    color: #555555;
}

.page-game-bai__guide-image {
    flex: 1 1 40%;
    min-width: 300px;
    text-align: center;
}

.page-game-bai__guide-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Promo Section */
.page-game-bai__promo-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

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

.page-game-bai__promo-card {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding-bottom: 20px;
}

.page-game-bai__promo-card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-game-bai__promo-title {
    font-size: 1.4em;
    font-weight: bold;
    color: #26A9E0;
    margin: 20px 15px 10px;
}

.page-game-bai__promo-text {
    color: #555555;
    padding: 0 15px;
}

/* FAQ Section */
.page-game-bai__faq-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

.page-game-bai__faq-list {
    max-width: 900px;
    margin: 40px auto 0;
}

.page-game-bai__faq-item {
    background-color: #ffffff;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.page-game-bai__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-weight: bold;
    color: #26A9E0;
    font-size: 1.15em;
    list-style: none; /* Hide default marker */
    transition: background-color 0.3s ease;
}

.page-game-bai__faq-item summary:hover {
    background-color: #e0f2ff;
}

/* Hide default marker for Webkit browsers */
.page-game-bai__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-game-bai__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: #26A9E0;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
    content: "−"; /* Visually update toggle when open */
}

.page-game-bai__faq-answer {
    padding: 0 25px 18px;
    color: #555555;
    font-size: 1em;
    line-height: 1.6;
}

/* CTA Section */
.page-game-bai__cta-section {
    padding-top: 60px;
    padding-bottom: 60px;
    text-align: center;
}

.page-game-bai__cta-content {
    padding-top: 40px;
    padding-bottom: 40px;
}

.page-game-bai__cta-section .page-game-bai__section-title,
.page-game-bai__cta-section .page-game-bai__section-description {
    color: #ffffff;
}

.page-game-bai__cta-section .page-game-bai__cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-game-bai__container {
        padding: 30px 20px;
    }

    .page-game-bai__section-title {
        font-size: 2em;
    }

    .page-game-bai__hero-title {
        font-size: clamp(2rem, 4vw, 3rem);
    }
}

@media (max-width: 768px) {
    /* General mobile adaptations */
    .page-game-bai__container,
    .page-game-bai__hero-container,
    .page-game-bai__hero-cta-group,
    .page-game-bai__cta-section .page-game-bai__cta-group {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-game-bai__section-title {
        font-size: 1.8em;
    }

    .page-game-bai__section-description {
        font-size: 1em;
    }

    /* HERO 双栏 - Stacked layout */
    .page-game-bai__hero-section {
        padding-top: 10px !important; /* Specific override for header offset */
        padding-bottom: 40px;
    }

    .page-game-bai__hero-container {
        flex-direction: column;
        text-align: center;
    }

    .page-game-bai__hero-content {
        flex: 1 1 100%;
        text-align: center;
        min-width: unset;
    }

    .page-game-bai__hero-image {
        flex: 1 1 100%;
        min-width: unset;
        order: -1; /* Image above text on mobile */
        margin-bottom: 30px;
    }
    
    .page-game-bai__hero-image img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-game-bai__hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .page-game-bai__hero-description {
        font-size: 1.1em;
    }

    .page-game-bai__hero-cta-group {
        flex-direction: column;
        gap: 15px;
    }

    /* Buttons responsive */
    .page-game-bai__btn-primary,
    .page-game-bai__btn-secondary,
    .page-game-bai a[class*="button"],
    .page-game-bai 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-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Button containers mobile adaptation */
    .page-game-bai__hero-cta-group,
    .page-game-bai__cta-section .page-game-bai__cta-group {
        flex-direction: column !important;
        gap: 15px !important;
    }

    /* 模块1 三栏正圆图 */
    .page-game-bai__features-grid {
        grid-template-columns: 1fr;
    }

    .page-game-bai__icon-box-media {
        width: 200px !important; /* Still square */
        height: 200px !important; /* Still square */
        margin-bottom: 15px;
    }

    .page-game-bai__icon-box-media img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* Ensure it remains round */
    }

    /* Popular Games Section */
    .page-game-bai__game-grid {
        grid-template-columns: 1fr;
    }

    .page-game-bai__game-card img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important; /* Allow height to adjust */
    }

    /* Guide Section */
    .page-game-bai__guide-content {
        flex-direction: column;
    }

    .page-game-bai__guide-steps {
        flex: 1 1 100%;
        min-width: unset;
    }

    .page-game-bai__guide-image {
        flex: 1 1 100%;
        min-width: unset;
        order: -1; /* Image above text on mobile */
        margin-bottom: 30px;
    }

    .page-game-bai__guide-image img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Promo Section */
    .page-game-bai__promo-grid {
        grid-template-columns: 1fr;
    }

    .page-game-bai__promo-card img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important; /* Allow height to adjust */
    }

    /* FAQ Section */
    .page-game-bai__faq-item summary {
        padding: 15px 20px;
        font-size: 1em;
    }

    .page-game-bai__faq-answer {
        padding: 0 20px 15px;
    }

    /* CTA Section */
    .page-game-bai__cta-section .page-game-bai__cta-group {
        flex-direction: column;
    }

    /* Universal image responsive rule for content area */
    .page-game-bai img:not(.page-game-bai__icon-box-media img) {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* All content containers for mobile */
    .page-game-bai__intro-section,
    .page-game-bai__popular-games-section,
    .page-game-bai__guide-section,
    .page-game-bai__promo-section,
    .page-game-bai__faq-section,
    .page-game-bai__cta-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}