/* Base styles for the page */
.page-game-bai {
    font-family: Arial, sans-serif;
    color: #333333; /* Default text color for light backgrounds */
    background-color: #FFFFFF; /* Default background */
}

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

.page-game-bai__section {
    padding: 60px 0;
}

.page-game-bai__section-title {
    font-size: 36px;
    font-weight: bold;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
}

.page-game-bai__description {
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-game-bai__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #f5f5f5;
}

.page-game-bai__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for desktop */
    overflow: hidden;
    margin-bottom: 30px;
}

.page-game-bai__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16 / 9;
}

.page-game-bai__hero-content {
    position: relative;
    z-index: 1;
    padding: 0 20px;
    max-width: 900px;
}

.page-game-bai__main-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: #017439;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-game-bai__hero-content .page-game-bai__description {
    font-size: clamp(16px, 2.5vw, 20px);
    margin-bottom: 30px;
    color: #555;
}

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

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

.page-game-bai__btn-primary {
    background-color: #C30808; /* Custom color for register/login */
    color: #FFFF00; /* Custom font color for register/login */
    border: 2px solid #C30808;
}

.page-game-bai__btn-primary:hover {
    background-color: #a00606;
    border-color: #a00606;
}

.page-game-bai__btn-secondary {
    background-color: #FFFFFF;
    color: #017439;
    border: 2px solid #017439;
}

.page-game-bai__btn-secondary:hover {
    background-color: #e0e0e0;
    color: #005f2b;
    border-color: #005f2b;
}

/* Why Choose Us Section */
.page-game-bai__why-choose-us {
    background-color: #f9f9f9;
}

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

.page-game-bai__feature-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-bai__feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-game-bai__feature-icon {
    width: 100%; /* Ensure images fill card width */
    height: auto;
    max-width: 250px;
    margin: 0 auto 20px;
    display: block;
    border-radius: 8px;
}

.page-game-bai__feature-title {
    font-size: 22px;
    font-weight: bold;
    color: #017439;
    margin-bottom: 15px;
}

.page-game-bai__feature-text {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

/* Featured Games Section */
.page-game-bai__featured-games {
    background-color: #FFFFFF;
}

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

.page-game-bai__game-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-bai__game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

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

.page-game-bai__game-title {
    font-size: 24px;
    font-weight: bold;
    color: #017439;
    margin: 20px 15px 10px;
}

.page-game-bai__game-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    padding: 0 15px 20px;
}

.page-game-bai__game-btn {
    display: inline-block;
    background-color: #017439;
    color: #FFFFFF;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.page-game-bai__game-btn:hover {
    background-color: #005f2b;
}

/* How To Play Section */
.page-game-bai__how-to-play {
    background-color: #f5f5f5;
}

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

.page-game-bai__step-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.page-game-bai__step-title {
    font-size: 22px;
    font-weight: bold;
    color: #017439;
    margin-bottom: 15px;
}

.page-game-bai__step-text {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}

.page-game-bai__step-btn {
    display: inline-block;
    background-color: #C30808; /* Custom color for register/login */
    color: #FFFF00; /* Custom font color for register/login */
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-game-bai__step-btn:hover {
    background-color: #a00606;
}

/* Pro Tips Section */
.page-game-bai__pro-tips {
    background-color: #FFFFFF;
}

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

.page-game-bai__tip-card {
    background: #f9f9f9;
    border-left: 5px solid #017439;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-game-bai__tip-title {
    font-size: 20px;
    font-weight: bold;
    color: #017439;
    margin-bottom: 10px;
}

.page-game-bai__tip-text {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

/* FAQ Section */
.page-game-bai__faq-section {
    background-color: #f9f9f9;
}

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

details.page-game-bai__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    background: #fff;
}

details.page-game-bai__faq-item summary.page-game-bai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
}

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

details.page-game-bai__faq-item summary.page-game-bai__faq-question:hover {
    background: #f5f5f5;
}

.page-game-bai__faq-qtext {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: #333333;
}

.page-game-bai__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: #666;
    flex-shrink: 0;
    margin-left: 15px;
    width: 28px;
    text-align: center;
}

details.page-game-bai__faq-item .page-game-bai__faq-answer {
    padding: 0 20px 20px;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
    color: #555;
}

