/* style/index.css */

.page-index {
  font-family: 'Arial', sans-serif;
  color: #1F2D3D; /* Text Main */
  background-color: #F4F7FB; /* Background */
}

.page-index__section-padding {
  padding: 80px 20px;
}

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

.page-index__main-title,
.page-index__section-title {
  font-size: 36px;
  font-weight: 700;
  color: #1F2D3D; /* Text Main */
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.3;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__description,
.page-index__section-description {
  font-size: 18px;
  color: #1F2D3D; /* Text Main */
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.6;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__light-bg {
  background-color: #F4F7FB; /* Background */
  color: #1F2D3D;
}

.page-index__dark-bg {
  background-color: #2F6BFF; /* Primary */
  color: #ffffff;
}

.page-index__dark-bg .page-index__main-title,
.page-index__dark-bg .page-index__section-title,
.page-index__dark-bg .page-index__description,
.page-index__dark-bg .page-index__section-description {
  color: #ffffff;
}

/* Common Card Styles */
.page-index__card {
  background: #FFFFFF; /* Card BG */
  color: #1F2D3D; /* Text Main */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  border: 1px solid #D6E2FF; /* Border */
}

.page-index__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Common Button Styles */
.page-index__cta-button,
.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  border: none;
}

.page-index__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-index__btn-secondary {
  background: #ffffff;
  color: #2F6BFF; /* Primary */
  border: 2px solid #2F6BFF; /* Primary */
}

.page-index__btn-secondary:hover {
  background: #2F6BFF;
  color: #ffffff;
  transform: translateY(-2px);
}

.page-index__cta-center {
  text-align: center;
  margin-top: 50px;
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* shared already handles body padding-top */
  margin-top: 0;
  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: #F4F7FB; /* Background */
  box-sizing: border-box;
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr;
  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 per 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__intro-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-index__feature-item {
  text-align: center;
  padding: 25px;
  border-radius: 10px;
  background: #FFFFFF; /* Card BG */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  border: 1px solid #D6E2FF; /* Border */
}

.page-index__feature-title {
  font-size: 22px;
  font-weight: 700;
  color: #2F6BFF; /* Primary */
  margin-bottom: 10px;
}

.page-index__feature-text {
  font-size: 16px;
  color: #1F2D3D; /* Text Main */
  line-height: 1.6;
}

/* Quick Access Section */
.page-index__button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.page-index__backup-link-text {
  text-align: center;
  margin-top: 30px;
  font-size: 16px;
  color: #ffffff;
  opacity: 0.8;
}

/* Games Section */
.page-index__game-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-index__game-card {
  background: #FFFFFF; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #D6E2FF; /* Border */
  text-align: center;
  padding-bottom: 25px;
}

.page-index__game-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 20px;
}

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

.page-index__game-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-index__game-title a {
  color: #2F6BFF; /* Primary */
  text-decoration: none;
}

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

.page-index__game-description {
  font-size: 15px;
  color: #1F2D3D; /* Text Main */
  line-height: 1.6;
  padding: 0 15px;
  margin-bottom: 20px;
}

.page-index__game-button {
  margin-top: 15px;
}

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

.page-index__promotion-card {
  padding: 30px;
  text-align: center;
}

.page-index__promotion-title {
  font-size: 22px;
  font-weight: 700;
  color: #2F6BFF; /* Primary */
  margin-bottom: 15px;
}

.page-index__promotion-text {
  font-size: 16px;
  color: #1F2D3D; /* Text Main */
  line-height: 1.6;
  margin-bottom: 25px;
}

.page-index__dark-bg .page-index__promotion-card {
  background: rgba(255, 255, 255, 0.95); /* Slightly transparent white */
  color: #1F2D3D;
}

/* Security & Support Section */
.page-index__security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-index__security-item {
  padding: 30px;
  text-align: center;
}

.page-index__security-title {
  font-size: 22px;
  font-weight: 700;
  color: #2F6BFF; /* Primary */
  margin-bottom: 15px;
}

.page-index__security-text {
  font-size: 16px;
  color: #1F2D3D; /* Text Main */
  line-height: 1.6;
}

/* FAQ Section */
.page-index__faq-list {
  margin-top: 50px;
}

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #D6E2FF; /* Border */
  overflow: hidden;
  background: #FFFFFF; /* Card BG */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

details.page-index__faq-item summary.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

details.page-index__faq-item summary.page-index__faq-question::-webkit-details-marker {
  display: none;
}

details.page-index__faq-item summary.page-index__faq-question:hover {
  background: #f5f5f5;
}

.page-index__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #1F2D3D; /* Text Main */
}

