/* style/index.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --text-dark: #333333;
  --text-white: #ffffff;
  --bg-white: #ffffff;
  --bg-dark: #26A9E0;
  --border-light: #e0e0e0;
}

.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light background */
  background-color: var(--bg-white); /* Assuming shared.css sets body to white */
}

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

/* HERO 主图区域 */
.page-index__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color) 50%, #ffffff 100%); /* Adjusted gradient */
  color: var(--text-white);
}

.page-index__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-index__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-index__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: var(--text-white);
}

.page-index__hero-title {
  font-size: 3.2em;
  margin-bottom: 15px;
  line-height: 1.2;
  color: var(--text-white);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-index__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-white);
}

.page-index__hero-cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-index__btn-primary {
  background: var(--login-color); /* Use Login color for primary CTA */
  color: var(--text-white);
  border: 2px solid var(--login-color);
}

.page-index__btn-primary:hover {
  background: #E86A00; /* Slightly darker orange */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-index__btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-index__btn-secondary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* General Section Styles */
.page-index__section-title {
  font-size: 2.2em;
  color: var(--primary-color);
  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: var(--login-color);
  border-radius: 2px;
}

.page-index__section-title--white {
  color: var(--text-white);
}

.page-index__section-title--white::after {
  background: var(--secondary-color);
}

.page-index__text-block {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 30px auto;
  color: var(--text-dark);
}

.page-index__text-block--white {
  color: var(--text-white);
}

.page-index__light-bg {
  background-color: var(--bg-white);
  padding: 60px 0;
}

.page-index__dark-bg {
  background-color: var(--bg-dark);
  padding: 60px 0;
  color: var(--text-white);
}

/* 模块 1：首页介绍 */
.page-index__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index__feature-item {
  text-align: center;
  padding: 25px;
  border-radius: 10px;
  background: var(--secondary-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__feature-item img {
  width: 100%;
  max-width: 200px; /* Enforce min size */
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
}

.page-index__feature-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* 模块 2：快速访问链接入口 */
.page-index__quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index__quick-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.15);
  padding: 25px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-white);
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.page-index__quick-link-card img {
  width: 100%;
   /* Enforce min size */
  height: auto;
  margin-bottom: 15px;
  border-radius: 8px;
}

.page-index__quick-link-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  color: var(--text-white);
}

/* 模块 3：核心游戏/服务介绍 */
.page-index__game-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
  border-bottom: 2px solid rgba(var(--primary-color), 0.2);
}

.page-index__game-tab {
  padding: 15px 25px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  color: var(--text-dark);
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.page-index__game-tab:hover {
  color: var(--primary-color);
}

.page-index__game-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

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

.page-index__game-panel {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  animation: fadeIn 0.5s ease-out forwards;
}

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

.page-index__game-card {
  background: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  padding: 25px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-index__game-card img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-index__game-card-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-index__game-card p {
  font-size: 1em;
  color: var(--text-dark);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* 模块 4：优惠活动 */
.page-index__promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index__promo-card {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  padding: 25px;
  text-align: center;
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-index__promo-card img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-index__promo-card-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-index__promo-card p {
  font-size: 1em;
  color: var(--text-white);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* 模块 5：安全与客服 */
.page-index__security-support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index__security-support-item {
  text-align: center;
  padding: 25px;
  border-radius: 10px;
  background: var(--secondary-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__security-support-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-index__security-support-item img {
  width: 100%;
   /* Enforce min size */
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
}

.page-index__security-support-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* 模块 6：FAQ常见问题区域 */
.page-index__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: 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, 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: rgba(255, 255, 255, 0.1);
  border-radius: 0 0 5px 5px;
  color: var(--text-white);
}

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

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

.page-index__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--text-white);
}

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  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 {
  transform: rotate(45deg);
  color: var(--secondary-color);
}

/* 模块 7：最新博客内容 */
.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: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__blog-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
}

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

.page-index__blog-card-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.page-index__blog-card-title a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.page-index__blog-card-title a:hover {
  color: var(--login-color);
}

.page-index__blog-card-summary {
  font-size: 0.95em;
  color: #666;
  margin-bottom: 15px;
}

.page-index__blog-card-date {
  font-size: 0.85em;
  color: #999;
}

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

.page-index__button-group .page-index__btn-secondary {
  min-width: 180px;
}

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Global image and button responsiveness for mobile */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

.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%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-index__container,
.page-index__features-grid,
.page-index__quick-links-grid,
.page-index__game-panel,
.page-index__promo-grid,
.page-index__security-support-grid,
.page-index__blog-grid,
.page-index__hero-cta-buttons,
.page-index__button-group {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Mobile responsive design */
@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__hero-title {
    font-size: 2.2em;
  }

  .page-index__hero-description {
    font-size: 1em;
  }

  .page-index__cta-button {
    padding: 12px 30px;
    font-size: 1em;
  }

  .page-index__hero-cta-buttons,
  .page-index__button-group {
    flex-direction: column !important;
    gap: 10px !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-index__text-block {
    font-size: 1em;
  }

  /* Image resizing for mobile */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Container padding for mobile */
  .page-index__container,
  .page-index__features-grid,
  .page-index__quick-links-grid,
  .page-index__game-panel,
  .page-index__promo-grid,
  .page-index__security-support-grid,
  .page-index__blog-grid {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__game-tabs {
    flex-wrap: wrap;
  }

  .page-index__game-tab {
    width: 48%;
    margin-bottom: 10px;
    border-bottom: none;
    text-align: center;
  }

  .page-index__game-tab.active {
    border-bottom: 3px solid var(--primary-color);
  }

  /* FAQ mobile styles */
  .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;
  }

  .page-index__blog-card img {
    
  }

  .page-index__blog-card-title {
    font-size: 1.2em;
  }
}