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

.page-game-rules__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  background-color: #08160F; /* Dark background for hero */
  color: #F2FFF6; /* Light text for dark background */
  overflow: hidden;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-height: 500px; /* Limit height for hero image */
  overflow: hidden;
}

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

.page-game-rules__hero-content {
  position: relative;
  z-index: 10;
  padding: 20px;
  max-width: 900px;
  margin-top: -100px; /* Overlap slightly with image for visual flow */
  background: rgba(17, 40, 27, 0.85); /* Semi-transparent background for text */
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-sizing: border-box;
}

.page-game-rules__main-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: bold;
  color: #F2C14E; /* Gold for main title */
  margin-bottom: 15px;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.page-game-rules__description {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: #A7D9B8; /* Secondary text color */
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-game-rules__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

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

.page-game-rules__cta-button--secondary {
  background: #2E7A4E; /* Border color as secondary button background */
  margin-left: 15px;
}

.page-game-rules__cta-button--secondary:hover {
  background: #0A4B2C;
}

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

.page-game-rules__light-bg {
  background-color: #f9f9f9; /* Light background for contrast */
  color: #333333; /* Dark text for light background */
}

.page-game-rules__dark-bg {
  background-color: #08160F; /* Deep Green background */
  color: #F2FFF6; /* Main text color for dark background */
}

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

.page-game-rules__section-title {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  color: inherit;
  margin-bottom: 30px;
  font-weight: bold;
  position: relative;
  padding-bottom: 15px;
}

.page-game-rules__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #2AD16F; /* Button gradient start color */
  border-radius: 2px;
}

.page-game-rules__text-block {
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.7;
  text-align: justify;
}

.page-game-rules__list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-game-rules__list-item {
  background-color: #11271B; /* Card BG for list items in dark sections */
  color: #F2FFF6;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.page-game-rules__list-item strong {
  color: #F2C14E; /* Gold for strong text */
}

.page-game-rules__light-bg .page-game-rules__list-item {
  background-color: #ffffff;
  color: #333333;
  border: 1px solid #e0e0e0;
}

.page-game-rules__light-bg .page-game-rules__list-item strong {
  color: #11A84E;
}

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

.page-game-rules__faq-list {
  margin-top: 30px;
  text-align: left;
}

.page-game-rules__faq-item {
  background-color: #11271B; /* Card BG */
  color: #F2FFF6;
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.page-game-rules__light-bg .page-game-rules__faq-item {
  background-color: #ffffff;
  color: #333333;
  border: 1px solid #e0e0e0;
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  user-select: none;
  background-color: #1E3A2A; /* Divider color for FAQ question */
  color: #F2FFF6;
  list-style: none;
}

.page-game-rules__light-bg .page-game-rules__faq-question {
  background-color: #f0f0f0;
  color: #11A84E;
}

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

.page-game-rules__faq-item[open] .page-game-rules__faq-question {
  background-color: #0A4B2C; /* Deep Green when open */
}

.page-game-rules__light-bg .page-game-rules__faq-item[open] .page-game-rules__faq-question {
  background-color: #e0e0e0;
  color: #0A4B2C;
}

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

.page-game-rules__faq-toggle {
  font-size: 1.5rem;
  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: 20px 25px;
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: justify;
  color: #A7D9B8; /* Secondary text color */
}

.page-game-rules__light-bg .page-game-rules__faq-answer {
  color: #333333;
}

.page-game-rules__floating-buttons {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-game-rules__floating-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  border-radius: 50%;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  overflow: hidden;
}

.page-game-rules__floating-button:hover {
  width: 120px; /* Expand on hover */
  border-radius: 30px;
}

.page-game-rules__floating-button span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-game-rules__floating-button--login {
  background: linear-gradient(180deg, #F2C14E 0%, #E0A800 100%); /* Gold gradient for login */
}

.page-game-rules__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

/* Responsive styles */
@media (max-width: 768px) {
  .page-game-rules__hero-content {
    margin-top: -50px; /* Adjust overlap for smaller screens */
    padding: 15px;
  }

  .page-game-rules__main-title {
    font-size: 1.8rem;
  }

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

  .page-game-rules__cta-button {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 10px;
    padding: 12px 20px;
    font-size: 1rem;
  }

  .page-game-rules__cta-button--secondary {
    margin-top: 10px;
  }

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

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

  .page-game-rules__text-block {
    font-size: 0.9rem;
  }

  .page-game-rules__list-item {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

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

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

  .page-game-rules__floating-buttons {
    bottom: 15px;
    right: 15px;
  }

  .page-game-rules__floating-button {
    width: 50px;
    height: 50px;
    font-size: 0.8rem;
  }

  .page-game-rules__floating-button:hover {
    width: 100px;
  }

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

  .page-game-rules__container,
  .page-game-rules__hero-image-wrapper,
  .page-game-rules__hero-content,
  .page-game-rules__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-game-rules__hero-section {
    padding-top: 10px !important;
  }
}

@media (max-width: 480px) {
  .page-game-rules__main-title {
    font-size: 1.6rem;
  }

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

  .page-game-rules__floating-button {
    width: 45px;
    height: 45px;
    font-size: 0.75rem;
  }

  .page-game-rules__floating-button:hover {
    width: 90px;
  }
}