.page-index {
  font-family: 'Arial', sans-serif;
  color: #FFF1E8; /* Text Main */
  background-color: #140C0C; /* Background */
  line-height: 1.6;
}

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

.page-index__section-title {
  font-size: 32px;
  font-weight: 700;
  color: #F3C54D; /* Gold */
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-index__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #C61F1F; /* Primary */
  border-radius: 2px;
}

/* HERO 主图区域样式 */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* Small top margin, as body padding-top is handled by shared.css */
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.page-index__hero-container {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-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;
}

/* 产品展示图区域样式 */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: #140C0C; /* Background */
  box-sizing: border-box;
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* 前4个占4列，后2个占2列 */
  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; /* 最宽不超过300px */
  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; /* 最宽不超过300px */
  overflow: hidden;
}

.page-index__product-card-image img {
  max-width: 100%;
  width: 100%;
  height: auto; /* 保持图片原始宽高比 */
  display: block;
}

/* Module 1: 首页介绍 */
.page-index__intro-section {
  padding: 60px 20px;
  background-color: #140C0C; /* Background */
}

.page-index__main-title {
  font-size: 40px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #FFF1E8; /* Text Main */
  line-height: 1.2;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__description {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
  color: #FFF1E8; /* Text Main */
}

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

.page-index__intro-item {
  background-color: #2A1212; /* Card BG */
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.page-index__intro-heading {
  font-size: 24px;
  color: #F3C54D; /* Gold */
  margin-bottom: 15px;
}

.page-index__intro-item p {
  font-size: 16px;
  color: #FFF1E8; /* Text Main */
  line-height: 1.7;
}

/* Module 2: 快速访问链接入口 */
.page-index__quick-access-section {
  padding: 50px 20px;
  background: linear-gradient(90deg, #C61F1F 0%, #E53030 100%); /* Primary / Secondary */
  text-align: center;
}

.page-index__quick-access-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary {
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button */
  color: #ffffff; /* White text for contrast */
  border: none;
}

.page-index__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.page-index__btn-secondary {
  background: #2A1212; /* Card BG */
  color: #FFF1E8; /* Text Main */
  border: 2px solid #F3C54D; /* Gold border */
}

.page-index__btn-secondary:hover {
  background: #140C0C; /* Background */
  border-color: #FFB04A;
  color: #F3C54D;
}

/* Module 3: 核心游戏/服务介绍 */
.page-index__games-overview-section {
  padding: 60px 20px;
  background-color: #140C0C; /* Background */
}

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

.page-index__game-item {
  background-color: #2A1212; /* Card BG */
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-index__game-title {
  font-size: 22px;
  color: #F3C54D; /* Gold */
  margin-bottom: 15px;
}

.page-index__game-item p {
  font-size: 16px;
  color: #FFF1E8; /* Text Main */
  line-height: 1.7;
  margin-bottom: 20px;
}

.page-index__read-more-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #7E0D0D; /* Deep Red */
  color: #FFF1E8; /* Text Main */
  border-radius: 20px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-index__read-more-btn:hover {
  background-color: #C61F1F; /* Primary */
}

/* Module 4: 优惠活动 */
.page-index__promotions-section {
  padding: 60px 20px;
  background: linear-gradient(90deg, #E53030 0%, #C61F1F 100%); /* Secondary / Primary */
}

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

.page-index__promo-card {
  background-color: #2A1212; /* Card BG */
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-index__promo-title {
  font-size: 22px;
  color: #F3C54D; /* Gold */
  margin-bottom: 15px;
}

.page-index__promo-card p {
  font-size: 16px;
  color: #FFF1E8; /* Text Main */
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Module 5: 安全与客服 */
.page-index__security-cs-section {
  padding: 60px 20px;
  background-color: #140C0C; /* Background */
}

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

.page-index__cs-item {
  background-color: #2A1212; /* Card BG */
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-index__cs-title {
  font-size: 22px;
  color: #F3C54D; /* Gold */
  margin-bottom: 15px;
}

.page-index__cs-item p {
  font-size: 16px;
  color: #FFF1E8; /* Text Main */
  line-height: 1.7;
}

/* Module 6: FAQ常见问题区域 */
.page-index__faq-section {
  padding: 60px 20px;
  background-color: #140C0C; /* Background */
}

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

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #6A1E1E; /* Border */
  overflow: hidden;
  background: #2A1212; /* Card BG */
}

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: #3a1a1a;
}

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

.page-index__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #F3C54D; /* Gold */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-index__faq-item .page-index__faq-answer {
  padding: 0 20px 20px;
  background: #1f0f0f;
  border-radius: 0 0 8px 8px;
  color: #FFF1E8; /* Text Main */
}

.page-index__faq-answer p {
  font-size: 16px;
  line-height: 1.7;
}

/* Module 7: 最新博客内容 */
.page-index__blog-section {
  padding: 60px 20px;
  background-color: #140C0C; /* Background */
}

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

.page-index__blog-card {
  background-color: #2A1212; /* Card BG */
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

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

.page-index__blog-title a {
  color: #F3C54D; /* Gold */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__blog-title a:hover {
  color: #FFB04A;
}

.page-index__blog-excerpt {
  font-size: 15px;
  color: #FFF1E8; /* Text Main */
  line-height: 1.6;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-index__blog-date {
  font-size: 14px;
  color: #6A1E1E; /* Border */
  margin-bottom: 15px;
  display: block;
}

.page-index__view-all-posts {
  text-align: center;
  margin-top: 50px;
}

/* Common image styles */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------------------------------- */
/* @media (max-width: 1024px) styles */
/* ---------------------------------- */
@media (max-width: 1024px) {
  .page-index__products-container {
    grid-template-columns: 1fr; /* Two grids stack vertically */
  }

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

  .page-index__intro-content {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .page-index__games-list {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .page-index__promotions-grid,
  .page-index__security-cs-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

/* ---------------------------------- */
/* @media (max-width: 768px) styles  */
/* ---------------------------------- */
@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-index__hero-section {
    padding-top: 10px !important; /* Small top margin, as body padding-top is handled by shared.css */
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !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; /* 4宫格布局 (2x2) */
    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; /* Adapt to 2-column 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; /* Each large card takes full width */
    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;
    height: auto !important;
    width: 100% !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;
    text-align: center;
  }

  .page-index__quick-access-links {
    flex-direction: column !important; /* 移动端按钮垂直排列 */
    gap: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 其他内容模块 */
  .page-index__section-title {
    font-size: 26px;
    margin-bottom: 30px;
  }

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

  .page-index__description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-index__intro-content,
  .page-index__games-list,
  .page-index__promotions-grid,
  .page-index__security-cs-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .page-index__intro-item,
  .page-index__game-item,
  .page-index__promo-card,
  .page-index__cs-item,
  .page-index__blog-card {
    padding: 20px !important;
  }

  .page-index__intro-heading,
  .page-index__game-title,
  .page-index__promo-title,
  .page-index__cs-title {
    font-size: 20px;
  }

  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;
    height: 24px !important;
  }
  details.page-index__faq-item .page-index__faq-answer {
    padding: 0 15px 15px !important;
  }
  .page-index__faq-answer p {
    font-size: 15px;
  }

  .page-index__blog-title {
    font-size: 18px;
  }
  .page-index__blog-excerpt {
    font-size: 14px;
  }
  .page-index__blog-date {
    font-size: 13px;
  }
}