/* style/game-rules.css */

/* --- Base Styles & Variables (from Custom Colors) --- */
:root {
    --g666-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --g666-card-bg: #11271B;
    --g666-background: #08160F; /* This is the main background color, matches body's var(--background-color) */
    --g666-text-main: #F2FFF6;
    --g666-text-secondary: #A7D9B8;
    --g666-border: #2E7A4E;
    --g666-glow: #57E38D;
    --g666-gold: #F2C14E;
    --g666-divider: #1E3A2A;
    --g666-deep-green: #0A4B2C;
    --g666-primary-color: #11A84E; /* Main brand color */
    --g666-secondary-color: #22C768; /* Auxiliary brand color */
}

.page-game-rules {
    /* Body background is var(--background-color) from shared.css, which is --g666-background (#08160F). */
    /* Thus, main text color should be light. */
    color: var(--g666-text-main); /* #F2FFF6 */
    font-family: 'Arial', sans-serif; /* Example font */
    line-height: 1.6;
    background-color: var(--g666-background); /* Ensure consistency */
}

/* --- Typography --- */
.page-game-rules h1,
.page-game-rules h2,
.page-game-rules h3,
.page-game-rules h4 {
    color: var(--g666-text-main); /* #F2FFF6 */
    font-weight: bold;
    margin-bottom: 1em;
    line-height: 1.2;
}

.page-game-rules h1 {
    font-size: clamp(2em, 5vw, 3.5em); /* Responsive font size for H1 */
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.5em;
    color: var(--g666-gold); /* Gold for main title */
}

.page-game-rules h2 {
    font-size: clamp(1.8em, 4vw, 2.8em);
    text-align: center;
    margin-bottom: 1.5em;
    color: var(--g666-secondary-color);
}

.page-game-rules h3 {
    font-size: clamp(1.4em, 3vw, 2em);
    margin-bottom: 0.8em;
    color: var(--g666-primary-color);
}

.page-game-rules h4 {
    font-size: clamp(1.2em, 2.5vw, 1.5em);
    margin-bottom: 0.5em;
    color: var(--g666-text-secondary);
}

.page-game-rules p {
    margin-bottom: 1em;
    color: var(--g666-text-main);
}

.page-game-rules ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 1em;
    color: var(--g666-text-main);
}

.page-game-rules li {
    margin-bottom: 0.5em;
    color: var(--g666-text-main);
}

.page-game-rules strong {
    color: var(--g666-gold); /* Use gold for strong emphasis */
}

/* --- Layout Containers --- */
.page-game-rules__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-game-rules__content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.page-game-rules__text-block {
    flex: 1;
    min-width: 300px;
    max-width: 550px;
    background-color: var(--g666-card-bg); /* Dark background for text blocks */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--g666-border);
}

/* --- Sections --- */
.page-game-rules__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Image above content */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    background-color: var(--g666-background);
}

.page-game-rules__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height of hero image */
    overflow: hidden;
    margin-bottom: 30px;
}

.page-game-rules__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
}

.page-game-rules__hero-content {
    max-width: 900px;
    padding: 40px;
    border-radius: 15px;
    background: var(--g666-card-bg); /* Dark background for hero content */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--g666-primary-color);
    color: var(--g666-text-main);
}

.page-game-rules__description {
    font-size: 1.1em;
    margin-bottom: 2em;
    color: var(--g666-text-secondary);
}

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

.page-game-rules__cta-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on mobile */
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-game-rules__btn-primary {
    background: var(--g666-button-gradient);
    color: #ffffff; /* White text for primary button */
    border: none;
    box-shadow: 0 4px 10px rgba(42, 209, 111, 0.4);
}

.page-game-rules__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(42, 209, 111, 0.6);
    opacity: 0.9;
}

.page-game-rules__btn-secondary {
    background: transparent;
    color: var(--g666-gold); /* Gold text for secondary button */
    border: 2px solid var(--g666-gold);
}

.page-game-rules__btn-secondary:hover {
    transform: translateY(-3px);
    background: rgba(242, 193, 78, 0.1);
    box-shadow: 0 4px 10px rgba(242, 193, 78, 0.4);
}

.page-game-rules__video-section {
    padding: 60px 0;
    background-color: var(--g666-deep-green);
}

