/* style/index.css */

/* Base styles for page content */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #0a0a0a; /* Ensure consistency with body background */
  padding-top: 120px; /* Spacing for fixed header on desktop */
}

@media (max-width: 768px) {
  .page-index {
    padding-top: 100px; /* Spacing for fixed header on mobile */
  }
}

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

@media (max-width: 768px) {
  .page-index__container {
    padding: 0 15px;
  }
}

.page-index__heading {
  font-size: 36px;
  font-weight: bold;
  color: #FFD700;
  text-align: center;
  margin-bottom: 40px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .page-index__heading {
    font-size: 28px;
    margin-bottom: 30px;
  }
}

.page-index__text-block {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 25px;
  text-align: justify;
  color: #f0f0f0;
}

@media (max-width: 768px) {
  .page-index__text-block {
    font-size: 15px;
    margin-bottom: 20px;
  }
}

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.page-index__btn-primary {
  background: #FFD700;
  color: #1A1A1A;
}

.page-index__btn-primary:hover {
  background: #e0b800;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

.page-index__btn-secondary {
  background: #1A1A1A;
  color: #FFD700;
  border-color: #FFD700;
}

.page-index__btn-secondary:hover {
  background: #FFD700;
  color: #1A1A1A;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

@media (max-width: 768px) {
  .page-index__btn-primary,
  .page-index__btn-secondary {
    font-size: 16px;
    padding: 12px 25px;
  }
}

/* Section spacing */
.page-index__section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .page-index__section {
    padding: 50px 0;
  }
}

.page-index__dark-section {
  background-color: #1A1A1A;
  color: #ffffff;
}

.page-index__contrast-fix {
  color: #ffffff;
}

/* HERO主图区域样式 */
.page-index__hero-section {
  position: relative;
  width: 100%;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  margin-top: -120px; /* Counteract main padding-top */
}

@media (max-width: 768px) {
  .page-index__hero-section {
    margin-top: -100px; /* Counteract mobile main padding-top */
  }
}

.page-index__hero-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.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: 40px 0;
  background: #0d0d0d; /* Slightly lighter dark background */
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.3), inset 0 -5px 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: 30px;
  overflow: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  padding: 10px 0;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none; /* Disable user interaction for carousel container */
  white-space: nowrap; /* Prevent items from wrapping */
}

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

.page-index__logo-item {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  pointer-events: auto; /* Allow logo-item itself to be clickable */
}

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

.page-index__logo-item a {
  display: block;
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  pointer-events: auto; /* Allow link to be clickable */
}

.page-index__logo-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: grayscale(80%) brightness(120%);
  transition: filter 0.3s ease;
}

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

@media (max-width: 768px) {
  .page-index__logo-carousel-section {
    padding: 30px 0;
  }
  
  .page-index__logo-carousel {
    gap: 20px;
  }
  
  .page-index__logo-item {
    width: 150px;
    height: 150px;
  }
  
  .page-index__logo-item a {
    padding: 15px;
  }
}

/* 游戏展示区域样式 */
.page-index__games-section {
  width: 100%;
  padding: 60px 0;
  background: #0a0a0a;
}

.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 20px 0;
  color: #FFD700; /* Yellow text */
  text-align: left;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.page-index__featured-game {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__featured-game:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
}

.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: 25px;
  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: #999999;
  transition: color 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  position: relative;
  padding-bottom: 5px;
}

.page-index__games-tab:hover {
  color: #FFD700;
  transform: translateY(-2px);
}

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

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

.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: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(255, 215, 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: 600;
  margin: 10px 0 15px 0;
  padding: 0 8px;
  color: #ffffff; /* Light text for dark background */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .page-index__games-layout {
    grid-template-columns: 1fr;
  }
  
  .page-index__featured-game-image {
    height: 400px;
  }
  
  .page-index__games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .page-index__games-section {
    padding: 40px 0;
  }
  
  .page-index__games-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .page-index__featured-game-title {
    font-size: 24px;
    text-align: center;
  }
  
  .page-index__featured-game-image {
    height: 300px;
  }
  
  .page-index__games-tabs {
    gap: 15px;
    justify-content: center;
    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: 160px;
  }
  
  .page-index__game-card-title {
    font-size: 14px;
    margin: 8px 0 10px 0;
    padding: 0 5px;
  }
}

/* Module 2: Quick Access Links */
.page-index__quick-access-section {
  text-align: center;
  background-color: #0a0a0a;
}

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

.page-index__link-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__link-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.page-index__link-card-title {
  font-size: 22px;
  font-weight: bold;
  color: #FFD700;
  margin-bottom: 15px;
}

