.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for dark body background */
  background-color: var(--dark-bg-1);
}

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

.page-index__section-title {
  font-size: 36px;
  font-weight: bold;
  color: #FFD700;
  text-align: center;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.page-index__section-description {
  font-size: 18px;
  color: #cccccc;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__section-description a {
  color: #FFD700;
  text-decoration: none;
}

.page-index__section-description a:hover {
  text-decoration: underline;
}

/* Hero Section */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0; /* Assuming shared.css sets 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;
}

/* Products Section */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: #003366; /* Use primary brand color for contrast */
  box-sizing: border-box;
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* Desktop: 4 small, 2 large */
  gap: 20px;
  box-sizing: border-box;
}

.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;
  justify-self: center; /* Center cards in grid cell */
}

.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;
}

/* Intro Section */
.page-index__intro-section {
  padding: 60px 20px;
  background: var(--dark-bg-1);
  color: #f0f0f0;
}

.page-index__main-title {
  font-size: 42px;
  font-weight: bold;
  color: #FFD700;
  text-align: center;
  margin-bottom: 20px;
}

.page-index__intro-description {
  font-size: 18px;
  color: #cccccc;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.page-index__intro-content p {
  font-size: 17px;
  line-height: 1.8;
  text-align: justify;
  max-width: 900px;
  margin-bottom: 15px;
  color: #e0e0e0;
}

.page-index__intro-content p a {
  color: #FFD700;
  text-decoration: none;
}

.page-index__intro-content p a:hover {
  text-decoration: underline;
}

.page-index__intro-list {
  list-style: disc inside;
  font-size: 17px;
  color: #e0e0e0;
  max-width: 900px;
  margin-left: 20px;
}

.page-index__intro-list li {
  margin-bottom: 10px;
}

.page-index__intro-list li strong {
  color: #FFD700;
}

.page-index__intro-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Quick Access Section */
.page-index__quick-access-section {
  padding: 60px 20px;
  background: #003366;
  color: #f0f0f0;
}

.page-index__button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  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;
}

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

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

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

.page-index__btn-secondary:hover {
  background-color: #FFD700;
  color: #003366;
}

/* Games Section */
.page-index__games-section {
  padding: 60px 20px;
  background: var(--dark-bg-1);
  color: #f0f0f0;
}

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

.page-index__game-card {
  background: #003366;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__game-card h3 {
  font-size: 24px;
  color: #FFD700;
  margin-bottom: 15px;
}

.page-index__game-card h3 a {
  color: #FFD700;
  text-decoration: none;
}

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

.page-index__game-card p {
  font-size: 16px;
  color: #cccccc;
  line-height: 1.7;
}

.page-index__game-card p a {
  color: #FFD700;
  text-decoration: none;
}

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

/* Promotions Section */
.page-index__promotions-section {
  padding: 60px 20px;
  background: #003366;
  color: #f0f0f0;
}

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

.page-index__promotion-card {
  background: var(--dark-bg-1);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__promotion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-index__promotion-card img {
  width: 100%;
  height: 250px; /* Fixed height for promo images */
  object-fit: cover;
  display: block;
}

.page-index__promotion-card h3 {
  font-size: 22px;
  color: #FFD700;
  margin: 20px 15px 10px;
}

.page-index__promotion-card p {
  font-size: 16px;
  color: #cccccc;
  padding: 0 15px 20px;
  line-height: 1.7;
}

.page-index__promotion-card .page-index__btn-primary {
  margin-bottom: 20px;
}

/* Security & Support Section */
.page-index__security-support-section {
  padding: 60px 20px;
  background: var(--dark-bg-1);
  color: #f0f0f0;
}

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

.page-index__feature-item {
  background: #003366;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__feature-item img {
  max-width: 100%;
  height: 200px; /* Fixed height for feature images */
  object-fit: contain;
  margin-bottom: 20px;
}

.page-index__feature-item h3 {
  font-size: 22px;
  color: #FFD700;
  margin-bottom: 15px;
}

.page-index__feature-item p {
  font-size: 16px;
  color: #cccccc;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* FAQ Section */
.page-index__faq-section {
  padding: 60px 20px;
  background: #003366;
  color: #f0f0f0;
}

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

.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--dark-bg-1);
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #003366;
  border: 1px solid #0a4781;
  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: #0a4781;
  border-color: #12579b;
}

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

