.page-index {
  color: #ffffff; /* Body background is dark (#1a1a1a), so text should be light */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

/* HERO主图区域样式 */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: var(--header-offset, 120px); /* Assuming shared.css does NOT set padding-top on body, so this section handles it */
  margin-top: 0;
  background: #0A2239; /* Fallback background for hero section */
}

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

/* LOGO轮播区域样式 */
.page-index__logo-carousel-section {
  width: 100%;
  padding: 30px 20px;
  background: #0A2239; /* Consistent dark background */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-index__logo-carousel-container {
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.page-index__logo-carousel {
  display: flex;
  gap: 20px;
  overflow: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  padding: 8px 0;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none; /* 禁止用户交互 */
}

.page-index__logo-carousel::-webkit-scrollbar {
  display: none;
}

.page-index__logo-item {
  flex-shrink: 0;
  width: 80px; /* 固定尺寸 */
  height: 80px; /* 固定尺寸 */
  border-radius: 8px;
  overflow: hidden;
  background: #1e1e1e; /* Slightly lighter than body background for contrast */
  border: 1px solid #333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  pointer-events: auto; /* 允许logo-item本身可以点击 */
}

.page-index__logo-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-index__logo-item a {
  display: block;
  width: 100%;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  pointer-events: auto; /* 允许链接可以点击 */
}

.page-index__logo-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: grayscale(80%); /* Make logos blend in more, but still visible */
  transition: filter 0.3s ease;
}

.page-index__logo-item:hover img {
  filter: grayscale(0%);
}

/* 游戏展示区域样式 */
.page-index__games-section {
  width: 100%;
  padding: 60px 20px;
  background: #1a1a1a; /* Match body background */
}

.page-index__games-container {
  max-width: 1400px;
  margin: 0 auto;
}

.page-index__games-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 30px;
  align-items: start;
}

.page-index__featured-game-area {
  width: 100%;
}

.page-index__featured-game-title {
  font-size: 28px;
  font-weight: bold;
  margin: 0 0 25px 0;
  color: #FFD700; /* Yellow text */
  text-align: left;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.page-index__featured-game {
  width: 100%;
  border-radius: 15px;
  overflow: hidden;
  background: #1e1e1e;
  border: 1px solid #333;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__featured-game:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.page-index__featured-game-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__featured-game-image {
  width: 100%;
  height: 500px;
  overflow: hidden;
}

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

.page-index__games-grid-area {
  width: 100%;
}

.page-index__games-tabs {
  display: flex;
  gap: 25px;
  margin-bottom: 30px;
  align-items: center;
  border-bottom: 2px solid #333;
}

.page-index__games-tab {
  background: none;
  border: none;
  padding: 10px 0;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  color: #999999;
  transition: color 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
  position: relative;
  letter-spacing: 0.5px;
}

.page-index__games-tab:hover {
  color: #FFD700;
}

.page-index__games-tab.active {
  color: #FFD700; /* Active tab in gold */
  border-bottom: 3px solid #FFD700; /* Underline active tab */
  padding-bottom: 7px; /* Adjust padding due to border */
}

.page-index__games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  display: none; /* 默认隐藏 */
}

.page-index__games-grid.active {
  display: grid; /* 激活时显示 */
}

.page-index__game-card {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #1e1e1e; /* Darker card background */
  border: 1px solid #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding-bottom: 10px;
}

.page-index__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.page-index__game-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__game-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

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

.page-index__game-card-title {
  font-size: 15px;
  font-weight: 500;
  margin: 10px 0 0 0;
  padding: 0 8px;
  color: #ffffff; /* Light text on dark card */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  line-height: 1.4;
}

/* Common Section Styles */
.page-index__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-index__heading {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 25px;
  color: #FFD700; /* Gold for main headings */
  text-shadow: 0 3px 6px rgba(0,0,0,0.6);
}

.page-index__description {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #f0f0f0;
}

.page-index__paragraph {
  font-size: 16px;
  max-width: 900px;
  margin: 20px auto;
  color: #e0e0e0;
  text-align: justify;
}

