/* Base styles for page-game-rules */
.page-game-rules {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text-main, #FFF3E6); /* Using light text color for dark body background */
  background-color: var(--color-background, #0D0E12);
}

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

.page-game-rules__section-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--color-main, #FF8C1A);
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px;
}

.page-game-rules__text-block {
  font-size: 17px;
  margin-bottom: 20px;
  text-align: justify;
  color: var(--color-text-main, #FFF3E6);
}

/* Hero Section */
.page-game-rules__hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px; /* Small top padding as body handles --header-offset */
}

.page-game-rules__hero-image {
  width: 100%;
  height: 675px;
  object-fit: cover;
  display: block;
}

.page-game-rules__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
  background: rgba(13, 14, 18, 0.8); /* Dark background with transparency */
  border-radius: 8px;
  margin-top: -100px; /* Adjust to slightly overlap the image for visual effect */
  position: relative;
  z-index: 1;
}

.page-game-rules__main-title {
  font-size: clamp(24px, 3.5vw, 48px);
  font-weight: 700;
  color: #FFF3E6; /* Light text for dark background */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-game-rules__description {
  font-size: 18px;
  color: #E0E0E0; /* Slightly lighter than main text */
  margin-bottom: 30px;
}

.page-game-rules__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

/* Introduction Section */
.page-game-rules__introduction-section {
  padding: 60px 0;
  background-color: var(--color-background, #0D0E12);
}

.page-game-rules__dark-section {
  background-color: var(--color-background, #0D0E12);
  color: var(--color-text-main, #FFF3E6);
}

/* General Rules Section */
.page-game-rules__general-rules-section {
  padding: 60px 0;
  background-color: #17191F; /* Card BG color for section */
}

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

.page-game-rules__card {
  background-color: var(--color-card-bg, #17191F);
  border: 1px solid var(--color-border, #A84F0C);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  color: var(--color-text-main, #FFF3E6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-game-rules__card-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-glow, #FFB04D);
  margin-bottom: 15px;
}

.page-game-rules__card-text {
  font-size: 16px;
  color: #E0E0E0;
}

/* Specific Rules Section */
.page-game-rules__specific-rules-section {
  padding: 60px 0;
}

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

.page-game-rules__game-type-card {
  background-color: var(--color-card-bg, #17191F);
  border: 1px solid var(--color-border, #A84F0C);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--color-text-main, #FFF3E6);
  display: flex;
  flex-direction: column;
}

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

.page-game-rules__game-type-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--color-border, #A84F0C);
  min-height: 200px; /* Ensure minimum size */
}

.page-game-rules__game-type-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--color-main, #FF8C1A);
  margin: 20px 0 10px;
}

.page-game-rules__game-type-description {
  font-size: 15px;
  color: #E0E0E0;
  padding: 0 20px;
  flex-grow: 1;
}

.page-game-rules__game-type-card .page-game-rules__btn-primary {
  margin: 20px;
  padding: 10px 20px;
  font-size: 16px;
  width: calc(100% - 40px);
}

/* Responsibilities Section */
.page-game-rules__responsibilities-section {
  padding: 60px 0;
  background-color: #17191F;
}

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

.page-game-rules__card--alt {
  background-color: var(--color-card-bg, #17191F);
  border: 1px solid var(--color-border, #A84F0C);
  color: var(--color-text-main, #FFF3E6);
}

.page-game-rules__btn-secondary {
  display: inline-block;
  padding: 10px 25px;
  background: #ffffff;
  color: var(--color-main, #FF8C1A);
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid var(--color-main, #FF8C1A);
  cursor: pointer;
  margin-top: 20px;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-rules__btn-secondary:hover {
  background: var(--color-main, #FF8C1A);
  color: #ffffff;
}

/* Dispute Section */
.page-game-rules__dispute-section {
  padding: 60px 0;
}

.page-game-rules__dispute-list {
  list-style: decimal;
  margin-left: 20px;
  color: var(--color-text-main, #FFF3E6);
  font-size: 17px;
}

.page-game-rules__dispute-list li {
  margin-bottom: 10px;
}

.page-game-rules__dispute-section .page-game-rules__cta-button {
  margin-top: 30px;
}

/* FAQ Section */
.page-game-rules__faq-section {
  padding: 60px 0;
  background-color: #17191F;
}

.page-game-rules__faq-list {
  margin-top: 40px;
}

details.page-game-rules__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--color-border, #A84F0C);
  overflow: hidden;
  background: var(--color-card-bg, #17191F);
}
details.page-game-rules__faq-item summary.page-game-rules__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;
  color: var(--color-text-main, #FFF3E6);
}
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: #252831; /* Slightly lighter dark for hover */
}
.page-game-rules__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--color-text-main, #FFF3E6);
}
.page-game-rules__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-glow, #FFB04D);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-game-rules__faq-item .page-game-rules__faq-answer {
  padding: 0 20px 20px;
  background: #1F222B; /* Slightly lighter than card BG for answer */
  border-radius: 0 0 10px 10px;
  color: #E0E0E0;
}
.page-game-rules__faq-answer p {
  margin-bottom: 0;
}

/* Conclusion Section */
.page-game-rules__conclusion-section {
  padding: 60px 0;
  text-align: center;
}

.page-game-rules__cta-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-game-rules__cta-button--primary {
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
  color: #ffffff;
}

.page-game-rules__cta-button--secondary {
  background: #17191F;
  color: var(--color-main, #FF8C1A);
  border: 2px solid var(--color-main, #FF8C1A);
}

.page-game-rules__cta-button--secondary:hover {
  background: var(--color-main, #FF8C1A);
  color: #ffffff;
}

.page-game-rules__copyright {
  font-size: 14px;
  color: #888;
  margin-top: 60px;
}

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

.page-game-rules__cta-button,
.page-game-rules__btn-primary,
.page-game-rules__btn-secondary,
.page-game-rules a[class*="button"],
.page-game-rules a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-rules__section,
.page-game-rules__card,
.page-game-rules__container,
.page-game-rules__game-type-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Media queries for responsiveness */
@media (max-width: 1024px) {
  .page-game-rules__hero-image {
    height: 500px;
  }

  .page-game-rules__hero-content {
    padding: 30px 15px;
    margin-top: -80px;
  }

  .page-game-rules__main-title {
    font-size: clamp(20px, 4vw, 40px);
  }

  .page-game-rules__description {
    font-size: 16px;
  }

  .page-game-rules__section-title {
    font-size: 28px;
  }

  .page-game-rules__text-block {
    font-size: 16px;
  }

  .page-game-rules__rule-cards, .page-game-rules__game-type-grid, .page-game-rules__responsibility-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .page-game-rules__card-title {
    font-size: 22px;
  }

  .page-game-rules__game-type-title {
    font-size: 20px;
  }

  .page-game-rules__faq-qtext {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  .page-game-rules__container {
    padding: 15px;
  }

  .page-game-rules__hero-section {
    padding-top: 10px; /* Small top padding for mobile */
  }

  .page-game-rules__hero-image {
    height: 400px !important;
    object-fit: cover !important;
  }

  .page-game-rules__hero-content {
    padding: 25px 15px;
    margin-top: -60px;
    max-width: calc(100% - 30px);
  }

  .page-game-rules__main-title {
    font-size: clamp(20px, 6vw, 32px);
  }

  .page-game-rules__description {
    font-size: 15px;
  }

  .page-game-rules__cta-button {
    padding: 12px 25px;
    font-size: 16px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-game-rules__section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .page-game-rules__text-block {
    font-size: 15px;
  }

  .page-game-rules__rule-cards, .page-game-rules__game-type-grid, .page-game-rules__responsibility-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-rules__card,
  .page-game-rules__game-type-card,
  .page-game-rules__card--alt {
    padding: 25px;
  }

  .page-game-rules__card-title {
    font-size: 20px;
  }

  .page-game-rules__game-type-card img {
    
  }

  .page-game-rules__game-type-title {
    font-size: 18px;
  }

  .page-game-rules__game-type-description {
    font-size: 14px;
    padding: 0 15px;
  }

  .page-game-rules__game-type-card .page-game-rules__btn-primary {
    margin: 15px;
    width: calc(100% - 30px);
  }

  .page-game-rules__btn-secondary {
    padding: 10px 20px;
    font-size: 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-game-rules__dispute-list {
    font-size: 15px;
    margin-left: 15px;
  }

  details.page-game-rules__faq-item summary.page-game-rules__faq-question {
    padding: 15px;
  }
  .page-game-rules__faq-qtext {
    font-size: 16px;
  }
  .page-game-rules__faq-toggle {
    font-size: 20px;
    width: 24px;
  }
  details.page-game-rules__faq-item .page-game-rules__faq-answer {
    padding: 0 15px 15px;
  }

  .page-game-rules__cta-group {
    flex-direction: column;
    gap: 15px;
  }

  .page-game-rules__cta-group .page-game-rules__cta-button {
    width: calc(100% - 30px);
    margin: 0 auto;
  }

  /* Force image responsiveness */
  .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__game-type-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }
  .page-game-rules__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Button containers mobile adaptation */
  .page-game-rules__cta-buttons,
  .page-game-rules__button-group,
  .page-game-rules__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;
  }
  .page-game-rules__cta-group {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Color Contrast Fixes (if needed, based on analysis) */
/* The chosen dark background (#0D0E12) and light text (#FFF3E6) already provide good contrast */
/* Card backgrounds (#17191F) also pair well with light text */
/* Buttons use strong gradients/colors with white text */