:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg-color: #11271B;
  --bg-color: #08160F;
  --text-main-color: #F2FFF6;
  --text-secondary-color: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green-color: #0A4B2C;
}

.page-g {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-main-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Global Elements Styling --- */
.page-g__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-g__section-title {
  font-size: clamp(28px, 4vw, 38px);
  color: var(--text-main-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.page-g__main-title {
  font-size: clamp(32px, 5vw, 48px); /* Using clamp as required */
  font-weight: bold;
  color: var(--text-main-color);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: 0.8px;
  max-width: 900px; /* Limit width for better readability */
  margin-left: auto;
  margin-right: auto;
}

.page-g__description {
  font-size: 18px;
  color: var(--text-secondary-color);
  text-align: center;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-g__image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 30px auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
}

.page-g p {
  margin-bottom: 1em;
  color: var(--text-secondary-color);
}

.page-g ul, .page-g ol {
  margin-bottom: 1em;
  padding-left: 25px;
}

.page-g li {
  margin-bottom: 0.5em;
  color: var(--text-secondary-color);
}

.page-g a {
  color: var(--primary-color); /* Link color */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-g a:hover {
  color: var(--gold-color); /* Hover effect */
  text-decoration: underline;
}

/* --- Buttons --- */
.page-g__btn-primary,
.page-g__btn-secondary {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text breaking */
  max-width: 100%; /* Ensure responsiveness */
}

.page-g__btn-primary {
  background: var(--button-gradient);
  color: #ffffff; /* White text for primary button */
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-g__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%); /* Slight gradient shift on hover */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.page-g__btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-g__btn-secondary:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
}

.page-g__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  margin-bottom: 40px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-g__btn-lg {
  padding: 15px 35px;
  font-size: 18px;
}

/* --- Sections --- */
.page-g__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 40px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  overflow: hidden; /* Ensure no overflow */
  min-height: 500px; /* Ensure hero has some height */
  justify-content: center;
}

.page-g__hero-image-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  overflow: hidden;
}

.page-g__hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Darken image for text readability */
}

.page-g__hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 15px;
  color: var(--text-main-color); /* Ensure light text on dark hero */
}

.page-g__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--divider-color);
}

.page-g__video-wrapper {
  position: relative;
  width: 100%; /* Important for desktop */
  max-width: 1280px; /* Max width for the video */
  margin: 0 auto;
  aspect-ratio: 16/9; /* Maintain 16:9 aspect ratio */
  background-color: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-g__video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  cursor: pointer; /* Indicate it's clickable */
}

.page-g__video-overlay-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10; /* Above the video but below controls */
  cursor: pointer;
}

.page-g__video-description {
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
    color: var(--text-secondary-color);
    max-width: 800px;
}

.page-g__introduction-section,
.page-g__game-types,
.page-g__promotions-section,
.page-g__faq-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--divider-color);
}

.page-g__why-choose-us,
.page-g__how-to-play,
.page-g__safety-section,
.page-g__cta-final {
  padding: 80px 0;
  border-bottom: 1px solid #e0e0e0; /* Lighter border for light sections */
}

.page-g__dark-section {
  background-color: var(--bg-color);
  color: var(--text-main-color);
}

.page-g__light-bg {
  background-color: #f5f5f5; /* A very light grey for contrast */
  color: #333333; /* Dark text for light background */
}

.page-g__light-bg .page-g__section-title,
.page-g__light-bg .page-g__card-title,
.page-g__light-bg .page-g__item-title {
  color: #000000; /* Ensure dark titles on light bg */
}

.page-g__light-bg p,
.page-g__light-bg li {
  color: #333333; /* Ensure dark text on light bg */
}

.page-g__light-bg a {
  color: var(--deep-green-color); /* Darker link for light bg */
}

.page-g__light-bg .page-g__btn-secondary {
  border-color: var(--deep-green-color);
  color: var(--deep-green-color);
}

.page-g__light-bg .page-g__btn-secondary:hover {
  background-color: var(--deep-green-color);
  color: #ffffff;
}

/* --- Feature Grid / Card Layout --- */
.page-g__feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-g__card {
  background-color: var(--card-bg-color); /* Dark card background */
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-secondary-color); /* Light text on dark card */
}

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

.page-g__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  min-width: 200px;
  min-height: 200px;
}

.page-g__card-title,
.page-g__item-title,
.page-g__promo-title,
.page-g__step-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--text-main-color); /* Light titles on dark cards */
}

