:root {
    --primary-color: #C91F17; /* Main Red */
    --secondary-color: #E53935; /* Brighter Red */
    --card-bg: #D32F2F; /* Card Background Red */
    --page-bg: #B71C1C; /* Page Background Red */
    --text-main: #FFF5E1; /* Light Cream Text */
    --border-color: #F2B544; /* Gold Border */
    --glow-color: #FFCC66; /* Gold Glow */
    --gold-color: #F4D34D; /* Gold */
    --deep-red: #7A0E0E; /* Deep Red */
    --button-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Gold Button */
}

.page-game-rules {
    font-family: 'Arial', sans-serif;
    background-color: var(--page-bg); /* Use specified background color */
    color: var(--text-main); /* Use specified text color */
    line-height: 1.6;
    padding-bottom: 40px; /* Add some padding at the bottom */
}

/* HERO Section */
.page-game-rules__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    background-color: var(--deep-red); /* Darker background for hero */
    overflow: hidden; /* Ensure content doesn't overflow */
}

.page-game-rules__hero-container {
    position: relative;
    max-width: 1200px;
    width: 100%; /* Ensure it takes full width up to max-width */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-game-rules__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 12px; /* Slightly rounded corners for hero image */
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-game-rules__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease-in-out;
}

.page-game-rules__hero-image img:hover {
    transform: scale(1.03);
}

.page-game-rules__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-game-rules__main-title {
    font-size: 3.2em; /* Adjusted for impact */
    color: var(--gold-color);
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

.page-game-rules__hero-description {
    font-size: 1.2em;
    color: var(--text-main);
    max-width: 800px;
    margin: 0 auto 30px auto;
}

.page-game-rules__cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

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

.page-game-rules__cta-button--primary {
    background: var(--button-gradient);
    color: var(--deep-red);
}

.page-game-rules__cta-button--primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-game-rules__cta-button--secondary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* General Section Styles */
.page-game-rules__section {
    padding: 50px 20px;
    background-color: var(--page-bg);
    color: var(--text-main);
}

.page-game-rules__section--intro {
    padding-top: 30px;
    padding-bottom: 30px;
}

.page-game-rules__container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%; /* Ensure it takes full width up to max-width */
    box-sizing: border-box; /* Ensure padding is included in width */
}

.page-game-rules__section-title {
    font-size: 2.5em;
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.page-game-rules__sub-title {
    font-size: 1.8em;
    color: var(--gold-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-game-rules__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    line-height: 1.7;
    color: var(--text-main);
}

.page-game-rules__highlight {
    color: var(--gold-color);
    font-weight: bold;
}

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

.page-game-rules__grid--2-cols {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}

.page-game-rules__grid--3-cols {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.page-game-rules__card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.page-game-rules__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.page-game-rules__card-title {
    font-size: 1.5em;
    color: var(--gold-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-game-rules__card img {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
    display: block;
}

.page-game-rules__list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.page-game-rules__list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 1.05em;
    color: var(--text-main);
}

.page-game-rules__list li::before {
    content: '★'; /* Star bullet point */
    position: absolute;
    left: 0;
    color: var(--gold-color);
    font-weight: bold;
    font-size: 1.2em;
    line-height: 1.5;
}

.page-game-rules__list--styled li::before {
    content: '✓'; /* Checkmark for styled lists */
    color: var(--gold-color);
    font-size: 1.3em;
}

.page-game-rules__image-text-block {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-top: 30px;
}

.page-game-rules__image-text-block--reverse {
    flex-direction: row-reverse;
}

.page-game-rules__image-wrapper {
    flex: 1;
    min-width: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-game-rules__image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-game-rules__text-content {
    flex: 2;
    color: var(--text-main);
}

.page-game-rules__content-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

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

details.page-game-rules__faq-item {
  margin-bottom: 15px;
  border-radius: 10px; /* Slightly larger radius */
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg); /* Darker background for FAQ items */
  color: var(--text-main);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px; /* Slightly more padding */
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  font-weight: 600;
  font-size: 1.1em;
  color: var(--gold-color);
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question::-webkit-details-marker {
  display: none;
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question:hover {
  background: var(--deep-red); /* Darker hover for contrast */
}
.page-game-rules__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--gold-color);
}
.page-game-rules__faq-toggle {
  font-size: 28px; /* Larger toggle icon */
  font-weight: bold;
  color: var(--gold-color); /* Gold color for toggle */
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px; /* Slightly larger width */
  text-align: center;
  line-height: 1; /* Ensure vertical centering */
}
details.page-game-rules__faq-item .page-game-rules__faq-answer {
  padding: 0 25px 25px; /* Consistent padding */
  background: var(--deep-red); /* Slightly different background for answer */
  border-radius: 0 0 10px 10px;
  color: var(--text-main);
}
.page-game-rules__faq-answer p {
    margin-top: 15px;
    margin-bottom: 0;
    font-size: 1em;
}
.page-game-rules__faq-answer a {
    color: var(--gold-color);
    text-decoration: underline;
}
.page-game-rules__faq-answer a:hover {
    color: var(--glow-color);
}

/* 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__sub-title {
        font-size: 1.6em;
    }
    .page-game-rules__grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-game-rules__grid--2-cols {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    .page-game-rules__image-text-block {
        flex-direction: column;
        gap: 25px;
    }
    .page-game-rules__image-text-block--reverse {
        flex-direction: column;
    }
    .page-game-rules__image-wrapper {
        min-width: unset;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .page-game-rules {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-game-rules img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-game-rules__section,
    .page-game-rules__card,
    .page-game-rules__container,
    .page-game-rules__hero-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-game-rules__hero-section {
        padding-top: 10px !important; /* body handles header offset */
        padding-bottom: 40px;
    }
    .page-game-rules__main-title {
        font-size: 2.2em;
        margin-bottom: 10px;
    }
    .page-game-rules__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-game-rules__cta-group {
        flex-direction: column;
        gap: 15px;
    }
    .page-game-rules__cta-button {
        padding: 12px 25px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-game-rules__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-game-rules__sub-title {
        font-size: 1.4em;
        margin-top: 25px;
        margin-bottom: 10px;
    }
    .page-game-rules__text-block, .page-game-rules__list li {
        font-size: 0.95em;
    }
    .page-game-rules__card {
        padding: 20px;
        border-radius: 8px;
    }
    .page-game-rules__faq-item {
        border-radius: 8px;
    }
    details.page-game-rules__faq-item summary.page-game-rules__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-game-rules__faq-qtext {
        font-size: 1em;
    }
    .page-game-rules__faq-toggle {
        font-size: 24px;
        width: 25px;
    }
    details.page-game-rules__faq-item .page-game-rules__faq-answer {
        padding: 0 20px 20px;
    }
}

@media (max-width: 480px) {
    .page-game-rules__main-title {
        font-size: 1.8em;
    }
    .page-game-rules__hero-description {
        font-size: 0.9em;
    }
    .page-game-rules__section-title {
        font-size: 1.5em;
    }
    .page-game-rules__sub-title {
        font-size: 1.2em;
    }
    .page-game-rules__grid {
        grid-template-columns: 1fr;
    }
    .page-game-rules__grid--2-cols,
    .page-game-rules__grid--3-cols {
        grid-template-columns: 1fr;
    }
}