.page-index__image-wrapper {
  margin: 40px auto;
  max-width: 1000px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.page-index__image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Intro Section */
.page-index__intro-section {
  padding: 80px 0;
  background: #0A2239;
}

/* Quick Access Section */
.page-index__quick-access-section {
  padding: 80px 0;
  background: #1a1a1a;
}

.page-index__link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.page-index__quick-link {
  display: block;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.page-index__quick-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Core Games Section */
.page-index__core-games-section {
  padding: 80px 0;
  background: #0A2239;
}

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

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

.page-index__game-category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.page-index__category-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.page-index__category-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #FFD700;
}

.page-index__category-text {
  font-size: 16px;
  color: #e0e0e0;
  margin-bottom: 25px;
  text-align: justify;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 80px 0;
  background: #1a1a1a;
}

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

.page-index__promo-card {
  background: #1e1e1e;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #333;
  display: flex;
  flex-direction: column;
}

.page-index__promo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.page-index__promo-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-index__promo-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-index__promo-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #FFD700;
}

.page-index__promo-text {
  font-size: 15px;
  color: #e0e0e0;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Security & CS Section */
.page-index__security-cs-section {
  padding: 80px 0;
  background: #0A2239;
}

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

.page-index__feature-card {
  background: #1e1e1e;
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #333;
}

.page-index__feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.page-index__feature-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

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

.page-index__feature-text {
  font-size: 15px;
  color: #e0e0e0;
}

/* FAQ Section */
.page-index__faq-section {
  padding: 80px 0;
  background: #1a1a1a;
}

.page-index__faq-list {
  margin-top: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: #0A2239;
  border: 1px solid #333;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-index__faq-question:hover {
  background: #1e3a5f;
  border-color: #555;
}

.page-index__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #ffffff;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
}

.page-index__faq-toggle {
  font-size: 30px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 20px;
  pointer-events: none; /* 防止图标阻止点击事件 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

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

.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 25px;
  opacity: 0;
  background: #1e1e1e; /* Darker background for answer */
  color: #e0e0e0;
  border-radius: 0 0 10px 10px;
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important; /* 确保能展开 */
  padding: 20px 25px !important;
  opacity: 1;
  border-top: 1px solid #333;
}

/* Blog Section */
.page-index__blog-section {
  padding: 80px 0;
  background: #0A2239;
}

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

.page-index__blog-card {
  background: #1e1e1e;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #333;
  display: flex;
  flex-direction: column;
}

.page-index__blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

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

.page-index__blog-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-index__blog-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-index__blog-title a {
  color: #FFD700;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-index__blog-excerpt {
  font-size: 15px;
  color: #e0e0e0;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-index__blog-date {
  font-size: 14px;
  color: #999999;
  text-align: right;
  display: block;
}

/* CTA Buttons */
.page-index__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 50px;
}

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

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

