.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: var(--background-color, #FFFFFF);
}

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

/* HERO Section */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: var(--header-offset, 120px); /* Assuming shared doesn't set body padding-top */
  margin-top: 0;
  width: 100%;
  overflow: hidden;
}

.page-index__hero-container {
  position: relative;
  margin: 0 auto;
  width: 100%;
}

.page-index__hero-image {
  width: 100%;
  margin: 0;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
}

/* Product Showcase Section */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: #FFFFFF;
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr;
  gap: 20px;
}

.page-index__products-grid {
  display: grid;
  gap: 20px;
}

.page-index__products-grid--small {
  grid-template-columns: repeat(4, 1fr);
}

.page-index__products-grid--large {
  grid-template-columns: repeat(2, 1fr);
}

.page-index__product-card {
  width: 100%;
  max-width: 300px; /* Max width for each product card */
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  transition: transform 0.3s ease;
}

.page-index__product-card:hover {
  transform: translateY(-3px);
}

.page-index__product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__product-card-image {
  width: 100%;
  max-width: 300px;
  overflow: hidden;
}

.page-index__product-card-image img {
  max-width: 100%;
  width: 100%;
  height: auto; /* Maintain aspect ratio */
  display: block;
}

/* Introduction Section */
.page-index__introduction-section {
  padding: 80px 0;
  text-align: center;
}

.page-index__main-title {
  font-size: 38px;
  color: #017439;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-index__description {
  font-size: 18px;
  max-width: 900px;
  margin: 0 auto 40px;
  color: #555555;
}

.page-index__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}

.page-index__feature-item {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.page-index__feature-title {
  font-size: 22px;
  color: #017439;
  margin-top: 0;
  margin-bottom: 15px;
}

.page-index__feature-item p {
  font-size: 16px;
  color: #666666;
}

/* Quick Access Section */
.page-index__quick-access-section {
  padding: 80px 0;
  text-align: center;
  color: #ffffff;
}

.page-index__section-title {
  font-size: 32px;
  margin-bottom: 15px;
  color: inherit;
}

.page-index__section-description {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #e0e0e0;
}

.page-index__button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

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

.page-index__btn-primary:hover {
  background: #a80707;
  border-color: #a80707;
}

.page-index__btn-secondary {
  background: transparent;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
}

.page-index__btn-secondary:hover {
  background: #FFFFFF;
  color: #017439;
}

/* Games Overview Section */
.page-index__games-overview-section {
  padding: 80px 0;
  text-align: center;
}

.page-index__games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index__game-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.page-index__game-card img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 15px;
  display: block;
}

.page-index__game-title {
  font-size: 20px;
  color: #017439;
  margin-top: 0;
  margin-bottom: 10px;
}

.page-index__game-title a {
  color: #017439;
  text-decoration: none;
}

.page-index__game-title a:hover {
  text-decoration: underline;
}

.page-index__game-card p {
  font-size: 15px;
  color: #666666;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 80px 0;
  text-align: center;
  color: #ffffff;
}

.page-index__promotions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index__promo-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background 0.3s ease;
}

.page-index__promo-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.page-index__promo-card img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 15px;
  display: block;
}

.page-index__promo-title {
  font-size: 22px;
  color: #FFFF00;
  margin-top: 0;
  margin-bottom: 10px;
}

.page-index__promo-title a {
  color: #FFFF00;
  text-decoration: none;
}

.page-index__promo-title a:hover {
  text-decoration: underline;
}

.page-index__promo-card p {
  font-size: 16px;
  color: #f0f0f0;
}

/* Security & Support Section */
.page-index__security-support-section {
  padding: 80px 0;
  text-align: center;
}

