/* style/index.css */

/* Base styles for page-index */
.page-index {
  color: #ffffff; /* Default light text for dark body background */
  background-color: #1a1a1a; /* Assuming body background is #1a1a1a from shared.css */
}

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

.page-index__section-title {
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #FFC107; /* Auxiliary color for titles */
}

.page-index__card {
  background: rgba(255, 255, 255, 0.08); /* Slightly transparent white for dark background */
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: #ffffff;
}

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

.page-index__card-title {
  font-size: 20px;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 15px;
  color: #FFC107; /* Auxiliary color for card titles */
}

.page-index__card p {
  font-size: 15px;
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 15px;
}

.page-index__btn-link {
  display: inline-block;
  background: #007BFF;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-top: auto;
  text-align: center;
}

.page-index__btn-link:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

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

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

.page-index__dark-section {
  background-color: #007BFF; /* Main brand color for dark sections */
  color: #ffffff;
}

.page-index__dark-section .page-index__section-title {
  color: #FFC107;
}

.page-index__dark-section .page-index__card {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.page-index__dark-section .page-index__card-title {
  color: #FFC107;
}

.page-index__dark-section .page-index__btn-link {
  background: #FFC107;
  color: #1a1a1a;
}

.page-index__dark-section .page-index__btn-link:hover {
  background-color: #e6b000;
}

/* HERO主图区域 */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0; /* Assuming shared.css 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;
}

/* LOGO轮播区域 */
.page-index__logo-carousel-section {
  width: 100%;
  padding: 30px 20px;
  background: #2a2a2a; /* Slightly lighter dark background */
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.3);
}

.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; /* Fixed size */
  height: 80px; /* Fixed size */
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

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

.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: #FFC107; /* Yellow text */
  text-align: left;
}

.page-index__featured-game {
  width: 100%;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  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.35);
}

.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;
  justify-content: flex-start;
}

.page-index__games-tab {
  background: none;
  border: none;
  padding: 0;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s ease;
  text-decoration: none;
  position: relative;
  text-transform: uppercase;
}

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

.page-index__games-tab.active {
  color: #FFC107; /* Active tab color */
  text-decoration: none;
}

.page-index__games-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 3px;
  background-color: #FFC107;
  border-radius: 2px;
}

.page-index__games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  display: none;
}

.page-index__games-grid.active {
  display: grid;
}

.page-index__game-card {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

.page-index__game-card-image {
  width: 100%;
  height: 200px;
  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: 12px 0 10px 0;
  padding: 0 8px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  line-height: 1.4;
}

/* 首页介绍 */
.page-index__intro-section {
  padding: 80px 20px;
  text-align: center;
}

.page-index__intro-text {
  font-size: 17px;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: rgba(255, 255, 255, 0.9);
}

.page-index__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary {
  background: #FFC107;
  color: #1a1a1a;
  border: 2px solid #FFC107;
}

.page-index__btn-primary:hover {
  background: #e6b000;
  border-color: #e6b000;
  transform: translateY(-3px);
}

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

.page-index__btn-secondary:hover {
  background: #FFC107;
  color: #1a1a1a;
  transform: translateY(-3px);
}

/* 核心游戏/服务介绍 */
.page-index__core-games-section {
  padding: 80px 20px;
}

.page-index__game-type-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-index__game-type-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  display: block;
}

.page-index__game-type-title {
  font-size: 22px;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 10px;
  color: #FFC107;
}

.page-index__game-type-card p {
  font-size: 15px;
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.9);
}

/* 优惠活动 */
.page-index__promotions-section {
  padding: 80px 20px;
  background-color: #1a1a1a;
}

.page-index__promo-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-index__promo-card .page-index__card-title {
  margin: 20px 20px 10px 20px;
  color: #FFC107;
}

.page-index__promo-card p {
  padding: 0 20px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.9);
}

.page-index__promo-card .page-index__btn-link {
  margin: 0 20px 20px 20px;
  background: #007BFF;
  color: #ffffff;
}

.page-index__promo-card .page-index__btn-link:hover {
  background-color: #0056b3;
}

/* 安全与客服 */
.page-index__security-support-section {
  padding: 80px 20px;
}

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

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

.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
  position: relative;
}

.page-index__faq-question:hover {
  background: rgba(255, 255, 255, 0.25);
}

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

.page-index__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FFC107;
  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: 32px;
  height: 32px;
}

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

.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;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.05);
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important;
  padding: 20px 25px !important;
  opacity: 1;
  border-radius: 0 0 10px 10px;
}

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

