/* style/game-bai.css */
:root {
    --primary-color: #C61F1F;
    --secondary-color: #E53030;
    --bg-dark: #140C0C;
    --bg-card: #2A1212;
    --text-main: #FFF1E8;
    --border-color: #6A1E1E;
    --gold-color: #F3C54D;
    --deep-red-color: #7E0D0D;
    --button-gradient: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
}

.page-game-bai {
    font-family: 'Arial', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-dark);
    line-height: 1.6;
}

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

.page-game-bai__text-block {
    padding: 40px 20px;
}

.page-game-bai__section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

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

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

.page-game-bai__hero-section {
    position: relative;
    overflow: hidden;
    padding-top: 10px; /* Rely on body padding for header offset */
    background: var(--bg-dark);
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-game-bai__hero-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.page-game-bai__hero-image-container {
    width: 100%;
    margin-bottom: 30px;
}

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

.page-game-bai__hero-text-content {
    text-align: center;
    max-width: 900px;
    color: var(--text-main);
}

.page-game-bai__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
    font-weight: 800;
    color: var(--gold-color);
    margin-bottom: 15px;
    line-height: 1.1;
    letter-spacing: 0.05em;
}

.page-game-bai__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-game-bai__hero-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-game-bai__btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-game-bai__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 176, 74, 0.4);
}

.page-game-bai__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 176, 74, 0.6);
}

.page-game-bai__btn-secondary {
    background-color: transparent;
    color: var(--gold-color);
    border: 2px solid var(--gold-color);
    box-shadow: 0 4px 10px rgba(243, 197, 77, 0.2);
}

.page-game-bai__btn-secondary:hover {
    background-color: var(--gold-color);
    color: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(243, 197, 77, 0.4);
}

.page-game-bai__introduction-section {
    background-color: #1a0e0e; /* Slightly lighter dark background */
    padding: 60px 0;
    color: var(--text-main);
}

.page-game-bai__introduction-section p {
    font-size: 1.05em;
    margin-bottom: 20px;
    text-align: justify;
}

.page-game-bai__introduction-section a {
    color: var(--gold-color);
    text-decoration: underline;
}

.page-game-bai__games-showcase {
    background-color: var(--bg-dark);
    padding: 60px 0;
    color: var(--text-main);
}

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

.page-game-bai__game-card {
    background-color: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-bai__game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

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

.page-game-bai__game-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--gold-color);
    padding: 15px 20px 10px;
    margin: 0;
}

.page-game-bai__game-title a {
    color: inherit;
    text-decoration: none;
}

.page-game-bai__game-title a:hover {
    text-decoration: underline;
}

.page-game-bai__game-description {
    font-size: 0.95em;
    color: var(--text-main);
    padding: 0 20px 15px;
    flex-grow: 1;
}

.page-game-bai__game-description a {
    color: var(--gold-color);
    text-decoration: underline;
}

.page-game-bai__btn-small {
    padding: 10px 20px;
    font-size: 0.9em;
    margin: 0 20px 20px;
    background: var(--button-gradient);
    color: #ffffff;
    border: none;
}

.page-game-bai__btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(255, 176, 74, 0.5);
}

.page-game-bai__why-choose-section {
    background-color: #1a0e0e; /* Slightly lighter dark background */
    padding: 60px 0;
    color: var(--text-main);
}

.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 {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.page-game-bai__feature-title {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--gold-color);
    margin-bottom: 15px;
}

.page-game-bai__feature-item p {
    font-size: 0.95em;
    color: var(--text-main);
}

.page-game-bai__feature-item a {
    color: var(--gold-color);
    text-decoration: underline;
}

.page-game-bai__how-to-play-section {
    background-color: var(--bg-dark);
    padding: 60px 0;
    color: var(--text-main);
}

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

