/* style/game-rules.css */
.page-game-rules {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main, #333333);
  background-color: var(--bg-color, #F5F7FA);
}

.page-game-rules__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 0;
  position: relative;
  overflow: hidden;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Brand gradient */
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-height: 675px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

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

.page-game-rules__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  text-align: center;
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for readability */
  margin-top: -100px; /* Pull content up slightly over image */
  border-radius: 10px;
}

.page-game-rules__main-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 15px;
  color: #ffffff;
  line-height: 1.2;
}

.page-game-rules__description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.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 {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

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

.page-game-rules__btn-primary:hover {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
  transform: translateY(-2px);
}

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

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

.page-game-rules__section {
  padding: 60px 20px;
  text-align: center;
}

.page-game-rules__dark-section {
  background: #E53935;
  color: #ffffff;
}

.page-game-rules__light-bg {
  background: var(--bg-color, #F5F7FA);
  color: var(--text-main, #333333);
}

.page-game-rules__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 40px;
  line-height: 1.3;
}

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

.page-game-rules__text-block {
  max-width: 900px;
  margin: 0 auto 40px auto;
  font-size: 1.1rem;
  line-height: 1.7;
}

.page-game-rules__feature-grid,
.page-game-rules__fish-types-grid,
.page-game-rules__item-grid,
.page-game-rules__strategy-grid,
.page-game-rules__info-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-game-rules__card {
  background: var(--card-bg, #FFFFFF);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: left;
  display: flex;
  flex-direction: column;
  color: var(--text-main, #333333);
  border: 1px solid var(--border-color, #E0E0E0);
  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.15);
}

.page-game-rules__feature-image,
.page-game-rules__fish-image,
.page-game-rules__item-image,
.page-game-rules__strategy-image,
.page-game-rules__info-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-game-rules__feature-title,
.page-game-rules__fish-title,
.page-game-rules__item-title,
.page-game-rules__strategy-title,
.page-game-rules__info-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #E53935; /* Using brand color for titles */
}

.page-game-rules__feature-description,
.page-game-rules__fish-description,
.page-game-rules__item-description,
.page-game-rules__strategy-description,
.page-game-rules__info-description {
  font-size: 1rem;
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 20px;
}

.page-game-rules__card-btn {
  margin-top: auto;
  align-self: flex-start;
}

.page-game-rules__faq-section {
  background: #E53935;
  color: #ffffff;
  padding: 60px 20px;
}

.page-game-rules__faq-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.page-game-rules__faq-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.3s ease;
  list-style: none; /* For details/summary */
}

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

.page-game-rules__faq-item[open] > .page-game-rules__faq-question {
  background: rgba(255, 255, 255, 0.15);
}

.page-game-rules__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

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

.page-game-rules__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: #f0f0f0;
  line-height: 1.6;
}

.page-game-rules__conclusion-section {
  padding: 60px 20px;
}

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

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

  .page-game-rules__feature-grid,
  .page-game-rules__fish-types-grid,
  .page-game-rules__item-grid,
  .page-game-rules__strategy-grid,
  .page-game-rules__info-cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 0 15px;
  }

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

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

  .page-game-rules__feature-title,
  .page-game-rules__fish-title,
  .page-game-rules__item-title,
  .page-game-rules__strategy-title,
  .page-game-rules__info-title {
    font-size: 1.4rem;
  }

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

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

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

  .page-game-rules__feature-image,
  .page-game-rules__fish-image,
  .page-game-rules__item-image,
  .page-game-rules__strategy-image,
  .page-game-rules__info-image {
    height: 200px;
  }
}

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

  /* HERO 主图区域 */
  .page-game-rules__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles header offset */
    padding-bottom: 20px;
  }

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

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

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

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

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

  .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;
    font-size: 0.9rem;
  }

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

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

  .page-game-rules__text-block {
    font-size: 1rem;
    margin-bottom: 30px;
  }

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

  .page-game-rules__feature-grid,
  .page-game-rules__fish-types-grid,
  .page-game-rules__item-grid,
  .page-game-rules__strategy-grid,
  .page-game-rules__info-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-game-rules__card {
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .page-game-rules__feature-image,
  .page-game-rules__fish-image,
  .page-game-rules__item-image,
  .page-game-rules__strategy-image,
  .page-game-rules__info-image {
    height: auto;
    min-height: 200px; /* Enforce min height for content images */
  }

  .page-game-rules__feature-title,
  .page-game-rules__fish-title,
  .page-game-rules__item-title,
  .page-game-rules__strategy-title,
  .page-game-rules__info-title {
    font-size: 1.2rem;
  }

  .page-game-rules__feature-description,
  .page-game-rules__fish-description,
  .page-game-rules__item-description,
  .page-game-rules__strategy-description,
  .page-game-rules__info-description {
    font-size: 0.95rem;
  }

  /* FAQ 区域 */
  .page-game-rules__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }

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

  .page-game-rules__card-btn {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center;
  }
}