.page-index__info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index__info-card {
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.page-index__info-card img {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-index__info-title {
  font-size: 22px;
  color: #017439;
  margin-top: 0;
  margin-bottom: 15px;
}

.page-index__info-card p {
  font-size: 16px;
  color: #666666;
}

/* FAQ Section */
.page-index__faq-section {
  padding: 80px 0;
  text-align: center;
  color: #ffffff;
}

.page-index__faq-list {
  max-width: 900px;
  margin: 40px auto 0;
  text-align: left;
}

.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-index__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-index__faq-question:active {
  background: #eeeeee;
}

.page-index__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: #333333;
  pointer-events: none;
}

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-index__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important;
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #333333;
}

.page-index__faq-item.active .page-index__faq-toggle {
  color: #333;
}

/* Blog Section */
.page-index__blog-section {
  padding: 80px 0;
  text-align: center;
}

.page-index__blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index__blog-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
}

.page-index__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.page-index__blog-card img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 15px;
  display: block;
}

.page-index__blog-title {
  font-size: 20px;
  color: #017439;
  margin-top: 0;
  margin-bottom: 10px;
}

.page-index__blog-title a {
  color: #017439;
  text-decoration: none;
}

.page-index__blog-title a:hover {
  text-decoration: underline;
}

.page-index__blog-date {
  font-size: 14px;
  color: #999999;
  margin-bottom: 10px;
}

.page-index__blog-card p {
  font-size: 16px;
  color: #666666;
}

/* Color Contrast Classes */
.page-index__dark-bg {
  background: #017439;
  color: #ffffff;
}

.page-index__light-bg {
  background: #ffffff;
  color: #333333;
}

/* General Image Responsiveness */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__products-container {
    grid-template-columns: 1fr; /* Stack products grids vertically */
  }

  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-index__products-grid--large {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-index__main-title {
    font-size: 34px;
  }

  .page-index__section-title {
    font-size: 28px;
  }

  .page-index__btn-primary,
  .page-index__btn-secondary {
    padding: 12px 25px;
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-index__hero-section {
    padding-top: 0 !important; /* shared already set body padding-top */
    padding-left: 0;
    padding-right: 0;
  }

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

  /* 产品展示图区域 */
  .page-index__products-section {
    padding: 40px 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  
  .page-index__products-container {
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .page-index__products-grid--small .page-index__product-card,
  .page-index__products-grid--small .page-index__product-card-image {
    max-width: 100%; /* Adjust for mobile grid */
  }
  
  .page-index__products-grid--small .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__products-grid--large {
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .page-index__products-grid--large .page-index__product-card,
  .page-index__products-grid--large .page-index__product-card-image {
    max-width: 100%; /* Adjust for mobile grid */
  }
  
  .page-index__products-grid--large .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* 通用图片与容器 */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__section,
  .page-index__card,
  .page-index__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 按钮与按钮容器 */
  .page-index__btn-primary,
  .page-index__btn-secondary,
  .page-index a[class*="button"],
  .page-index 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-left: 15px;
    padding-right: 15px;
  }
  
  .page-index__button-group,
  .page-index__cta-buttons,
  .page-index__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
    overflow: hidden !important;
  }

  /* 其他内容模块 */
  .page-index__main-title {
    font-size: 28px;
  }

  .page-index__section-title {
    font-size: 24px;
  }

  .page-index__description,
  .page-index__section-description,
  .page-index__feature-item p,
  .page-index__game-card p,
  .page-index__promo-card p,
  .page-index__info-card p,
  .page-index__blog-card p {
    font-size: 15px;
  }

  .page-index__feature-title,
  .page-index__game-title,
  .page-index__promo-title,
  .page-index__info-title,
  .page-index__blog-title {
    font-size: 18px;
  }

  .page-index__introduction-section, 
  .page-index__quick-access-section, 
  .page-index__games-overview-section, 
  .page-index__promotions-section, 
  .page-index__security-support-section, 
  .page-index__faq-section, 
  .page-index__blog-section {
    padding: 40px 0;
  }

  .page-index__container {
    padding: 0 15px;
  }

  .page-index__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-index__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-index__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-index__faq-answer {
    padding: 0 15px;
  }
  
  .page-index__faq-item.active .page-index__faq-answer {
    padding: 15px !important;
  }
}