/* style/game-rules.css */
/* Body background is #08160F (dark), so text should be light. */
/* Custom colors:
   Button: linear-gradient(180deg, #2AD16F 0%, #13994A 100%)
   Card BG: #11271B
   Background: #08160F (This is the shared body background)
   Text Main: #F2FFF6
   Text Secondary: #A7D9B8
   Border: #2E7A4E
   Glow: #57E38D
   Gold: #F2C14E
   Divider: #1E3A2A
   Deep Green: #0A4B2C
*/

.page-game-rules {
  font-family: Arial, sans-serif;
  color: var(--text-main, #F2FFF6); /* Default text color for dark background */
  background-color: var(--background-color, #08160F); /* Ensure consistency with body background */
}

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

/* Hero Section */
.page-game-rules__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--deep-green, #0A4B2C); /* A darker shade for the section background */
  overflow: hidden;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-height: 675px; /* Limit height for responsiveness */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.page-game-rules__hero-content {
  width: 100%;
  max-width: 900px;
  text-align: center;
  padding: 40px 20px 60px;
  box-sizing: border-box;
  background-color: var(--card-bg, #11271B); /* Dark background for text block */
  border-radius: 8px;
  margin-top: -50px; /* Overlap slightly with the image for visual interest */
  position: relative;
  z-index: 1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-game-rules__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size for H1 */
  font-weight: 700;
  color: var(--text-main, #F2FFF6);
  line-height: 1.2;
  margin-bottom: 20px;
}

.page-game-rules__subtitle {
  font-size: 1.1em;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 30px;
  line-height: 1.6;
}

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

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1em;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-game-rules__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-game-rules__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-game-rules__btn-secondary {
  background-color: #ffffff;
  color: var(--primary-color, #11A84E);
  border: 2px solid var(--primary-color, #11A84E);
}

.page-game-rules__btn-secondary:hover {
  background-color: var(--primary-color, #11A84E);
  color: #ffffff;
  border-color: #ffffff;
}

/* General Section Styles */
.page-game-rules__introduction-section,
.page-game-rules__general-rules-section,
.page-game-rules__specific-rules-section,
.page-game-rules__dispute-resolution-section,
.page-game-rules__updates-section,
.page-game-rules__faq-section,
.page-game-rules__conclusion-section {
  padding: 60px 0;
  overflow: hidden;
}

.page-game-rules__introduction-section .page-game-rules__container,
.page-game-rules__updates-section .page-game-rules__container {
  background-color: #ffffff; /* Light background for readability */
  color: #333333; /* Dark text for light background */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-game-rules__specific-rules-section .page-game-rules__container {
  background-color: #ffffff; /* Light background for readability */
  color: #333333; /* Dark text for light background */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-game-rules__general-rules-section .page-game-rules__container,
.page-game-rules__faq-section .page-game-rules__container {
  background-color: var(--card-bg, #11271B); /* Dark card background */
  color: var(--text-main, #F2FFF6); /* Light text */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-game-rules__dispute-resolution-section,
.page-game-rules__conclusion-section {
  background-color: var(--deep-green, #0A4B2C); /* Dark green background */
  color: var(--text-main, #F2FFF6); /* Light text */
}

.page-game-rules__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: inherit; /* Inherit color from parent section */
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.3;
}

.page-game-rules__introduction-section .page-game-rules__section-title,
.page-game-rules__specific-rules-section .page-game-rules__section-title,
.page-game-rules__updates-section .page-game-rules__section-title {
  color: #333333; /* Dark title for light background */
}

.page-game-rules__paragraph {
  font-size: 1.05em;
  line-height: 1.7;
  margin-bottom: 20px;
  color: inherit; /* Inherit color from parent section */
}

.page-game-rules__paragraph strong {
  color: inherit;
}

.page-game-rules__list {
  list-style: disc;
  margin-left: 25px;
  margin-bottom: 20px;
  color: inherit; /* Inherit color from parent section */
}

.page-game-rules__list li {
  margin-bottom: 10px;
  line-height: 1.6;
}

/* Grid for general rules cards */
.page-game-rules__grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-game-rules__rule-card {
  background-color: var(--deep-green, #0A4B2C); /* Slightly lighter dark green for cards */
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--text-main, #F2FFF6);
}

.page-game-rules__card-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  min-height: 200px; /* Ensure minimum size */
}

.page-game-rules__card-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--gold, #F2C14E); /* Gold for titles */
}

.page-game-rules__card-text {
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-secondary, #A7D9B8);
}

.page-game-rules__cta-area {
  text-align: center;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--divider, #1E3A2A);
}

.page-game-rules__cta-area .page-game-rules__paragraph {
  font-size: 1.2em;
  font-weight: 500;
  margin-bottom: 30px;
}

/* Specific Game Rules */
.page-game-rules__game-category {
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border, #2E7A4E); /* Border for separation */
}

.page-game-rules__game-category:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.page-game-rules__category-title {
  font-size: 2em;
  font-weight: 700;
  color: var(--primary-color, #11A84E); /* Brand primary color for category titles */
  margin-bottom: 25px;
  text-align: center;
}

.page-game-rules__game-category img {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  margin: 0 auto 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-height: 200px; /* Ensure minimum size */
}

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

.page-game-rules__faq-item {
  background-color: var(--deep-green, #0A4B2C);
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  color: var(--text-main, #F2FFF6);
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: 600;
  cursor: pointer;
  background-color: var(--card-bg, #11271B); /* Slightly darker for question header */
  color: var(--text-main, #F2FFF6);
  border-bottom: 1px solid var(--divider, #1E3A2A);
}

.page-game-rules__faq-item[open] .page-game-rules__faq-question {
  border-bottom: none;
}

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

.page-game-rules__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--glow, #57E38D);
}

.page-game-rules__faq-answer {
  padding: 20px 25px;
  background-color: var(--deep-green, #0A4B2C);
  color: var(--text-secondary, #A7D9B8);
  font-size: 1em;
  line-height: 1.7;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-game-rules__hero-content {
    margin-top: -30px;
    padding: 30px 15px 40px;
  }

  .page-game-rules__main-title {
    font-size: clamp(1.8em, 5vw, 2.8em);
  }

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

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

@media (max-width: 768px) {
  .page-game-rules__hero-section {
    padding-top: 10px !important;
  }

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

  .page-game-rules__main-title {
    font-size: clamp(1.5em, 6vw, 2.2em);
  }

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

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

  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }

  .page-game-rules__container {
    padding: 30px 15px;
  }

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

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

  .page-game-rules__grid-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

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

  /* Mobile image responsiveness */
  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-height: 200px !important; /* Ensure minimum size */
  }

  .page-game-rules__section,
  .page-game-rules__card,
  .page-game-rules__container,
  .page-game-rules__hero-section,
  .page-game-rules__hero-content,
  .page-game-rules__game-category,
  .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;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }
  
  .page-game-rules__video-section {
    padding-top: 10px !important; /* body 已承担 --header-offset，此处禁止 var(--header-offset) */
  }
}