.page-index__btn-primary:hover {
  background: #e6c200;
  border-color: #e6c200;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

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

.page-index__btn-secondary:hover {
  background: #FFD700;
  color: #0A2239;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

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

/* 移动端响应式设计 */
@media (max-width: 1024px) {
  .page-index__heading {
    font-size: 32px;
  }
  .page-index__description {
    font-size: 16px;
  }
  .page-index__hero-image {
    height: auto;
  }
  .page-index__games-layout {
    grid-template-columns: 1fr; /* Single column layout for games section */
  }
  .page-index__featured-game-image {
    height: 400px;
  }
  .page-index__games-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 columns for game grid */
  }
  .page-index__game-card-image {
    height: 160px;
  }
  .page-index__game-card-title {
    font-size: 14px;
  }
  .page-index__quick-link {
    font-size: 16px;
    padding: 15px 20px;
  }
  .page-index__game-categories,
  .page-index__promo-grid,
  .page-index__features-grid,
  .page-index__blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-index__category-title,
  .page-index__promo-title,
  .page-index__feature-title,
  .page-index__blog-title {
    font-size: 20px;
  }
  .page-index__category-text,
  .page-index__promo-text,
  .page-index__feature-text,
  .page-index__blog-excerpt {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-index__heading {
    font-size: 28px;
    margin-bottom: 20px;
  }
  .page-index__description {
    font-size: 15px;
    margin-bottom: 30px;
  }
  .page-index__paragraph {
    font-size: 15px;
  }
  .page-index__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure header offset for mobile if not set on body */
  }
  .page-index__hero-image img,
  .page-index__image-wrapper img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  /* 🚨 LOGO轮播项必须单独设置，保持固定尺寸 */
  .page-index__logo-item {
    width: 80px !important; /* 固定80px，禁止使用100% */
    height: 80px !important; /* 固定80px */
    max-width: 80px !important; /* 确保不被覆盖 */
    box-sizing: border-box;
  }
  .page-index__logo-carousel-section {
    padding: 20px 15px;
  }
  .page-index__logo-carousel {
    gap: 15px;
  }
  .page-index__games-section,
  .page-index__intro-section,
  .page-index__quick-access-section,
  .page-index__core-games-section,
  .page-index__promotions-section,
  .page-index__security-cs-section,
  .page-index__faq-section,
  .page-index__blog-section {
    padding: 50px 0;
  }
  .page-index__container {
    padding: 0 15px;
  }
  .page-index__featured-game-title {
    font-size: 24px;
    margin-bottom: 20px;
  }
  .page-index__featured-game-image {
    height: 280px;
  }
  .page-index__games-tabs {
    gap: 15px;
    margin-bottom: 25px;
  }
  .page-index__games-tab {
    font-size: 17px;
    padding: 8px 0;
  }
  .page-index__games-tab.active {
    padding-bottom: 5px; /* Adjust padding due to border */
  }
  .page-index__games-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for game grid */
    gap: 15px;
  }
  .page-index__game-card-image {
    height: 120px;
  }
  .page-index__game-card-title {
    font-size: 13px;
    margin-top: 8px;
    padding: 0 5px;
  }
  .page-index__link-grid {
    grid-template-columns: 1fr;
  }
  .page-index__quick-link {
    font-size: 17px;
    padding: 15px;
  }
  .page-index__game-categories,
  .page-index__promo-grid,
  .page-index__features-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-index__category-icon,
  .page-index__feature-icon {
    width: 70px;
    height: 70px;
  }
  .page-index__category-title,
  .page-index__promo-title,
  .page-index__feature-title,
  .page-index__blog-title {
    font-size: 19px;
  }
  .page-index__category-text,
  .page-index__promo-text,
  .page-index__feature-text,
  .page-index__blog-excerpt {
    font-size: 14px;
  }
  .page-index__faq-question {
    padding: 18px 20px;
  }
  .page-index__faq-question h3 {
    font-size: 16px;
  }
  .page-index__faq-toggle {
    font-size: 26px;
    width: 26px;
    height: 26px;
    margin-left: 15px;
  }
  .page-index__faq-item.active .page-index__faq-answer {
    padding: 15px 20px !important;
  }
  .page-index__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-index__btn-primary,
  .page-index__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
    font-size: 16px;
  }
  .page-index__cta-buttons {
    padding: 0 15px; /* Add padding to the button container */
  }
}

/* Ensure all content area images are at least 200px wide on desktop, unless explicitly fixed like logo-item */
.page-index__image-wrapper img,
.page-index__featured-game-image img,
.page-index__game-card-image img,
.page-index__category-icon,
.page-index__promo-image,
.page-index__feature-icon,
.page-index__blog-image {
  min-width: 200px;
  min-height: 200px;
}

/* Specific overrides for icons that might be smaller but are not content images */
.page-index__category-icon,
.page-index__feature-icon {
  min-width: 80px; /* Allow smaller for specific icons */
  min-height: 80px;
}

/* Ensure content area images maintain aspect ratio without explicit width/height in CSS if HTML attributes are present */
.page-index__image-wrapper img,
.page-index__featured-game-image img,
.page-index__game-card-image img,
.page-index__promo-image,
.page-index__blog-image {
  width: 100%; /* Fill container */
  height: auto; /* Maintain aspect ratio */
  object-fit: cover;
}

/* Dark background section for contrast */
.page-index__dark-section {
  background-color: #0A2239;
  color: #ffffff;
}

.page-index__dark-section .page-index__heading {
  color: #FFD700;
}

.page-index__dark-section .page-index__description,
.page-index__dark-section .page-index__paragraph {
  color: #e0e0e0;
}

.page-index__dark-section .page-index__game-category-card,
.page-index__dark-section .page-index__feature-card,
.page-index__dark-section .page-index__blog-card {
  background: #1e1e1e;
  border: 1px solid #333;
}

.page-index__dark-section .page-index__category-title,
.page-index__dark-section .page-index__feature-title,
.page-index__dark-section .page-index__blog-title a {
  color: #FFD700;
}

.page-index__dark-section .page-index__category-text,
.page-index__dark-section .page-index__feature-text,
.page-index__dark-section .page-index__blog-excerpt {
  color: #e0e0e0;
}

.page-index__dark-section .page-index__blog-date {
  color: #999999;
}