/* style/game-rules.css */
:root {
    --primary-color: #FFD700; /* Gold */
    --secondary-color: #8B0000; /* Dark Red */
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-dark: #0d0d0d;
    --bg-light: #f5f5f5;
    --border-color: #e0e0e0;
}

.page-game-rules {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-light); /* Body background is dark, so text should be light */
    background-color: #000; /* Inherited from shared.css, explicitly set for context */
}

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

/* Fixed navigation bar spacing */
.page-game-rules__hero-section {
    padding-top: 120px; /* Desktop: Adjust based on actual header height */
    padding-bottom: 60px;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: var(--text-light);
    text-align: center;
}

.page-game-rules__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.page-game-rules__main-title .highlight {
    color: var(--text-light);
}

.page-game-rules__hero-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #cccccc;
}

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

.page-game-rules__cta-button {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    white-space: normal;
    word-wrap: break-word;
}

.page-game-rules__cta-button--primary {
    background: var(--primary-color);
    color: var(--text-dark);
}

.page-game-rules__cta-button--primary:hover {
    background: #e6c200;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-game-rules__cta-button--secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-game-rules__cta-button--secondary:hover {
    background: var(--primary-color);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-game-rules__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    padding-top: 40px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.page-game-rules__text-block {
    font-size: 1.05em;
    line-height: 1.7;
    margin-bottom: 25px;
    color: #cccccc;
    text-align: justify;
}

.page-game-rules__overview-section {
    background-color: #0d0d0d;
    padding: 60px 0;
    color: var(--text-light);
}

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

.page-game-rules__grid-item {
    background: rgba(255, 255, 255, 0.08); /* Semi-transparent background for dark theme */
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-game-rules__grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-game-rules__grid-item-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-top: 20px;
    margin-bottom: 15px;
}

.page-game-rules__grid-item p {
    color: #b0b0b0;
    font-size: 0.95em;
}

.page-game-rules__image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px;
    min-height: 200px;
}

.page-game-rules__detailed-rules-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    padding: 80px 0;
    color: var(--text-light);
}

.page-game-rules__game-type-card {
    display: flex;
    background: rgba(255, 255, 255, 0.05); /* Lighter background for better contrast */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-game-rules__game-type-image {
    width: 350px;
    height: 250px;
    object-fit: cover;
    flex-shrink: 0;
    min-width: 200px;
    min-height: 200px;
}

.page-game-rules__game-type-content {
    padding: 30px;
    flex-grow: 1;
}

.page-game-rules__game-type-title {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
}

.page-game-rules__game-type-content p {
    color: #cccccc;
    margin-bottom: 15px;
}

.page-game-rules__game-type-content ul {
    list-style-type: disc;
    margin-left: 25px;
    margin-bottom: 20px;
    color: #b0b0b0;
}

.page-game-rules__game-type-content li {
    margin-bottom: 8px;
    font-size: 0.95em;
}

.page-game-rules__cta-button--small {
    padding: 10px 25px;
    font-size: 0.9em;
    border-radius: 5px;
    background: var(--secondary-color);
    color: var(--text-light);
}

.page-game-rules__cta-button--small:hover {
    background: #a30000;
    color: var(--text-light);
}

.page-game-rules__user-responsibilities-section {
    background-color: #0d0d0d;
    padding: 60px 0;
    color: var(--text-light);
}

.page-game-rules__responsibilities-list {
    list-style-type: decimal;
    margin-left: 25px;
    margin-bottom: 30px;
    color: #cccccc;
    font-size: 1.05em;
}

.page-game-rules__responsibilities-list li {
    margin-bottom: 12px;
}

.page-game-rules__faq-section {
    background-color: var(--bg-light); /* Light background for FAQ */
    padding: 80px 0;
    color: var(--text-dark); /* Dark text for light background */
}

.page-game-rules__faq-section .page-game-rules__section-title {
    color: var(--secondary-color); /* Use secondary color for title on light background */
    text-shadow: none;
}

.page-game-rules__faq-section .page-game-rules__text-block {
    color: var(--text-dark);
}

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

.page-game-rules__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.page-game-rules__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-game-rules__faq-question:hover {
    background: var(--bg-light);
    border-color: #d0d0d0;
}

.page-game-rules__faq-question:active {
    background: #eeeeee;
}

.page-game-rules__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: var(--text-dark);
}

.page-game-rules__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-game-rules__faq-item.active .page-game-rules__faq-toggle {
    color: var(--secondary-color);
    transform: rotate(45deg);
}

.page-game-rules__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 20px;
    opacity: 0;
    color: var(--text-dark);
}

.page-game-rules__faq-item.active .page-game-rules__faq-answer {
    max-height: 2000px !important;
    padding: 20px !important;
    opacity: 1;
    background: #fcfcfc;
    border-top: 1px dashed var(--border-color);
    border-radius: 0 0 5px 5px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-game-rules__main-title {
        font-size: 2.8em;
    }
    .page-game-rules__section-title {
        font-size: 2em;
    }
    .page-game-rules__game-type-card {
        flex-direction: column;
    }
    .page-game-rules__game-type-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .page-game-rules__hero-section {
        padding-top: 100px !important; /* Mobile: Adjust based on actual mobile header height */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-game-rules__container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-game-rules__main-title {
        font-size: 2em;
        line-height: 1.3;
    }
    .page-game-rules__hero-description {
        font-size: 1em;
    }
    .page-game-rules__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-game-rules__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 25px;
        font-size: 1em;
        box-sizing: border-box !important;
    }
    .page-game-rules__section-title {
        font-size: 1.8em;
        padding-top: 30px;
        margin-bottom: 30px;
    }
    .page-game-rules__text-block {
        font-size: 0.95em;
    }
    .page-game-rules__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-game-rules__grid-item {
        padding: 20px;
    }
    .page-game-rules__grid-item-title {
        font-size: 1.3em;
    }
    .page-game-rules__image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: unset;
        min-height: unset;
    }
    .page-game-rules__game-type-card {
        margin-bottom: 20px;
    }
    .page-game-rules__game-type-image {
        width: 100% !important;
        height: 180px;
        min-width: unset;
        min-height: unset;
    }
    .page-game-rules__game-type-content {
        padding: 20px;
    }
    .page-game-rules__game-type-title {
        font-size: 1.5em;
    }
    .page-game-rules__game-type-content ul {
        margin-left: 20px;
    }
    .page-game-rules__responsibilities-list {
        margin-left: 20px;
        font-size: 1em;
    }
    .page-game-rules__faq-question {
        padding: 15px;
    }
    .page-game-rules__faq-question h3 {
        font-size: 1em;
    }
    .page-game-rules__faq-toggle {
        font-size: 20px;
        width: 24px;
        height: 24px;
    }
    .page-game-rules__faq-item.active .page-game-rules__faq-answer {
        padding: 15px !important;
    }
    .page-game-rules img, .page-game-rules video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    .page-game-rules__video-section,
    .page-game-rules__video-container,
    .page-game-rules__video-wrapper,
    .page-game-rules__section,
    .page-game-rules__card,
    .page-game-rules__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
}