/* style/game-rules.css */
.page-game-rules {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Body background #0a0a0a is dark, so text is light */
  background-color: #0a0a0a;
}

.page-game-rules__hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-top: 10px; /* Small top padding, assuming shared.css handles body padding-top */
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-height: 675px;
  overflow: hidden;
}

.page-game-rules__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.6); /* Slightly darken image for text contrast, not changing color */
}

.page-game-rules__hero-content {
  max-width: 900px;
  margin-top: 20px;
  padding: 0 20px;
}

.page-game-rules__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: #ffffff;
  margin-bottom: 15px;
  line-height: 1.2;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-game-rules__description {
  font-size: 1.15rem;
  color: #f0f0f0;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-size: 1rem;
  max-width: 100%; /* Ensure buttons adapt to mobile */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-game-rules__btn-primary:hover {
  background-color: #e00b0b;
  transform: translateY(-2px);
}

.page-game-rules__btn-secondary {
  background-color: #017439;
  color: #ffffff;
  border: 2px solid #017439;
}

.page-game-rules__btn-secondary:hover {
  background-color: #005a2d;
  transform: translateY(-2px);
}

.page-game-rules__section {
  padding: 60px 0;
  background-color: #0d0d0d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-game-rules__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: #017439;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-game-rules p {
  font-size: 1.05rem;
  color: #e0e0e0;
  margin-bottom: 20px;
}

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

.page-game-rules__list-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-left: 5px solid #017439;
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 8px;
}

.page-game-rules__list-item strong,
.page-game-rules__list-title {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 10px;
  display: block;
}

.page-game-rules__list-item p {
  color: #cccccc;
  margin-bottom: 0;
}

.page-game-rules__content-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-top: 30px;
  object-fit: cover;
}

.page-game-rules__game-category {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-game-rules__category-title {
  color: #017439;
  font-size: 1.8rem;
  margin-bottom: 20px;
  text-align: center;
}

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

.page-game-rules__cta-box {
  background-color: #017439;
  padding: 40px;
  border-radius: 10px;
  text-align: center;
  margin-top: 40px;
}

.page-game-rules__cta-text {
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 25px;
  font-weight: bold;
}

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

.page-game-rules__faq-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  color: #ffffff;
  font-weight: bold;
  font-size: 1.1rem;
  list-style: none;
}

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

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

.page-game-rules__faq-qtext {
  flex-grow: 1;
}

.page-game-rules__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: #017439;
}

.page-game-rules__faq-answer {
  padding: 0 20px 20px;
  color: #cccccc;
  font-size: 1rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-game-rules__faq-item[open] .page-game-rules__faq-answer {
  max-height: 500px; /* Adjust as needed */
  padding-top: 10px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-rules__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }

  .page-game-rules__description {
    font-size: 1.05rem;
  }

  .page-game-rules__section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
  }

  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  .page-game-rules__cta-buttons {
    gap: 15px;
  }

  .page-game-rules__list-item strong,
  .page-game-rules__list-title {
    font-size: 1.1rem;
  }
}

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

  /* HERO 主图区域 */
  .page-game-rules__hero-section {
    padding-top: 10px !important;
    padding-bottom: 30px;
  }

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

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

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

  /* 按钮与按钮容器 */
  .page-game-rules__cta-buttons {
    flex-direction: column !important;
    gap: 10px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .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% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 15px;
  }

  /* 通用图片与容器 */
  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-game-rules__container,
  .page-game-rules__section,
  .page-game-rules__game-category,
  .page-game-rules__list-item,
  .page-game-rules__cta-box,
  .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__section {
    padding: 40px 0;
  }

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

  .page-game-rules p,
  .page-game-rules__list-item p {
    font-size: 0.95rem;
  }

  .page-game-rules__list-item strong,
  .page-game-rules__list-title {
    font-size: 1rem;
  }

  .page-game-rules__cta-text {
    font-size: 1.2rem;
  }

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

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