.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: #f0f0f0;
}

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700;
  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 20px;
  opacity: 0;
  color: #cccccc;
}

.page-index__faq-item.active .page-index__faq-question {
  border-radius: 5px 5px 0 0;
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important;
  padding: 20px !important;
  opacity: 1;
  background: #0a4781;
  border-radius: 0 0 5px 5px;
  border: 1px solid #0a4781;
  border-top: none;
}

.page-index__faq-item.active .page-index__faq-toggle {
  color: #FFD700;
  transform: rotate(45deg); /* Change to minus sign visually */
}

.page-index__faq-answer p a {
  color: #FFD700;
  text-decoration: none;
}

.page-index__faq-answer p a:hover {
  text-decoration: underline;
}

/* Blog Section */
.page-index__blog-section {
  padding: 60px 20px;
  background: var(--dark-bg-1);
  color: #f0f0f0;
}

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

.page-index__blog-card {
  background: #003366;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-index__blog-card h3 {
  font-size: 22px;
  color: #FFD700;
  margin: 20px 15px 10px;
}

.page-index__blog-card h3 a {
  color: #FFD700;
  text-decoration: none;
}

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

.page-index__blog-card p {
  font-size: 16px;
  color: #cccccc;
  padding: 0 15px;
  line-height: 1.7;
}

.page-index__blog-date {
  display: block;
  font-size: 14px;
  color: #999999;
  padding: 10px 15px 20px;
}

/* Global image and container styles for responsive */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-index__section,
.page-index__card,
.page-index__container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-index__dark-section {
  background: var(--dark-bg-1);
  color: #ffffff;
}

/* --- Responsive Styles --- */
/* Tablet */
@media (max-width: 1024px) {
  .page-index__container {
    padding: 30px 15px;
  }

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

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

  .page-index__products-container {
    grid-template-columns: 1fr; /* Products section stacks vertically */
  }

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

  .page-index__products-grid--large {
    grid-template-columns: repeat(2, 1fr); /* 2 large products side-by-side */
  }

  .page-index__game-categories,
  .page-index__promotions-grid,
  .page-index__features-grid,
  .page-index__blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

  .page-index__promotion-card img,
  .page-index__feature-item img {
    height: 200px;
  }
}

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

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

  /* 产品展示图区域 */
  .page-index__products-section {
    padding: 40px 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .page-index__products-container {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-index__products-grid--small .page-index__product-card,
  .page-index__products-grid--small .page-index__product-card-image {
    max-width: 100% !important; /* Ensure cards fill available space in 2-col layout */
    width: 100% !important;
  }

  .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 !important;
    gap: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-index__products-grid--large .page-index__product-card,
  .page-index__products-grid--large .page-index__product-card-image {
    max-width: 100% !important;
    width: 100% !important;
  }

  .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__container,
  .page-index__intro-section,
  .page-index__quick-access-section,
  .page-index__games-section,
  .page-index__promotions-section,
  .page-index__security-support-section,
  .page-index__faq-section,
  .page-index__blog-section {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .page-index__main-title {
    font-size: 28px !important;
    line-height: 1.3 !important;
  }

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

  .page-index__section-description,
  .page-index__intro-description,
  .page-index p,
  .page-index li {
    font-size: 15px !important;
    line-height: 1.7 !important;
  }

  /* 按钮与按钮容器 */
  .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: 12px 15px !important; /* Adjust padding for smaller screens */
    font-size: 16px !important;
  }

  .page-index__button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
    overflow: hidden !important;
  }

  /* 其他内容模块 */
  .page-index__intro-content {
    gap: 20px !important;
  }
  
  .page-index__game-categories,
  .page-index__promotions-grid,
  .page-index__features-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .page-index__promotion-card img,
  .page-index__feature-item img,
  .page-index__blog-card img {
    
  }

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