/* General styles for .page-game-bai */
.page-game-bai {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #F5F7FA; /* Background color from custom配色 */
}

/* Container for main content width */
.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;
    color: #E53935; /* Primary color for titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
}

/* Text Blocks */
.page-game-bai__text-block {
    margin-bottom: 20px;
    font-size: 1.1em;
    text-align: justify;
}

/* Buttons */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary,
.page-game-bai__btn-text {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-game-bai__btn-primary {
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #ffffff;
    border: none;
}

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

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

.page-game-bai__btn-secondary:hover {
    background: #E53935;
    color: #ffffff;
}

.page-game-bai__btn-text {
    background: none;
    color: #E53935;
    border: 1px solid #E53935;
    padding: 8px 15px;
    font-size: 0.9em;
}

.page-game-bai__btn-text:hover {
    background: #E53935;
    color: #ffffff;
}

/* Images */
.page-game-bai img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px; /* General image styling */
}

/* Hero Intro Section */
.page-game-bai__hero-intro-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding-top: 10px; /* Small top padding, not var(--header-offset) */
    padding-bottom: 40px;
    background-color: #F5F7FA; /* Light background for this section */
}

.page-game-bai__hero-intro-image {
    flex: 1 1 500px; /* Flexible width, min 500px */
    text-align: center;
    padding-left: 16px;
    padding-right: 16px;
    order: 1; /* Image first */
}

.page-game-bai__hero-intro-content {
    flex: 1 1 500px; /* Flexible width, min 500px */
    padding-left: 16px;
    padding-right: 16px;
    text-align: center;
    order: 2; /* Content second */
}

.page-game-bai__main-title {
    font-size: 3em;
    color: #E53935;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-game-bai__intro-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #333333;
}

.page-game-bai__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Game List Section */
.page-game-bai__games-section {
    background-color: #FFFFFF; /* Card BG color */
    padding-top: 60px;
    padding-bottom: 60px;
}

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

.page-game-bai__game-card {
    background-color: #F5F7FA; /* Light background for cards */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #E0E0E0; /* Border for cards */
}

.page-game-bai__game-card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    margin-bottom: 15px;
}

.page-game-bai__card-title {
    font-size: 1.5em;
    color: #E53935;
    margin-bottom: 10px;
    padding: 0 15px;
}

.page-game-bai__card-title a {
    color: #E53935;
    text-decoration: none;
}

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

.page-game-bai__card-description {
    font-size: 1em;
    color: #333333;
    padding: 0 15px;
    margin-bottom: 20px;
    flex-grow: 1; /* Push button to bottom */
}

/* Features Section (Dark background) */
.page-game-bai__features-section {
    background-color: #E53935; /* Primary brand color as background */
    color: #ffffff; /* White text for dark background */
    padding-top: 60px;
    padding-bottom: 60px;
}

.page-game-bai__features-section .page-game-bai__section-title {
    color: #ffffff; /* White title for dark background */
}

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

.page-game-bai__feature-item img {
    width: 200px; /* Changed from 150px to meet min 200px requirement */
    height: 200px; /* Changed from 150px to meet min 200px requirement */
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 3px solid #FF5A4F; /* Secondary color border */
}

.page-game-bai__feature-title {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: #ffffff;
}

.page-game-bai__feature-description {
    font-size: 1.1em;
    color: #f0f0f0;
}

/* Tips Section */
.page-game-bai__tips-section {
    background-color: #F5F7FA;
    padding-top: 60px;
    padding-bottom: 60px;
}

.page-game-bai__tips-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.page-game-bai__tips-content {
    flex: 1 1 45%;
    min-width: 300px;
}

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

.page-game-bai__tips-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.page-game-bai__tips-list li {
    background-color: #ffffff;
    margin-bottom: 15px;
    padding: 15px 20px;
    border-left: 5px solid #E53935;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-game-bai__tips-list li p {
    margin: 0;
    color: #333333;
}

.page-game-bai__tips-list li strong {
    color: #E53935;
}

.page-game-bai__btn-learn-more {
    margin-top: 20px;
}

/* CTA Download Section */
.page-game-bai__cta-download-section {
    background-color: #E53935; /* Primary brand color */
    color: #ffffff;
    padding-top: 60px;
    padding-bottom: 60px;
    text-align: center;
}

