:root {
  --primary-color: #113B7A;
  --secondary-color: #1D5FD1;
  --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  --card-bg: #10233F;
  --text-main: #F3F8FF;
  --text-secondary: #AFC4E8;
  --border-color: #244D84;
  --glow-color: #4FA8FF;
  --gold-color: #F2C14E;
  --divider-color: #1B3357;
  --deep-navy-color: #08162B;
}

.page-game-rules {
  font-family: 'Arial', sans-serif;
  background-color: var(--deep-navy-color);
  color: var(--text-main); /* Default text color for dark body background */
  line-height: 1.6;
  font-size: 1rem;
}

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

.page-game-rules__section {
  padding: 60px 0;
}

.page-game-rules__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  padding-bottom: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-height: 600px;
  overflow: hidden;
  margin-bottom: 20px;
}

.page-game-rules__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly dim the image for text readability */
}

.page-game-rules__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 20px;
}

.page-game-rules__main-title {
  font-weight: 700;
  line-height: 1.2;
  color: var(--gold-color);
  margin-bottom: 15px;
  text-shadow: 0 0 10px rgba(79, 168, 255, 0.5);
}

.page-game-rules__hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.page-game-rules__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  background: var(--button-gradient);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-game-rules__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-game-rules__paragraph {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

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

.page-game-rules__image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.page-game-rules__image--center {
  margin: 30px auto;
}

.page-game-rules__rule-block {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
}

.page-game-rules__rule-subtitle {
  font-size: 1.6rem;
  color: var(--text-main);
  margin-bottom: 15px;
  font-weight: 600;
}

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

.page-game-rules__rule-card {
  background-color: var(--card-bg);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-game-rules__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-game-rules__card-title {
  font-size: 1.4rem;
  color: var(--text-main);
  margin-bottom: 10px;
  font-weight: 600;
}

.page-game-rules__card-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
}

.page-game-rules__card-link {
  color: var(--gold-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-game-rules__card-link:hover {
  color: var(--glow-color);
  text-decoration: underline;
}

.page-game-rules__faq-section {
  background-color: var(--primary-color);
  padding: 60px 0;
}

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

.page-game-rules__faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--card-bg);
  transition: background-color 0.3s ease;
  list-style: none; /* For details tag */
}

.page-game-rules__faq-question::-webkit-details-marker {
  display: none;
}

.page-game-rules__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.page-game-rules__faq-toggle {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--gold-color);
  margin-left: 15px;
}

.page-game-rules__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.page-game-rules__faq-item[open] .page-game-rules__faq-answer {
  max-height: 500px; /* Sufficient height for content */
  padding-top: 15px;
}

.page-game-rules__faq-item[open] .page-game-rules__faq-question .page-game-rules__faq-toggle {
  content: '−';
}

.page-game-rules__btn-conclusion {
  margin-top: 30px;
}

.page-game-rules__copyright-section {
  background-color: var(--deep-navy-color);
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid var(--divider-color);
}

.page-game-rules__copyright-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* --- Desktop/Tablet (max-width: 1024px) --- */
@media (max-width: 1024px) {
  .page-game-rules__main-title {
    font-size: 2.8rem;
  }

  .page-game-rules__section-title {
    font-size: 2rem;
  }

  .page-game-rules__hero-image-wrapper {
    max-height: 500px;
  }

  .page-game-rules__rule-card-grid {
    gap: 20px;
  }
}

/* --- Mobile (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-game-rules {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-game-rules__hero-image-wrapper {
    max-height: 300px;
    margin-bottom: 15px;
  }

  .page-game-rules__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-game-rules__main-title {
    font-size: 2rem;
    margin-bottom: 10px;
  }

  .page-game-rules__hero-description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

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

  .page-game-rules__section {
    padding: 40px 0;
  }

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

  .page-game-rules__paragraph {
    font-size: 0.95rem;
  }

  .page-game-rules__rule-block {
    padding: 20px;
    margin-bottom: 20px;
  }

  .page-game-rules__rule-subtitle {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }

  .page-game-rules__rule-card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
  }

  .page-game-rules__rule-card {
    padding: 20px;
  }

  .page-game-rules__card-image {
    height: 180px;
    margin-bottom: 15px;
  }

  .page-game-rules__card-title {
    font-size: 1.2rem;
  }

  /* General image responsiveness for content area */
  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* Containers for images/content to prevent overflow */
  .page-game-rules__container,
  .page-game-rules__section,
  .page-game-rules__rule-block,
  .page-game-rules__rule-card,
  .page-game-rules__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-game-rules__faq-question {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .page-game-rules__faq-answer {
    padding: 0 20px 15px 20px;
    font-size: 0.95rem;
  }

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