.page-game-rules__video-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 30px;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--g666-border);
    box-sizing: border-box;
}

.page-game-rules__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-game-rules__introduction-section,
.page-game-rules__conclusion-section {
    padding: 60px 0;
    background-color: var(--g666-background); /* Dark background for these sections */
}

.page-game-rules__games-section,
.page-game-rules__transactions-section,
.page-game-rules__faq-section {
    padding: 60px 0;
    background-color: var(--g666-deep-green); /* Even darker background for these sections */
}

.page-game-rules__section-title {
    margin-bottom: 40px;
    color: var(--g666-gold); /* Section titles in gold */
}

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

.page-game-rules__game-card {
    background-color: var(--g666-card-bg); /* Dark background for game cards */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--g666-border);
    display: flex;
    flex-direction: column;
}

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

.page-game-rules__card-title {
    padding: 20px 20px 10px;
    font-size: 1.5em;
    color: var(--g666-gold); /* Gold for card titles */
    text-align: center;
}

.page-game-rules__card-content {
    padding: 0 20px 20px;
    color: var(--g666-text-secondary);
    flex-grow: 1;
}

.page-game-rules__card-content h4 {
    color: var(--g666-primary-color);
}

.page-game-rules__content-image {
    width: 100%;
    height: auto;
    max-height: 300px; /* Limit height for content images */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

/* --- FAQ Section --- */
.page-game-rules__faq-list {
    margin-top: 30px;
}

.page-game-rules__faq-item {
    background-color: var(--g666-card-bg); /* Dark background for FAQ items */
    border: 1px solid var(--g666-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-game-rules__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-weight: bold;
    color: var(--g666-primary-color);
    background-color: var(--g666-deep-green);
    border-bottom: 1px solid var(--g666-divider);
    transition: background-color 0.3s ease;
}

.page-game-rules__faq-question:hover {
    background-color: var(--g666-primary-color);
    color: #ffffff;
}

.page-game-rules__faq-question:hover .page-game-rules__faq-toggle {
    color: #ffffff;
}

.page-game-rules__faq-qtext {
    flex-grow: 1;
    font-size: 1.1em;
}

.page-game-rules__faq-toggle {
    font-size: 1.5em;
    margin-left: 15px;
    color: var(--g666-gold);
    transition: transform 0.3s ease, color 0.3s ease;
}

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

.page-game-rules__faq-answer {
    padding: 20px 25px;
    color: var(--g666-text-secondary);
    background-color: var(--g666-card-bg);
}

/* Remove default details marker */
.page-game-rules__faq-item summary {
    list-style: none;
}
.page-game-rules__faq-item summary::-webkit-details-marker {
    display: none;
}


/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-game-rules__hero-image-wrapper {
        max-height: 400px;
    }
    .page-game-rules__hero-content {
        padding: 30px;
    }
    .page-game-rules__games-section .page-game-rules__content-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-game-rules__video-wrapper {
        max-width: 768px;
    }
}

@media (max-width: 768px) {
    .page-game-rules__hero-section {
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-game-rules__hero-image-wrapper {
        margin-bottom: 20px;
        max-height: 300px;
    }
    .page-game-rules__hero-content {
        padding: 25px;
        max-width: 100%;
    }
    .page-game-rules__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
    }
    .page-game-rules__description {
        font-size: 1em;
        margin-bottom: 1.5em;
    }
    .page-game-rules__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-game-rules__btn-primary,
    .page-game-rules__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-rules__introduction-section,
    .page-game-rules__games-section,
    .page-game-rules__transactions-section,
    .page-game-rules__faq-section,
    .page-game-rules__conclusion-section {
        padding: 40px 0;
    }

    .page-game-rules__container {
        padding: 0 15px;
    }

    .page-game-rules__content-wrapper {
        gap: 20px;
    }

    .page-game-rules__text-block {
        max-width: 100%;
        padding: 20px;
    }

    .page-game-rules__games-section .page-game-rules__content-grid {
        grid-template-columns: 1fr;
    }

    .page-game-rules__card-image {
        height: 200px;
    }

    .page-game-rules__card-title {
        font-size: 1.3em;
    }

    .page-game-rules__content-image {
        max-height: 250px;
    }
}