/* style/game-bai.css */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --register-color: #C30808;
    --login-color: #C30808;
    --text-color-dark: #333333;
    --text-color-light: #FFFFFF;
    --register-login-font-color: #FFFF00;
}

.page-game-bai {
    font-family: Arial, sans-serif;
    color: var(--text-color-dark);
}

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

/* Section Titles */
.page-game-bai__section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
}

.page-game-bai__section-title--light {
    color: var(--text-color-light);
}

/* Buttons */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-game-bai__btn-primary {
    background-color: var(--register-color);
    color: var(--register-login-font-color);
    border-color: var(--register-color);
}

.page-game-bai__btn-primary:hover {
    background-color: darken(var(--register-color), 10%);
    border-color: darken(var(--register-color), 10%);
}

.page-game-bai__btn-secondary {
    background-color: var(--login-color);
    color: var(--register-login-font-color);
    border-color: var(--login-color);
}

.page-game-bai__btn-secondary:hover {
    background-color: darken(var(--login-color), 10%);
    border-color: darken(var(--login-color), 10%);
}

.page-game-bai__text-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.page-game-bai__text-link:hover {
    text-decoration: underline;
}

/* HERO Section */
.page-game-bai__hero-section {
    padding-top: 10px;
    padding-bottom: 60px;
    background-color: var(--secondary-color);
}

.page-game-bai__hero-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.page-game-bai__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    text-align: left;
}

.page-game-bai__hero-title {
    font-size: clamp(2.2em, 4vw, 3.5em);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-game-bai__hero-description {
    font-size: 1.15em;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--text-color-dark);
}

.page-game-bai__hero-cta-buttons {
    display: flex;
    gap: 15px;
}

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