.page-game-bai__faq-btn {
    display: inline-block;
    background-color: #017439;
    color: #FFFFFF;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.3s ease;
    font-size: 15px;
}

.page-game-bai__faq-btn:hover {
    background-color: #005f2b;
}

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

/* Responsive styles */
@media (max-width: 1024px) {
    .page-game-bai__section-title {
        font-size: 32px;
    }
    .page-game-bai__description {
        font-size: 16px;
    }
    .page-game-bai__hero-image-wrapper {
        max-height: 500px;
    }
    .page-game-bai__main-title {
        font-size: clamp(28px, 4.5vw, 42px);
    }
    .page-game-bai__hero-content .page-game-bai__description {
        font-size: clamp(15px, 2vw, 18px);
    }
    .page-game-bai__btn-primary, .page-game-bai__btn-secondary {
        padding: 12px 25px;
        font-size: 16px;
    }
    .page-game-bai__feature-title, .page-game-bai__step-title, .page-game-bai__tip-title {
        font-size: 20px;
    }
    .page-game-bai__game-title {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-game-bai__hero-section {
        padding-top: 10px; /* Ensures small top padding */
        padding-bottom: 40px;
    }
    .page-game-bai__hero-image-wrapper {
        max-height: unset !important; /* Allow height to be auto */
        margin-bottom: 20px;
    }
    .page-game-bai__hero-image {
        object-fit: contain !important;
        aspect-ratio: unset !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-game-bai__main-title {
        font-size: clamp(26px, 8vw, 36px) !important;
        max-width: 100%;
        word-wrap: break-word;
    }
    .page-game-bai__hero-content .page-game-bai__description {
        font-size: 16px !important;
        text-align: center;
    }
    .page-game-bai__cta-buttons {
        flex-direction: column !important;
        gap: 15px;
        padding: 0 15px;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* 通用图片与容器 */
    .page-game-bai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain; /* Default to contain for mobile to prevent cropping */
    }
    .page-game-bai__container,
    .page-game-bai__section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* 产品展示图区域 (Featured Games Grid) */
    .page-game-bai__games-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columns for mobile */
        gap: 20px;
        overflow-x: hidden;
    }
    .page-game-bai__game-image {
        height: 150px; /* Adjust height for mobile cards */
    }
    .page-game-bai__game-title {
        font-size: 18px;
        margin: 15px 10px 5px;
    }
    .page-game-bai__game-desc {
        font-size: 13px;
        padding: 0 10px 15px;
    }
    .page-game-bai__game-btn {
        padding: 8px 15px;
        font-size: 14px;
    }

    /* 装饰主标题 + 长文 SEO 区 */
    .page-game-bai__section-title {
        font-size: 26px !important;
        margin-bottom: 25px;
        text-align: center;
        max-width: 100%;
        word-wrap: break-word;
    }
    .page-game-bai__description {
        font-size: 15px !important;
        text-align: center;
        max-width: 100%;
        word-wrap: break-word;
    }

    /* Feature/Step/Tip Grids */
    .page-game-bai__grid-layout,
    .page-game-bai__steps-grid,
    .page-game-bai__tips-grid {
        grid-template-columns: 1fr !important; /* Single column for mobile */
        gap: 20px;
    }
    .page-game-bai__feature-card,
    .page-game-bai__step-card,
    .page-game-bai__tip-card {
        padding: 20px;
    }
    .page-game-bai__feature-icon {
        max-width: 150px;
    }
    .page-game-bai__feature-title, .page-game-bai__step-title, .page-game-bai__tip-title {
        font-size: 18px;
    }
    .page-game-bai__feature-text, .page-game-bai__step-text, .page-game-bai__tip-text {
        font-size: 15px;
    }

    /* Buttons specific for mobile */
    .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;
        text-align: center;
    }

    /* FAQ Section */
    details.page-game-bai__faq-item summary.page-game-bai__faq-question {
        padding: 15px !important;
    }
    .page-game-bai__faq-qtext {
        font-size: 15px !important;
    }
    .page-game-bai__faq-toggle {
        font-size: 20px !important;
        width: 24px !important;
        height: 24px !important;
        margin-left: 10px !important;
    }
    details.page-game-bai__faq-item .page-game-bai__faq-answer {
        padding: 0 15px 15px !important;
    }
}