/* style/game-bai.css */

:root {
    --primary-color: #2F6BFF;
    --secondary-color: #6FA3FF;
    --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
    --card-bg: #FFFFFF;
    --background-light: #F4F7FB;
    --text-main: #1F2D3D;
    --text-black: #000000;
    --border-color: #D6E2FF;
    --glow-color: #A5C4FF;
}

.page-game-bai {
    font-family: 'Arial', sans-serif;
    color: var(--text-main);
    background-color: var(--background-light); /* Assuming light body background from shared */
    line-height: 1.6;
}

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

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

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

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary,
.page-game-bai__btn-play {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1em;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-game-bai__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(47, 107, 255, 0.3);
}

.page-game-bai__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 107, 255, 0.4);
}

.page-game-bai__btn-secondary {
    background: var(--card-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-game-bai__btn-secondary:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.page-game-bai__hero-section {
    background: var(--primary-color);
    color: #ffffff;
    padding: 10px 0 60px; /* Adjusted padding-top as per instruction */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-game-bai__hero-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    gap: 40px;
}

.page-game-bai__hero-text-block {
    flex: 1;
    text-align: left;
    max-width: 600px;
}

.page-game-bai__hero-title {
    font-size: clamp(2.5em, 5vw, 3.5em); /* Using clamp for H1 font size */
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

.page-game-bai__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

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

.page-game-bai__hero-image-block {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

/* Game Types Section */
.page-game-bai__game-types-section {
    padding: 60px 0;
    background-color: var(--card-bg);
}

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

.page-game-bai__game-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.page-game-bai__game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.page-game-bai__game-card-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    aspect-ratio: 1/1; /* Ensure square aspect ratio for game images */
    object-fit: cover;
    display: block;
}

.page-game-bai__game-card-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

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

.page-game-bai__btn-play {
    background: var(--button-gradient);
    color: #ffffff;
    border: none;
    width: 100%;
}

.page-game-bai__btn-play:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Advantages Section */
.page-game-bai__advantages-section {
    padding: 60px 0;
    background-color: var(--background-light);
}

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

.page-game-bai__advantage-item {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}

.page-game-bai__advantage-item:hover {
    transform: translateY(-5px);
}

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

.page-game-bai__advantage-description {
    font-size: 1em;
    color: var(--text-main);
}

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

.page-game-bai__guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-game-bai__step-item {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

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

.page-game-bai__step-description {
    font-size: 0.95em;
    color: var(--text-main);
}

.page-game-bai__step-description a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-game-bai__step-description a:hover {
    text-decoration: underline;
}

/* Tips Section */
.page-game-bai__tips-section {
    padding: 60px 0;
    background-color: var(--background-light);
}

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

.page-game-bai__tip-item {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    padding: 30px;
    transition: transform 0.3s ease;
}

.page-game-bai__tip-item:hover {
    transform: translateY(-5px);
}

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

.page-game-bai__tip-description {
    font-size: 1em;
    color: var(--text-main);
}

.page-game-bai__tip-description a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-game-bai__tip-description a:hover {
    text-decoration: underline;
}

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

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

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

.page-game-bai__faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1em;
    color: var(--text-black);
    background-color: #f9f9f9;
    position: relative;
}

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

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

.page-game-bai__faq-qtext {
    flex-grow: 1;
    color: var(--text-black);
}

.page-game-bai__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--primary-color);
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
    content: '−';
}

.page-game-bai__faq-answer {
    padding: 15px 25px 20px;
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-main);
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
}

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

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

.page-game-bai__faq-answer a:hover {
    text-decoration: underline;
}

/* CTA Bottom Section */
.page-game-bai__cta-bottom-section {
    padding: 80px 0;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    text-align: center;
}

.page-game-bai__cta-bottom-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    text-align: left;
}

.page-game-bai__cta-text {
    flex: 1;
    max-width: 600px;
}

.page-game-bai__cta-bottom-section .page-game-bai__section-title {
    color: #ffffff;
    text-align: left;
}

.page-game-bai__cta-bottom-section .page-game-bai__section-description {
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    margin: 0 0 30px;
}

.page-game-bai__cta-bottom-section .page-game-bai__section-description a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
}

.page-game-bai__cta-bottom-buttons {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
}

.page-game-bai__cta-image-block {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-game-bai__cta-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: block;
}

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

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

    .page-game-bai__hero-content-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .page-game-bai__hero-text-block,
    .page-game-bai__hero-image-block {
        max-width: 100%;
        text-align: center;
    }

    .page-game-bai__hero-cta-buttons {
        justify-content: center;
    }

    .page-game-bai__cta-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .page-game-bai__cta-text {
        max-width: 100%;
    }

    .page-game-bai__cta-bottom-section .page-game-bai__section-title,
    .page-game-bai__cta-bottom-section .page-game-bai__section-description {
        text-align: center;
    }

    .page-game-bai__cta-buttons-bottom {
        justify-content: center;
    }
}

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

    .page-game-bai__container {
        padding-left: 15px;
        padding-right: 15px;
    }

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

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

    /* Hero Section */
    .page-game-bai__hero-section {
        padding: 10px 0 40px !important; /* Fixed padding-top for mobile */
        min-height: auto;
    }

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

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

    .page-game-bai__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
        padding: 0 15px;
    }

    .page-game-bai__btn-primary,
    .page-game-bai__btn-secondary {
        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;
    }

    .page-game-bai__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain; /* Ensure main image is contained, not cropped */
        aspect-ratio: unset;
        max-height: none;
    }

    /* Game Grid Section */
    .page-game-bai__game-grid {
        grid-template-columns: 1fr 1fr; /* 2 columns on mobile */
        gap: 15px;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }

    .page-game-bai__game-card {
        padding: 15px;
    }

    .page-game-bai__game-card-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1/1; /* Maintain square aspect ratio */
        object-fit: cover;
    }

    .page-game-bai__game-card-title {
        font-size: 1.2em;
    }

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

    .page-game-bai__btn-play {
        font-size: 0.9em;
        padding: 10px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Advantages Section */
    .page-game-bai__advantages-grid,
    .page-game-bai__guide-steps,
    .page-game-bai__tips-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-game-bai__advantage-item,
    .page-game-bai__step-item,
    .page-game-bai__tip-item {
        padding: 20px;
    }

    .page-game-bai__advantage-title,
    .page-game-bai__tip-title {
        font-size: 1.2em;
    }

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

    .page-game-bai__faq-toggle {
        font-size: 1.2em;
    }

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

    /* CTA Bottom Section */
    .page-game-bai__cta-bottom-section {
        padding: 50px 0;
    }

    .page-game-bai__cta-text {
        text-align: center;
    }

    .page-game-bai__cta-bottom-section .page-game-bai__section-title,
    .page-game-bai__cta-bottom-section .page-game-bai__section-description {
        text-align: center;
    }

    .page-game-bai__cta-buttons-bottom {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
        padding: 0 15px;
    }

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

    /* Universal image and container rules for mobile */
    .page-game-bai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-game-bai__section,
    .page-game-bai__card,
    .page-game-bai__container,
    .page-game-bai__hero-content-wrapper,
    .page-game-bai__cta-bottom-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}