/* style/game-bai.css */

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

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

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

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

.page-game-bai__text-block {
    font-size: 17px;
    margin-bottom: 20px;
    text-align: justify;
}

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

.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.15);
}

.page-game-bai__btn-play {
    background: var(--button-gradient);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 6px;
    margin-top: 15px;
}

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

.page-game-bai__btn-link {
    background: none;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 6px;
    margin-top: 15px;
}

.page-game-bai__btn-link:hover {
    background: var(--primary-color);
    color: #ffffff;
}

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

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

.page-game-bai__image-content {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin: 40px auto;
}

.page-game-bai__image-content--large {
    max-width: 1000px;
}

/* Hero Section */
.page-game-bai__hero-section {
    padding-top: 10px; /* Minimal top padding, rely on body for header offset */
    background-color: var(--page-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 60px;
}

.page-game-bai__hero-image-wrapper {
    width: 100%;
    max-height: 600px;
    overflow: hidden;
    margin-bottom: 40px;
}

.page-game-bai__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
}

.page-game-bai__hero-content {
    max-width: 900px;
    padding: 0 20px;
}

.page-game-bai__hero-title {
    font-size: 52px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.1;
}

.page-game-bai__hero-description {
    font-size: 20px;
    color: var(--text-main);
    margin-bottom: 30px;
    line-height: 1.5;
}

.page-game-bai__hero-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Intro Section */
.page-game-bai__intro-section {
    padding: 60px 0;
    background-color: var(--card-bg);
    margin-bottom: 60px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

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

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

.page-game-bai__game-card {
    background-color: var(--card-bg);
    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;
    align-items: center;
}

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

.page-game-bai__game-card-image {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

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

/* How-to-Play Section */
.page-game-bai__how-to-play-section {
    padding: 60px 0;
    background-color: var(--card-bg);
    margin-bottom: 60px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

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

.page-game-bai__step-item {
    text-align: center;
    padding: 30px;
    border-radius: 12px;
    background-color: #f8faff; /* Light blue background */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.page-game-bai__step-icon {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin-bottom: 20px;
}

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

.page-game-bai__step-description {
    font-size: 17px;
    color: var(--text-main);
    margin-bottom: 20px;
}

/* Strategy Section */
.page-game-bai__strategy-section {
    padding: 60px 0;
    margin-bottom: 60px;
}

.page-game-bai__strategy-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.page-game-bai__strategy-item {
    background-color: var(--card-bg);
    border-left: 5px solid var(--primary-color);
    padding: 20px 25px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    font-size: 17px;
    line-height: 1.8;
}

.page-game-bai__strategy-item strong {
    color: var(--primary-color);
}

/* Promotion Section */
.page-game-bai__promotion-section {
    padding: 60px 0;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 12px;
    margin-bottom: 60px;
    box-shadow: 0 10px 30px rgba(47, 107, 255, 0.2);
}

.page-game-bai__promotion-section .page-game-bai__section-title {
    color: #ffffff;
}

.page-game-bai__promotion-section .page-game-bai__text-block {
    color: #e0eaff;
}

.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: rgba(255, 255, 255, 0.15); /* Slightly transparent white */
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-game-bai__promo-title {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
}

.page-game-bai__promo-description {
    font-size: 16px;
    color: #e0eaff;
    margin-bottom: 25px;
    flex-grow: 1;
}

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

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

.page-game-bai__faq-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

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

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

.page-game-bai__faq-question:hover {
    background-color: #f0f5ff;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-question {
    background-color: #e6efff;
    color: var(--primary-color);
}

.page-game-bai__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-left: 15px;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
    color: var(--primary-color);
}

.page-game-bai__faq-answer {
    padding: 0 25px 20px;
    font-size: 16px;
    color: var(--text-main);
    line-height: 1.7;
}

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

/* Conclusion Section */
.page-game-bai__conclusion-section {
    padding: 60px 0 80px;
    text-align: center;
    background-color: var(--page-bg);
}

.page-game-bai__conclusion-section .page-game-bai__section-title {
    color: var(--primary-color);
}

.page-game-bai__conclusion-section .page-game-bai__text-block {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 18px;
}

.page-game-bai__cta-buttons--bottom {
    margin-top: 0;
}

/* Responsive Styles */

/* Common mobile styles for images and containers */
@media (max-width: 768px) {
    .page-game-bai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-game-bai__container,
    .page-game-bai__section,
    .page-game-bai__card,
    .page-game-bai__promo-card,
    .page-game-bai__game-card,
    .page-game-bai__step-item,
    .page-game-bai__faq-item,
    .page-game-bai__hero-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-game-bai__btn-primary,
    .page-game-bai__btn-secondary,
    .page-game-bai__btn-play,
    .page-game-bai__btn-link {
        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-cta-buttons,
    .page-game-bai__cta-buttons--bottom {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 15px;
        box-sizing: border-box !important;
    }
}

@media (max-width: 768px) {
    /* Hero Section */
    .page-game-bai__hero-section {
        padding-top: 10px !important;
        margin-bottom: 40px;
    }

    .page-game-bai__hero-image-wrapper {
        margin-bottom: 20px;
        max-height: 400px; /* Adjust max height for mobile hero */
    }

    .page-game-bai__hero-image {
        object-fit: contain; /* Ensure image is fully visible without cropping */
        aspect-ratio: unset;
        max-height: none;
    }

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

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

    /* General Sections */
    .page-game-bai__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .page-game-bai__intro-section,
    .page-game-bai__popular-games-section,
    .page-game-bai__how-to-play-section,
    .page-game-bai__strategy-section,
    .page-game-bai__promotion-section,
    .page-game-bai__faq-section,
    .page-game-bai__conclusion-section {
        padding: 40px 0;
        margin-bottom: 40px;
    }

    .page-game-bai__text-block {
        font-size: 16px;
    }

    /* Game Grid */
    .page-game-bai__game-grid {
        grid-template-columns: 1fr 1fr; /* Two columns on mobile */
        gap: 20px;
        overflow-x: hidden;
    }

    .page-game-bai__game-card-image {
        width: 100%; /* Make game card images fill width */
        height: auto;
        aspect-ratio: 1 / 1; /* Maintain square aspect ratio */
        object-fit: cover;
    }
    
    .page-game-bai__game-card-title {
        font-size: 20px;
    }

    .page-game-bai__game-card-description {
        font-size: 14px;
    }

    /* How-to-Play Steps */
    .page-game-bai__step-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-game-bai__step-icon {
        width: 150px;
        height: 150px;
    }

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

    /* Strategy List */
    .page-game-bai__strategy-item {
        font-size: 16px;
        padding: 15px 20px;
    }

    /* Promotion Grid */
    .page-game-bai__promo-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    /* FAQ */
    .page-game-bai__faq-question {
        font-size: 16px;
        padding: 15px 20px;
    }

    .page-game-bai__faq-toggle {
        font-size: 20px;
    }

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