/* --- Game Types / Type List --- */
.page-g__type-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-g__type-item {
  padding: 30px;
  text-align: left;
}

/* --- How to Play / Steps List --- */
.page-g__steps-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-g__steps-list li {
  background-color: var(--card-bg-color); /* Dark card background */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-secondary-color);
}

.page-g__steps-list li p {
  flex-grow: 1; /* Allow paragraph to take available space */
  margin-bottom: 20px;
}

.page-g__steps-list li .page-g__btn-secondary {
  margin-top: auto; /* Push button to bottom */
}

/* --- Promotions List --- */
.page-g__promo-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-g__promo-list li {
  background-color: var(--card-bg-color); /* Dark card background */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-align: left;
  color: var(--text-secondary-color);
}

/* --- Safety Section --- */
.page-g__safety-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-g__safety-item {
  padding: 30px;
  text-align: center;
  background-color: var(--card-bg-color); /* Dark card background */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: var(--text-secondary-color);
}

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

.page-g__faq-item {
  background-color: var(--card-bg-color); /* Dark card background */
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  color: var(--text-secondary-color);
}

.page-g__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  background-color: var(--deep-green-color); /* Slightly lighter dark for question */
  color: var(--text-main-color); /* Light text for question */
  border-bottom: 1px solid var(--divider-color);
  list-style: none; /* For details/summary */
}

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

.page-g__faq-question:hover {
  background-color: var(--primary-color);
}

.page-g__faq-qtext {
  flex-grow: 1;
}

.page-g__faq-toggle {
  font-size: 24px;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

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

.page-g__faq-answer {
  padding: 15px 25px 20px;
  font-size: 16px;
  color: var(--text-secondary-color); /* Light text for answer */
  background-color: var(--card-bg-color); /* Dark card background */
}

.page-g__faq-answer p {
  margin-bottom: 0;
}

/* --- Final CTA --- */
.page-g__cta-final {
  text-align: center;
  padding: 60px 0;
}

.page-g__contact-prompt {
  margin-top: 20px;
  font-size: 16px;
  color: var(--text-secondary-color);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-g__hero-section {
    padding: 40px 15px 30px;
  }
  .page-g__introduction-section,
  .page-g__why-choose-us,
  .page-g__game-types,
  .page-g__how-to-play,
  .page-g__promotions-section,
  .page-g__safety-section,
  .page-g__faq-section,
  .page-g__cta-final {
    padding: 60px 0;
  }
  .page-g__container {
    padding: 0 15px;
  }
  .page-g__section-title {
    font-size: clamp(24px, 3.5vw, 32px);
  }
  .page-g__main-title {
    font-size: clamp(28px, 4.5vw, 40px);
  }
  .page-g__description {
    font-size: 16px;
  }
}

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

  .page-g__hero-section {
    padding: 30px 15px 20px;
    padding-top: 10px !important; /* body handles header offset */
  }

  .page-g__hero-content {
    padding: 0;
  }

  .page-g__main-title {
    font-size: clamp(26px, 6vw, 36px);
  }

  .page-g__section-title {
    font-size: clamp(22px, 5vw, 30px);
    margin-bottom: 30px;
  }

  .page-g__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-g__btn-primary,
  .page-g__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-g__introduction-section,
  .page-g__why-choose-us,
  .page-g__game-types,
  .page-g__how-to-play,
  .page-g__promotions-section,
  .page-g__safety-section,
  .page-g__faq-section,
  .page-g__cta-final {
    padding: 40px 0;
  }

  .page-g__container {
    padding: 0 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-g img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: unset;
    min-height: unset;
  }
  
  .page-g__card-image {
    height: auto !important;
    min-height: 200px;
  }

  .page-g__card,
  .page-g__safety-item,
  .page-g__type-item,
  .page-g__steps-list li,
  .page-g__promo-list li {
    padding: 20px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-g__feature-grid,
  .page-g__type-list,
  .page-g__steps-list,
  .page-g__promo-list,
  .page-g__safety-features {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-g__faq-question {
    font-size: 16px;
    padding: 15px 20px;
  }

  .page-g__faq-answer {
    padding: 10px 20px 15px;
    font-size: 15px;
  }

  /* Video specific mobile styles */
  .page-g video,
  .page-g__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-g__video-section,
  .page-g__video-container,
  .page-g__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-g__video-section {
    padding-top: 10px !important;
  }
  
  .page-g__video-wrapper {
    aspect-ratio: 16/9; /* Maintain aspect ratio */
  }
}