/* style/index.css */
.page-index {
  color: #ffffff; /* Body background is dark (#0a0a0a), so text should be light */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #0a0a0a; /* Ensure consistency with body background from shared.css */
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0; /* Assuming shared.css sets padding-top on body */
  margin-top: 0;
}

.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: #0a0a0a; /* Consistent with body background */
}

.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 individual card on desktop */
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  transition: transform 0.3s ease;
  justify-self: center; /* Center cards in their grid cells */
}

.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%;
  overflow: hidden;
}

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

/* General Section Styles */
.page-index__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

.page-index__dark-section {
  background-color: #017439;
  color: #ffffff;
}

.page-index__section-title {
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-index__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-index__highlight {
  color: #FFFF00;
}

/* Module 1: Homepage Introduction */
.page-index__intro-section {
  padding: 80px 0;
}

.page-index__intro-title {
  font-size: 38px;
  margin-bottom: 20px;
}

.page-index__intro-description {
  font-size: 18px;
  margin-bottom: 40px;
  text-align: justify;
}

.page-index__intro-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.page-index__feature-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 8px;
  text-align: center;
}

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

.page-index__feature-text {
  font-size: 16px;
  color: #f0f0f0;
}

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

.page-index__button-center {
  text-align: center;
  margin-top: 40px;
}

.page-index__btn-primary,
.page-index__btn-secondary,
.page-index__btn-promo,
.page-index__btn-read-more,
.page-index__btn-tertiary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-index__btn-primary {
  background: #017439;
  color: #ffffff;
  border: 2px solid #017439;
}

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

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

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

.page-index__btn-register {
  background: #C30808;
  color: #FFFF00;
  border-color: #C30808;
}

.page-index__btn-register:hover {
  background: #a30606;
  border-color: #a30606;
}

.page-index__btn-login {
  background: transparent;
  color: #C30808;
  border-color: #C30808;
}

.page-index__btn-login:hover {
  background: #C30808;
  color: #FFFF00;
}

.page-index__btn-promo {
  background: #FFFF00;
  color: #017439;
  border: 2px solid #FFFF00;
}

.page-index__btn-promo:hover {
  background: #e0e000;
  border-color: #e0e000;
}

.page-index__btn-read-more {
  background: #017439;
  color: #ffffff;
  border: 1px solid #017439;
  padding: 8px 15px;
  font-size: 14px;
  border-radius: 3px;
}

.page-index__btn-read-more:hover {
  background: #005f2f;
}

.page-index__btn-tertiary {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin: 0 5px;
  font-size: 15px;
  padding: 10px 20px;
}

.page-index__btn-tertiary:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Module 2: Quick Access Links / Backup Links */
.page-index__quick-access-section {
  padding: 80px 0;
  background-color: #0a0a0a;
}

.page-index__quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.page-index__quick-link-card {
  background: rgba(255, 255, 255, 0.08);
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

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

.page-index__quick-link-title {
  font-size: 22px;
  color: #FFFF00;
  margin-bottom: 10px;
}

.page-index__quick-link-description {
  font-size: 16px;
  color: #f0f0f0;
}

.page-index__backup-links {
  text-align: center;
  margin-top: 30px;
}

.page-index__backup-links p {
  margin-bottom: 20px;
  color: #f0f0f0;
}

/* Module 3: Core Game/Service Introduction */
.page-index__games-intro-section {
  padding: 80px 0;
}

.page-index__games-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 10px;
}

.page-index__tab-button {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-index__tab-button.active,
.page-index__tab-button:hover {
  background: #017439;
  color: #FFFF00;
}

.page-index__games-content {
  margin-top: 30px;
}

.page-index__game-panel {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.page-index__game-panel.active {
  display: grid;
}

.page-index__game-panel-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.page-index__game-panel-title {
  font-size: 28px;
  color: #FFFF00;
  margin-bottom: 15px;
}

.page-index__game-panel-text p {
  margin-bottom: 20px;
  color: #f0f0f0;
  text-align: justify;
}

.page-index__game-panel-text ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 20px;
  color: #f0f0f0;
}

.page-index__game-panel-text ul li a {
  color: #FFFF00;
  text-decoration: none;
}

.page-index__game-panel-text ul li a:hover {
  text-decoration: underline;
}

/* Module 4: Promotions */
.page-index__promotions-section {
  padding: 80px 0;
  background-color: #0a0a0a;
}

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

.page-index__promo-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  transition: transform 0.3s ease;
}

.page-index__promo-card:hover {
  transform: translateY(-5px);
}

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

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

.page-index__promo-card-text {
  font-size: 16px;
  color: #f0f0f0;
  padding: 0 15px;
  margin-bottom: 20px;
}

/* Module 5: Safety & Customer Service */
.page-index__safety-service-section {
  padding: 80px 0;
}

.page-index__safety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.page-index__safety-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 8px;
  text-align: center;
}

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

.page-index__safety-text {
  font-size: 16px;
  color: #f0f0f0;
}

/* Module 6: FAQ Common Questions */
.page-index__faq-section {
  padding: 80px 0;
  background-color: #0a0a0a;
}

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

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

.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;
  padding: 0 15px;
  opacity: 0;
  color: #f0f0f0;
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important;
  padding: 20px 15px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 0 5px 5px;
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  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: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.page-index__faq-question:active {
  background: rgba(255, 255, 255, 0.2);
}

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

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #FFFF00;
  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-item.active .page-index__faq-toggle {
  color: #017439;
}

/* Module 7: Latest Blog Content */
.page-index__blog-section {
  padding: 80px 0;
}

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

.page-index__blog-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.page-index__blog-card:hover {
  transform: translateY(-5px);
}

.page-index__blog-card-image img {
  width: 100%;
  height: auto;
  display: block;
}

.page-index__blog-card-content {
  padding: 20px;
}

.page-index__blog-card-title {
  font-size: 22px;
  margin-bottom: 10px;
}

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

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

.page-index__blog-card-excerpt {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 20px;
}

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

/* --- Responsive Design --- */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .page-index__intro-title {
    font-size: 32px;
  }
  .page-index__section-title {
    font-size: 28px;
  }
  .page-index__products-container {
    grid-template-columns: 1fr; /* Stack product grids */
  }
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-index__products-grid--large {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-index__games-panel {
    grid-template-columns: 1fr;
  }
  .page-index__game-panel-image {
    order: -1; /* Image above text on tablet */
  }
  .page-index__games-tabs {
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-index__tab-button {
    font-size: 15px;
    padding: 8px 15px;
  }
  .page-index__intro-features,
  .page-index__quick-links-grid,
  .page-index__promotions-grid,
  .page-index__safety-grid,
  .page-index__blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
  .page-index__container {
    padding: 30px 15px;
  }
  .page-index__button-group {
    flex-direction: column;
    gap: 15px;
  }
  .page-index__btn-primary,
  .page-index__btn-secondary,
  .page-index__btn-register,
  .page-index__btn-login {
    width: 100%;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-index__hero-section {
    padding-top: 0 !important; /* Shared handles body padding */
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 0 !important;
  }
  .page-index__hero-image img {
    width: 100% !important;
    height: auto !important;
  }
}