.page-game-bai__hero-side-image {
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Intro Section */
.page-game-bai__intro-section {
    background-color: var(--secondary-color);
    padding-bottom: 60px;
}

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

.page-game-bai__icon-box {
    text-align: center;
    padding: 30px;
    background-color: var(--secondary-color);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.page-game-bai__icon-box:hover {
    transform: translateY(-10px);
}

.page-game-bai__icon-box-media {
    width: 240px;
    height: 240px;
    aspect-ratio: 1/1;
    margin: 0 auto 25px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 8px rgba(1, 116, 57, 0.2);
}

.page-game-bai__icon-box-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.page-game-bai__icon-box-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-game-bai__icon-box-description {
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-color-dark);
}

/* Game Tabs Section */
.page-game-bai__game-tabs-section {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    padding-bottom: 60px;
}

.page-game-bai__tab-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.page-game-bai__tab-button {
    background-color: transparent;
    border: none;
    color: var(--text-color-light);
    font-size: 1.1em;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 8px;
}

.page-game-bai__tab-button:hover,
.page-game-bai__tab-button.is-active {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.page-game-bai__tab-panels {
    margin-top: 30px;
}

.page-game-bai__game-panel {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.page-game-bai__game-panel.is-active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-game-bai__game-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.page-game-bai__game-image {
    flex: 1 1 45%;
    min-width: 280px;
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-game-bai__game-title {
    flex: 1 1 45%;
    min-width: 280px;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-color-light);
    margin-bottom: 15px;
}

.page-game-bai__game-description {
    flex-basis: 100%;
    font-size: 1.05em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

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

/* Guide Section */
.page-game-bai__guide-section {
    background-color: var(--secondary-color);
    padding-bottom: 60px;
}

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

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

.page-game-bai__guide-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 20px;
}

.page-game-bai__guide-step-number {
    font-size: 2.5em;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    flex-shrink: 0;
    width: 50px;
    text-align: center;
}

.page-game-bai__guide-step-title {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-game-bai__guide-step-description {
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-color-dark);
}

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

.page-game-bai__guide-image {
    max-width: 800px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Benefits Section */
.page-game-bai__benefits-section {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    padding-bottom: 60px;
}

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

.page-game-bai__benefit-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.page-game-bai__benefit-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-color-light);
    margin-bottom: 15px;
}

.page-game-bai__benefit-description,
.page-game-bai__benefit-box-description {
    font-size: 1em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.page-game-bai__benefits-image-wrapper {
    text-align: center;
}

.page-game-bai__benefits-image {
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.page-game-bai__faq-section {
    background-color: var(--secondary-color);
    padding-bottom: 60px;
}

.page-game-bai__faq-list {
    margin-top: 40px;
}

.page-game-bai__faq-item {
    background-color: var(--secondary-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.page-game-bai__faq-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-game-bai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    list-style: none;
    position: relative;
}

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

.page-game-bai__faq-question::marker {
    display: none;
}

.page-game-bai__faq-toggle {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
    transform: rotate(45deg);
}

.page-game-bai__faq-answer {
    padding: 0 20px 20px;
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-color-dark);
    /* For details tag, this will be handled by native open/close */
}

/* CTA Section */
.page-game-bai__cta-section {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    text-align: center;
    padding-bottom: 60px;
}

.page-game-bai__cta-description {
    font-size: 1.15em;
    line-height: 1.6;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}


/* Responsive Styles */
@media (max-width: 1024px) {
    .page-game-bai__hero-container {
        flex-direction: column;
        text-align: center;
    }

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

    .page-game-bai__hero-image {
        flex: 1 1 100%;
    }

    .page-game-bai__guide-content {
        flex-direction: column-reverse;
    }

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

    .page-game-bai__guide-image-wrapper {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .page-game-bai__container {
        padding: 30px 15px;
    }

    .page-game-bai__section-title {
        font-size: 2em;
        margin-bottom: 30px;
    }

    /* HERO Section */
    .page-game-bai__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px;
    }

    .page-game-bai__hero-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

    .page-game-bai__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }

    .page-game-bai__hero-cta-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .page-game-bai__btn-primary,
    .page-game-bai__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Intro Section */
    .page-game-bai__icon-box-media {
        width: 200px;
        height: 200px;
        margin-bottom: 20px;
    }

    .page-game-bai__icon-box-title {
        font-size: 1.3em;
    }

    /* Game Tabs Section */
    .page-game-bai__tab-nav {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 30px;
        padding-bottom: 8px;
    }

    .page-game-bai__tab-button {
        font-size: 1em;
        padding: 8px 15px;
    }

    .page-game-bai__game-card {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .page-game-bai__game-image {
        min-width: unset;
        flex: none;
    }

    .page-game-bai__game-title {
        min-width: unset;
        flex: none;
        font-size: 1.5em;
    }

    .page-game-bai__game-description {
        font-size: 0.95em;
    }

    /* Guide Section */
    .page-game-bai__guide-content {
        gap: 30px;
    }

    .page-game-bai__guide-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        margin-bottom: 25px;
    }

    .page-game-bai__guide-step-number {
        font-size: 2em;
        width: auto;
    }

    .page-game-bai__guide-step-title {
        font-size: 1.4em;
    }

    /* Benefits Section */
    .page-game-bai__benefits-grid {
        gap: 20px;
    }

    .page-game-bai__benefit-title {
        font-size: 1.3em;
    }

    /* FAQ Section */
    .page-game-bai__faq-question {
        font-size: 1.1em;
        padding: 15px;
    }

    .page-game-bai__faq-answer {
        padding: 0 15px 15px;
        font-size: 0.95em;
    }

    /* CTA Section */
    .page-game-bai__cta-description {
        font-size: 1em;
    }

    /* Universal Image & Container Rules for Mobile */
    .page-game-bai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-game-bai__section,
    .page-game-bai__card,
    .page-game-bai__container,
    .page-game-bai__hero-section,
    .page-game-bai__intro-section,
    .page-game-bai__game-tabs-section,
    .page-game-bai__guide-section,
    .page-game-bai__benefits-section,
    .page-game-bai__faq-section,
    .page-game-bai__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-game-bai__hero-cta-buttons,
    .page-game-bai__button-group,
    .page-game-bai__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
        flex-direction: column !important;
        gap: 10px;
    }
}