.page-game-bai__cta-download-section .page-game-bai__section-title {
    color: #ffffff;
    margin-bottom: 20px;
}

.page-game-bai__cta-download-section .page-game-bai__text-block {
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

/* FAQ Section */
.page-game-bai__faq-section {
    background-color: #FFFFFF;
    padding-top: 60px;
    padding-bottom: 60px;
}

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

.page-game-bai__faq-item {
    background-color: #F5F7FA;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #333333;
}

.page-game-bai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1em;
    color: #E53935; /* Primary color for question */
    list-style: none; /* Hide default marker for details */
    user-select: none;
}

/* Hide default marker for details summary */
.page-game-bai__faq-item summary::-webkit-details-marker {
    display: none;
}
.page-game-bai__faq-item summary::marker {
    display: none;
}

.page-game-bai__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: #E53935;
    transition: transform 0.3s ease;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
    transform: rotate(45deg); /* Change + to X or similar */
}

.page-game-bai__faq-answer {
    padding: 0 20px 15px;
    font-size: 1em;
    color: #333333;
}

.page-game-bai__faq-answer p {
    margin-bottom: 10px;
    color: #333333;
}

.page-game-bai__faq-answer a {
    color: #FF5A4F; /* Secondary color for links */
    text-decoration: underline;
}

.page-game-bai__faq-answer a:hover {
    color: #E53935;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-game-bai__main-title {
        font-size: 2.5em;
    }
    .page-game-bai__section-title {
        font-size: 2em;
    }
    .page-game-bai__hero-intro-section {
        flex-direction: column; /* Stack image then content */
        text-align: center;
    }
    .page-game-bai__hero-intro-content,
    .page-game-bai__hero-intro-image {
        order: unset; /* Reset order for stacking */
    }
    .page-game-bai__hero-intro-image {
        margin-bottom: 20px;
    }
    .page-game-bai__game-list {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    /* General mobile padding */
    .page-game-bai__container {
        padding: 20px 15px !important;
    }

    /* Fixed header offset - handled by body, so only small top padding */
    .page-game-bai__hero-intro-section {
        padding-top: 10px !important; /* Small top padding */
        padding-bottom: 20px !important;
        flex-direction: column !important; /* Stack image then content */
    }

    .page-game-bai__hero-intro-content {
        flex: 1 1 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        order: unset !important;
    }
    .page-game-bai__hero-intro-image {
        flex: 1 1 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        order: unset !important;
        margin-bottom: 20px;
    }

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

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

    /* Buttons and button containers */
    .page-game-bai__cta-buttons {
        flex-direction: column !important;
        gap: 15px !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-game-bai__btn-primary,
    .page-game-bai__btn-secondary,
    .page-game-bai__btn-text,
    .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;
    }
    
    .page-game-bai__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: 15px;
      padding-right: 15px;
      flex-wrap: wrap !important;
      gap: 10px;
    }

    /* Section titles */
    .page-game-bai__section-title {
        font-size: 1.8em !important;
        margin-bottom: 25px !important;
    }

    /* Game List Section */
    .page-game-bai__games-section,
    .page-game-bai__features-section,
    .page-game-bai__tips-section,
    .page-game-bai__cta-download-section,
    .page-game-bai__faq-section {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }

    .page-game-bai__game-list {
        grid-template-columns: 1fr !important; /* Single column */
    }

    .page-game-bai__game-card img {
        
    }

    /* Features Section */
    .page-game-bai__feature-grid {
        grid-template-columns: 1fr !important;
    }
    .page-game-bai__feature-item img {
        width: 200px !important; /* Ensure min size */
        height: 200px !important; /* Ensure min size */
    }

    /* Tips Section */
    .page-game-bai__tips-grid {
        flex-direction: column-reverse !important; /* Image above content */
        gap: 20px !important;
    }
    .page-game-bai__tips-content,
    .page-game-bai__tips-image {
        flex: 1 1 100% !important;
        min-width: unset !important;
    }

    /* General images and containers */
    .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-intro-section,
    .page-game-bai__about-section,
    .page-game-bai__games-section,
    .page-game-bai__features-section,
    .page-game-bai__tips-section,
    .page-game-bai__cta-download-section,
    .page-game-bai__faq-section {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
    }
}