.page-game-bai__step-card {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-game-bai__step-number {
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: var(--button-gradient);
    border-radius: 50%;
    font-size: 2em;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(255, 176, 74, 0.4);
}

.page-game-bai__step-title {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--gold-color);
    margin-bottom: 15px;
}

.page-game-bai__step-card p {
    font-size: 0.95em;
    color: var(--text-main);
    flex-grow: 1;
    margin-bottom: 20px;
}

.page-game-bai__step-card a {
    color: var(--gold-color);
    text-decoration: underline;
}

.page-game-bai__btn-link {
    background-color: transparent;
    color: var(--gold-color);
    border: 2px solid var(--gold-color);
    padding: 10px 20px;
    font-size: 0.9em;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-game-bai__btn-link:hover {
    background-color: var(--gold-color);
    color: var(--bg-dark);
}

.page-game-bai__faq-section {
    background-color: #1a0e0e; /* Slightly lighter dark background */
    padding: 60px 0;
    color: var(--text-main);
}

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

.page-game-bai__faq-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-game-bai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--gold-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;
    line-height: 1;
    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: 0.95em;
    color: var(--text-main);
}

.page-game-bai__faq-answer p {
    margin: 0;
}

.page-game-bai__faq-answer a {
    color: var(--gold-color);
    text-decoration: underline;
}

.page-game-bai__cta-final-section {
    background-color: var(--bg-dark);
    padding: 60px 0;
    text-align: center;
    color: var(--text-main);
}

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

/* General image and link styles for content area */
.page-game-bai img {
    max-width: 100%;
    height: auto;
    display: block;
}

.page-game-bai p a,
.page-game-bai li a {
    color: var(--gold-color);
    text-decoration: underline;
}

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

    .page-game-bai__hero-section {
        min-height: 500px;
    }

    .page-game-bai__main-title {
        font-size: clamp(1.8em, 5vw, 3em);
    }

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

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

    .page-game-bai__games-grid,
    .page-game-bai__features-grid,
    .page-game-bai__steps-grid {
        gap: 20px;
    }

    .page-game-bai__game-image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .page-game-bai {
        font-size: 16px;
        line-height: 1.6;
    }

    /* Top section title + dual CTA */
    .page-game-bai__hero-section {
        padding-top: 10px !important; /* Rely on body padding for header offset */
        min-height: unset;
    }

    .page-game-bai__hero-content-wrapper {
        flex-direction: column;
        padding: 15px;
    }

    .page-game-bai__hero-image-container {
        margin-bottom: 20px;
    }

    .page-game-bai__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em) !important;
        margin-bottom: 10px;
    }

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

    .page-game-bai__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .page-game-bai__btn,
    .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;
        padding-right: 15px;
    }

    /* Single column long text container */
    .page-game-bai__container,
    .page-game-bai__text-block,
    .page-game-bai__section,
    .page-game-bai__card,
    .page-game-bai__games-grid,
    .page-game-bai__features-grid,
    .page-game-bai__steps-grid,
    .page-game-bai__faq-list,
    .page-game-bai__button-group,
    .page-game-bai__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

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

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

    /* Generic images and figure */
    .page-game-bai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-game-bai__game-image {
        height: 160px;
    }

    /* Buttons and button containers (already covered above, ensuring full width and wrapping) */
    .page-game-bai__cta-buttons {
        flex-direction: column;
        gap: 10px;
    }

    /* Registration tutorial (steps) and FAQ blocks */
    .page-game-bai__step-card,
    .page-game-bai__feature-item,
    .page-game-bai__game-card {
        padding: 25px;
    }

    .page-game-bai__step-title,
    .page-game-bai__feature-title,
    .page-game-bai__game-title {
        font-size: 1.2em;
    }

    .page-game-bai__step-number {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .page-game-bai__faq-question {
        font-size: 1em;
        padding: 15px;
    }

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

    .page-game-bai__btn-small,
    .page-game-bai__btn-link {
        padding: 8px 15px;
        font-size: 0.85em;
    }
}