.page-game-rules {
  color: #ffffff; /* Default text color for dark body background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

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

.page-game-rules__hero-section {
  position: relative;
  width: 100%;
  height: 600px; /* Adjust as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: 0; /* Assuming shared.css handles body padding-top */
}

.page-game-rules__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.page-game-rules__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
  z-index: 2;
}

.page-game-rules__hero-content {
  position: relative;
  z-index: 3;
  color: #ffffff;
  max-width: 900px;
  padding: 20px;
}

.page-game-rules__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
}

.page-game-rules__hero-description {
  font-size: 1.4em;
  margin-bottom: 30px;
  opacity: 0.9;
}

.page-game-rules__hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.page-game-rules__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: #017439; /* Brand color for titles */
  font-weight: bold;
}

.page-game-rules__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px;
  opacity: 0.8;
}

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

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

.page-game-rules__card {
  background: rgba(255, 255, 255, 0.08); /* Slightly transparent white for cards */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-game-rules__card-title {
  font-size: 1.5em;
  color: #017439; /* Brand color for card titles */
  margin-bottom: 15px;
  font-weight: bold;
}

.page-game-rules__card p {
  font-size: 1em;
  line-height: 1.7;
  opacity: 0.9;
}

.page-game-rules__dark-section {
  background-color: #0d0d0d; /* Slightly darker than body for contrast */
  padding: 60px 0;
}

.page-game-rules__game-category {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-game-rules__category-title {
  font-size: 2em;
  color: #017439; /* Brand color */
  margin-bottom: 25px;
  text-align: center;
  font-weight: bold;
}

.page-game-rules__category-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0 auto 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  min-height: 200px;
}

.page-game-rules__category-list {
  list-style: none;
  padding: 0;
}

.page-game-rules__category-list li {
  background: rgba(255, 255, 255, 0.03);
  border-left: 5px solid #017439;
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 5px;
  font-size: 1.05em;
  line-height: 1.8;
}

.page-game-rules__category-list li strong {
  color: #ffffff;
}

.page-game-rules__additional-terms-section {
  padding: 60px 0;
}

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

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

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

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #ffffff;
  cursor: pointer;
  background-color: #017439; /* Brand color for question background */
  transition: background-color 0.3s ease;
}

.page-game-rules__faq-question:hover {
  background-color: #005a2d;
}

.page-game-rules__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

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

.page-game-rules__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #f0f0f0; /* Slightly lighter white for answer text */
}

.page-game-rules__faq-item.active .page-game-rules__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 25px;
}

.page-game-rules__faq-answer p {
  margin: 0;
  font-size: 1em;
  line-height: 1.7;
}

.page-game-rules__cta-section {
  background-color: #017439; /* Brand color for CTA section */
  padding: 80px 0;
  text-align: center;
}

.page-game-rules__cta-section .page-game-rules__section-title {
  color: #ffffff;
}

.page-game-rules__cta-section .page-game-rules__section-description {
  color: #f0f0f0;
  margin-bottom: 40px;
}

.page-game-rules__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 25px;
}

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-rules__btn-primary {
  background-color: #C30808; /* Custom color for Register/Login */
  color: #FFFF00; /* Custom color for Register/Login font */
  border: 2px solid #C30808;
}

.page-game-rules__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
}

.page-game-rules__btn-secondary {
  background-color: transparent;
  color: #FFFF00; /* Custom color for Register/Login font */
  border: 2px solid #C30808; /* Custom color for border */
}

.page-game-rules__btn-secondary:hover {
  background-color: #C30808;
  color: #ffffff;
}

/* Image specific styles */
.page-game-rules img {
  max-width: 100%;
  height: auto;
  display: block;
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-rules__hero-title {
    font-size: 2.8em;
  }

  .page-game-rules__hero-description {
    font-size: 1.2em;
  }

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

  .page-game-rules__section-description {
    font-size: 1em;
  }

  .page-game-rules__content-grid--two-columns {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }

  .page-game-rules__game-category {
    padding: 30px;
  }

  .page-game-rules__category-title {
    font-size: 1.8em;
  }

  .page-game-rules__faq-question {
    font-size: 1.1em;
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-game-rules__hero-section {
    height: 450px;
    padding-top: 0; /* Keep 0 if shared.css handles body padding */
  }

  .page-game-rules__hero-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

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

  .page-game-rules__hero-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px; /* Constrain buttons for better mobile look */
    margin: 0 auto;
  }

  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 25px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* LOGO 轮播区域 - Not present in this page, so no specific rules for .page-game-rules__logo-item needed. */
  /* If it were present, rules like below would apply: */
  /*
  .page-game-rules__logo-carousel-section {
    padding: 30px 0;
  }
  .page-game-rules__logo-carousel {
    justify-content: center;
  }
  .page-game-rules__logo-item {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    margin: 0 10px;
  }
  */

  /* 游戏展示区域 (Game Categories) */
  .page-game-rules__game-category {
    padding: 25px;
    margin-bottom: 25px;
  }

  .page-game-rules__category-title {
    font-size: 1.5em;
    margin-bottom: 20px;
  }

  .page-game-rules__category-list li {
    padding: 15px;
    font-size: 0.95em;
  }

  /* 通用图片与容器 */
  .page-game-rules__container {
    padding: 20px 15px;
  }

  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px;
    min-height: 200px;
  }

  /* Buttons and button containers */
  .page-game-rules__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px; /* Constrain buttons for better mobile look */
    margin: 0 auto;
  }

  /* Other content modules (e.g., cards, sections) */
  .page-game-rules__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  .page-game-rules__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-game-rules__content-grid,
  .page-game-rules__content-grid--two-columns {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
  }

  .page-game-rules__card {
    padding: 25px;
  }

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

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

  .page-game-rules__faq-answer {
    padding: 0 20px;
  }

  .page-game-rules__faq-item.active .page-game-rules__faq-answer {
    padding: 20px;
  }

  .page-game-rules__cta-section {
    padding: 50px 0;
  }
}