/* 最新博客内容 */
.page-index__blog-section {
  padding: 80px 20px;
}

.page-index__blog-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-index__blog-card .page-index__blog-card-title {
  font-size: 20px;
  font-weight: 600;
  margin: 20px 20px 10px 20px;
  color: #FFC107;
}

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

.page-index__blog-card .page-index__blog-card-title a:hover {
  color: #007BFF;
}

.page-index__blog-excerpt {
  padding: 0 20px;
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.6;
  flex-grow: 1;
  color: rgba(255, 255, 255, 0.85);
}

.page-index__blog-card .page-index__btn-link {
  margin: 0 20px 20px 20px;
  background: #007BFF;
  color: #ffffff;
}

.page-index__blog-card .page-index__btn-link:hover {
  background-color: #0056b3;
}

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

/* Buttons responsiveness */
.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;
}

.page-index__cta-buttons,
.page-index__button-group,
.page-index__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* 媒体查询 for 1024px */
@media (max-width: 1024px) {
  .page-index__games-layout {
    grid-template-columns: 1fr;
  }
  
  .page-index__games-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .page-index__featured-game-image {
    height: 400px;
  }

  .page-index__games-tabs {
    justify-content: center;
  }

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

  .page-index__grid-2-col {
    grid-template-columns: repeat(1, 1fr);
  }

  .page-index__game-type-card img,
  .page-index__promo-card img,
  .page-index__blog-card img {
    
  }
}

/* 媒体查询 for 768px */
@media (max-width: 768px) {
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-index__container {
    padding: 30px 15px;
  }

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

  /* HERO 主图区域 */
  .page-index__hero-section {
    padding-top: 0 !important; /* Ensure no double padding if shared handles body */
  }
  
  .page-index__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* LOGO 轮播区域 */
  .page-index__logo-carousel-section {
    padding: 20px 15px;
  }
  
  .page-index__logo-carousel {
    gap: 15px;
  }
  
  .page-index__logo-item {
    width: 80px !important; /* Fixed 80px, not 100% */
    height: 80px !important; /* Fixed 80px */
    max-width: 80px !important; /* Ensure fixed size */
    box-sizing: border-box;
  }
  
  .page-index__logo-item a {
    padding: 8px;
  }

  /* 游戏展示区域 */
  .page-index__games-section {
    padding: 40px 15px;
  }
  
  .page-index__games-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .page-index__featured-game-title {
    font-size: 22px;
    margin-bottom: 20px;
  }
  
  .page-index__featured-game-image {
    height: 280px;
  }
  
  .page-index__games-tabs {
    gap: 15px;
    margin-bottom: 20px;
  }
  
  .page-index__games-tab {
    font-size: 17px;
  }
  
  .page-index__games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .page-index__game-card-image {
    height: 140px;
  }
  
  .page-index__game-card-title {
    font-size: 13px;
    margin: 10px 0 8px 0;
    padding: 0 5px;
  }

  /* 通用图片与容器 */
  .page-index img:not(.page-index__logo-item img) {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__intro-section, 
  .page-index__quick-access-section, 
  .page-index__core-games-section, 
  .page-index__promotions-section, 
  .page-index__security-support-section, 
  .page-index__faq-section, 
  .page-index__blog-section {
    padding: 40px 15px;
  }

  .page-index__intro-text {
    font-size: 15px;
    margin-bottom: 30px;
  }

  /* 按钮与按钮容器 */
  .page-index__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .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 20px;
    font-size: 16px;
  }

  .page-index__cta-buttons,
  .page-index__button-group,
  .page-index__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow-x: hidden;
  }

  .page-index__grid-3-col, .page-index__grid-2-col {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__card-title, .page-index__game-type-title, .page-index__promo-card .page-index__card-title, .page-index__blog-card .page-index__blog-card-title {
    font-size: 18px;
  }

  .page-index__card p, .page-index__game-type-card p, .page-index__promo-card p, .page-index__blog-excerpt {
    font-size: 14px;
  }

  .page-index__game-type-card img,
  .page-index__promo-card img,
  .page-index__blog-card img {
    
  }

  /* FAQ */
  .page-index__faq-question {
    padding: 15px 20px;
  }
  
  .page-index__faq-question h3 {
    font-size: 16px;
  }
  
  .page-index__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
    margin-left: 15px;
  }
  
  .page-index__faq-answer {
    padding: 0 20px;
  }
  
  .page-index__faq-item.active .page-index__faq-answer {
    padding: 15px 20px !important;
  }
  
  .page-index__faq-answer p {
    font-size: 15px;
  }
}