.page-index__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #2F6BFF; /* Primary */
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
  line-height: 1;
}

details.page-index__faq-item .page-index__faq-answer {
  padding: 0 20px 20px;
  background: #F4F7FB; /* Background */
  border-radius: 0 0 8px 8px;
  font-size: 16px;
  line-height: 1.6;
  color: #1F2D3D; /* Text Main */
}

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

.page-index__blog-card {
  padding-bottom: 25px;
  text-align: left;
}

.page-index__blog-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  margin-bottom: 20px;
}

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

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

.page-index__blog-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-index__blog-title a {
  color: #2F6BFF; /* Primary */
  text-decoration: none;
}

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

.page-index__blog-meta {
  font-size: 14px;
  color: #666666;
  margin-bottom: 15px;
}

.page-index__blog-excerpt {
  font-size: 16px;
  color: #1F2D3D; /* Text Main */
  line-height: 1.6;
  margin-bottom: 20px;
}

.page-index__blog-button {
  margin-top: 15px;
}

.page-index__dark-bg .page-index__blog-card {
  background: rgba(255, 255, 255, 0.95);
  color: #1F2D3D;
}

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

/* Media Queries */
@media (max-width: 1024px) {
  .page-index__main-title,
  .page-index__section-title {
    font-size: 32px;
  }
  .page-index__description,
  .page-index__section-description {
    font-size: 17px;
  }
  .page-index__section-padding {
    padding: 60px 15px;
  }
  .page-index__products-container {
    grid-template-columns: 1fr; /* Stack products grid vertically */
  }
  .page-index__products-grid--small {
    grid-template-columns: repeat(3, 1fr);
  }
  .page-index__products-grid--large {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-index__intro-features,
  .page-index__game-categories,
  .page-index__promotion-grid,
  .page-index__security-grid,
  .page-index__blog-grid {
    gap: 25px;
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-index__hero-section {
    padding-top: 10px !important; /* shared already handles body padding-top */
    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;
    max-width: 100% !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; /* Stack grids vertically */
    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; /* 2x2 grid */
    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;
  }
  .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; /* Each card on its own row */
    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;
  }
  .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 !important;
    padding-right: 15px !important;
  }

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

  /* 其他内容模块 */
  .page-index__section-padding {
    padding: 40px 15px !important;
  }
  .page-index__main-title,
  .page-index__section-title {
    font-size: 28px !important;
    margin-bottom: 15px !important;
  }
  .page-index__description,
  .page-index__section-description {
    font-size: 16px !important;
    margin-bottom: 30px !important;
  }
  .page-index__intro-features,
  .page-index__game-categories,
  .page-index__promotion-grid,
  .page-index__security-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    margin-top: 30px !important;
  }
  .page-index__feature-title,
  .page-index__game-title,
  .page-index__promotion-title,
  .page-index__security-title,
  .page-index__blog-title {
    font-size: 20px !important;
  }
  .page-index__feature-text,
  .page-index__game-description,
  .page-index__promotion-text,
  .page-index__security-text,
  .page-index__blog-excerpt {
    font-size: 15px !important;
  }
  details.page-index__faq-item summary.page-index__faq-question {
    padding: 15px !important;
  }
  .page-index__faq-qtext {
    font-size: 16px !important;
  }
  .page-index__faq-toggle {
    font-size: 24px !important;
    width: 24px !important;
    margin-left: 10px !important;
  }
  details.page-index__faq-item .page-index__faq-answer {
    padding: 0 15px 15px !important;
  }
  .page-index__blog-image {
    height: 180px !important;
  }
}