.page-index__link-card p {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 25px;
}

@media (max-width: 768px) {
  .page-index__links-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-index__link-card {
    padding: 25px;
  }
  .page-index__link-card-title {
    font-size: 20px;
  }
  .page-index__link-card p {
    font-size: 15px;
  }
}

/* Module 3: Core Games/Services Intro */
.page-index__games-intro-section {
  text-align: center;
}

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

.page-index__category-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-index__category-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.page-index__category-card img {
  width: 100%;
  max-width: 350px; /* Larger images */
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 25px;
  border: 2px solid rgba(255, 215, 0, 0.3);
}

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

.page-index__category-card p {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 25px;
  flex-grow: 1;
}

@media (max-width: 768px) {
  .page-index__game-categories {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-index__category-card {
    padding: 25px;
  }
  .page-index__category-card img {
    max-width: 100% !important;
    width: 100% !important;
    height: 200px !important;
    margin-bottom: 20px;
  }
  .page-index__category-title {
    font-size: 22px;
  }
  .page-index__category-card p {
    font-size: 15px;
  }
}

/* Module 4: Promotions */
.page-index__promotions-section {
  text-align: center;
  background-color: #0a0a0a;
}

.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.05);
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

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

.page-index__promo-card img {
  width: 100%;
  max-width: 300px; /* Larger images */
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 2px solid rgba(255, 215, 0, 0.3);
}

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

.page-index__promo-card p {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 25px;
  flex-grow: 1;
}

@media (max-width: 768px) {
  .page-index__promo-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-index__promo-card {
    padding: 25px;
  }
  .page-index__promo-card img {
    max-width: 100% !important;
    width: 100% !important;
    height: 180px !important;
  }
  .page-index__promo-title {
    font-size: 20px;
  }
  .page-index__promo-card p {
    font-size: 15px;
  }
}

/* Module 5: Security & Support */
.page-index__security-support-section {
  text-align: center;
}

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

.page-index__feature-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

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

.page-index__feature-item img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: brightness(1.5) saturate(1.5); /* Make icons more visible on dark background */
}

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

.page-index__feature-item p {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 0;
  flex-grow: 1;
}

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

@media (max-width: 768px) {
  .page-index__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-index__feature-item {
    padding: 25px;
  }
  .page-index__feature-item img {
    width: 80px;
    height: 80px;
  }
  .page-index__feature-title {
    font-size: 20px;
  }
  .page-index__feature-item p {
    font-size: 15px;
  }
  .page-index__contact-cta {
    margin-top: 40px;
  }
}

/* Module 6: FAQ */
.page-index__faq-section {
  background-color: #0a0a0a;
}

.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: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: rgba(255, 255, 255, 0.05);
  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.1);
}

.page-index__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #FFD700;
  pointer-events: none;
}

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

.page-index__faq-item.active .page-index__faq-toggle {
  color: #ffffff;
  transform: rotate(45deg); /* Optional: rotate for 'x' 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;
  background: rgba(255, 255, 255, 0.02);
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important;
  padding: 20px 25px !important;
  opacity: 1;
  border-top: 1px solid rgba(255, 215, 0, 0.05);
}

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

@media (max-width: 768px) {
  .page-index__faq-question {
    padding: 15px 20px;
    flex-wrap: wrap;
  }
  .page-index__faq-question h3 {
    font-size: 16px;
    width: calc(100% - 45px);
  }
  .page-index__faq-toggle {
    margin-left: 10px;
    width: 26px;
    height: 26px;
    font-size: 24px;
  }
  .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;
  }
}

/* Module 7: Latest Blog Content */
.page-index__blog-section {
  text-align: center;
}

.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: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
}

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

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

.page-index__blog-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.page-index__blog-content {
  padding: 25px;
}

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

.page-index__blog-summary {
  font-size: 15px;
  color: #f0f0f0;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

@media (max-width: 768px) {
  .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-index__blog-card img {
    height: 180px;
  }
  .page-index__blog-content {
    padding: 20px;
  }
  .page-index__blog-title {
    font-size: 18px;
  }
  .page-index__blog-summary {
    font-size: 14px;
  }
  .page-index__blog-date {
    font-size: 13px;
  }
  .page-index__view-all-posts {
    margin-top: 40px;
  }
}

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

@media (max-width: 768px) {
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__link-card,
  .page-index__category-card,
  .page-index__promo-card,
  .page-index__feature-item,
  .page-index__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__hero-section .page-index__hero-container,
  .page-index__logo-carousel-section .page-index__logo-carousel-container,
  .page-index__games-section .page-index__games-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}