/* --- Base Styles & Colors --- */
.page-index {
  background-color: #0D0E12;
  color: #FFF3E6;
}

.page-index__hero-section {
  padding-top: 10px; /* Assuming shared.css handles body padding-top */
  max-width: 100%;
  overflow: hidden;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.page-index__title-section {
  max-width: 1330px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
  box-sizing: border-box;
}

.page-index__page-title {
  color: #FFF3E6;
  margin: 0 0 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-index__page-title .page-index__title-main {
  display: inline-block;
  position: relative;
  padding: 0 20px;
}

.page-index__page-title .page-index__title-main::before,
.page-index__page-title .page-index__title-main::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40px;
  height: 2px;
  background-color: #FF8C1A;
  transform: translateY(-50%);
}

.page-index__page-title .page-index__title-main::before {
  left: -20px;
}

.page-index__page-title .page-index__title-main::after {
  right: -20px;
}

.page-index__seo-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #9DA0A8;
  margin-bottom: 20px;
}

.page-index__seo-links a {
  color: #198754; /* Green for emphasis */
  text-decoration: none;
  font-weight: 600;
}

.page-index__seo-links a:hover {
  text-decoration: underline;
}

.page-index__home-content {
  border: 1px solid #FBB00D;
  border-radius: 10px;
  padding: 0 10px;
  height: 650px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #FF8C1A #1A202C;
  max-width: 1330px;
  margin: 20px auto;
  box-sizing: border-box;
}

.page-index__home-content::-webkit-scrollbar {
  width: 8px;
}

.page-index__home-content::-webkit-scrollbar-track {
  background: #1A202C;
  border-radius: 10px;
}

.page-index__home-content::-webkit-scrollbar-thumb {
  background-color: #FF8C1A;
  border-radius: 10px;
  border: 2px solid #1A202C;
}

.page-index__home-content blockquote {
  border-left: 4px solid #FF8C1A;
  margin: 20px 0;
  padding: 10px 20px;
  background-color: #17191F;
  color: #FFF3E6;
  font-style: italic;
}

.page-index__home-content blockquote p {
  margin: 0;
  color: #FFF3E6;
}

.page-index__home-content blockquote a {
  color: #FF8C1A;
  text-decoration: none;
  font-weight: bold;
}

.page-index__home-content h2 {
  background: linear-gradient(-225deg, #28a745 0%, #44107a 29%, #ff1361 67%, #fff800 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: page-index-gradient 5s linear infinite;
  margin: 25px 0 15px;
  font-size: 2em;
  font-weight: bold;
}

.page-index__home-content h3 {
  color: #FF8C1A;
  margin: 20px 0 10px;
  font-size: 1.5em;
}

.page-index__home-content p {
  color: #9DA0A8;
  margin-bottom: 15px;
  line-height: 1.6;
}

.page-index__home-content ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 15px;
  color: #9DA0A8;
}

.page-index__home-content ul li {
  margin-bottom: 5px;
  line-height: 1.5;
}

.page-index__home-content ul li strong {
  color: #FFF3E6;
}

.page-index__wp-caption {
  margin: 20px auto;
  text-align: center;
  background-color: #17191F;
  border: 1px solid #3A2A12;
  border-radius: 8px;
  padding: 10px;
}

.page-index__wp-caption img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 5px;
}

.page-index__wp-caption-text {
  color: #9DA0A8;
  font-size: 0.9em;
  margin-top: 10px;
}

.page-index__home-content .page-index__btn-primary {
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
  color: #ffffff;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-top: 15px;
  transition: all 0.3s ease;
}

.page-index__home-content .page-index__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

@keyframes page-index-gradient {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === 模块 3–6 共享：深色区块与金色标题线 === */
.page-index__row-games,
.page-index__row-sport,
.page-index__row-coop {
  background-color: #1A202C;
  padding: 40px 20px;
  max-width: 1330px;
  margin: 20px auto;
  box-sizing: border-box;
}
.page-index__games-title,
.page-index__sport-title,
.page-index__coop-title {
  color: #FFF3E6;
  text-align: center;
  text-transform: uppercase;
  margin: 0 0 24px;
  position: relative;
  padding-bottom: 10px;
}
.page-index__games-title::after,
.page-index__sport-title::after,
.page-index__coop-title::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background-color: #CAAB71;
  margin: 8px auto 0;
}

/* === 模块 3：游戏横滑 === */
.page-index__slider-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
}
.page-index__slider-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  width: 100%;
  transition: transform 0.4s ease;
  padding-bottom: 10px;
}
.page-index__game-slide {
  flex: 0 0 200px;
  max-width: 200px;
  min-width: 0;
}
.page-index__game-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background-color: #17191F;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #3A2A12;
  transition: border-color 0.3s ease;
}
.page-index__game-card:hover {
  border-color: #FF8C1A;
}
.page-index__game-card-image {
  position: relative;
  width: 100%;
  padding-top: 71.2%; /* 146/205 */
  overflow: hidden;
}
.page-index__game-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.page-index__game-card h4 {
  color: #CAAB71;
  margin: 8px 0 10px;
  font-size: 14px;
  text-align: center;
  padding: 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-index__slider-prev,
.page-index__slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 140, 26, 0.8);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.page-index__slider-prev:hover,
.page-index__slider-next:hover {
  opacity: 1;
}
.page-index__slider-prev {
  left: 5px;
}
.page-index__slider-next {
  right: 5px;
}
.page-index__slider-prev::before {
  content: '‹';
}
.page-index__slider-next::before {
  content: '›';
}

/* === 模块 4：合作品牌固定 6 列（仅此模块禁止滚动） === */
.page-index__banners-top-wrapper {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  overflow: visible;
  align-items: center;
  justify-content: center;
  background-color: #17191F;
  border-radius: 10px;
  padding: 20px 10px;
  border: 1px solid #3A2A12;
}
.page-index__banner-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.page-index__banner-item a {
  display: block;
  width: 100%;
  max-width: 120px;
  margin: 0 auto;
  text-align: center;
}
.page-index__banner-item img {
  width: 100%;
  
  height: auto;
  
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: grayscale(80%);
  opacity: 0.7;
  transition: all 0.3s ease;
}
.page-index__banner-item img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* === 模块 5：博客卡片区等高网格 === */
.page-index__blog-masonry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.page-index__blog-card {
  background-color: #1A202C;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #3A2A12;
  height: 100%;
  position: relative;
}
.page-index__blog-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.page-index__blog-card-image {
  position: relative;
  width: 100%;
  padding-top: 56%; /* Aspect ratio 16:9 */
  overflow: hidden;
  flex-shrink: 0;
}
.page-index__blog-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.page-index__blog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 15px;
  min-height: 0;
}
.page-index__blog-card-body h5 {
  color: #CAAB71;
  margin: 0 0 10px;
  font-size: 1.1em;
  line-height: 1.4;
}
.page-index__blog-card-body p {
  color: #9DA0A8;
  margin: 0 0 12px;
  flex: 1 1 auto;
  font-size: 0.9em;
  line-height: 1.5;
}
.page-index__btn-outline {
  margin-top: auto;
  align-self: flex-start;
  color: #FF8C1A;
  border: 1px solid #FF8C1A;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 0.9em;
  transition: all 0.3s ease;
}
.page-index__btn-outline:hover {
  background-color: #FF8C1A;
  color: #FFF3E6;
}
.page-index__blog-card:hover {
  border-color: #198754;
}
.page-index__post-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #FFF3E6;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 0.8em;
  text-align: center;
  line-height: 1;
}
.page-index__post-date span:first-child {
  font-weight: bold;
  display: block;
  font-size: 1.2em;
}

/* === 模块 6：最新博客轮播 === */
.page-index__blog-slider {
  position: relative;
  overflow: hidden;
  background-color: #17191F;
  border-radius: 10px;
  padding: 20px;
  border: 1px solid #3A2A12;
}
.page-index__blog-slider-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  transition: transform 0.4s ease;
  padding-bottom: 10px;
}
.page-index__blog-slide {
  flex: 0 0 calc(33.333% - 14px); /* (3 * 20px gap) / 3 = 14px */
  max-width: calc(33.333% - 14px);
  min-width: 0;
  background-color: #1A202C;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #3A2A12;
  transition: border-color 0.3s ease;
}
.page-index__blog-slide:hover {
  border-color: #FF8C1A;
}
.page-index__blog-slide-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding-bottom: 15px;
}
.page-index__blog-slide-link img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px 8px 0 0;
  object-fit: cover;
}
.page-index__blog-slide-link h5 {
  color: #CAAB71;
  margin: 15px 15px 6px;
  font-size: 1.1em;
  line-height: 1.4;
}
.page-index__blog-slide-link p {
  color: #9DA0A8;
  margin: 0 15px;
  font-size: 0.9em;
  line-height: 1.5;
}
.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 140, 26, 0.8);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  opacity: 1;
}
.page-index__blog-slider-prev {
  left: 5px;
}
.page-index__blog-slider-next {
  right: 5px;
}
.page-index__blog-slider-prev::before {
  content: '‹';
}
.page-index__blog-slider-next::before {
  content: '›';
}

/* --- Mobile & Tablet Responsive --- */
@media (max-width: 1024px) {
  .page-index__blog-masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-index__blog-slide {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: 10px;
  }
  .page-index__title-section {
    padding: 15px;
  }
  .page-index__page-title {
    font-size: 1.8em;
  }
  .page-index__page-title .page-index__title-main::before,
  .page-index__page-title .page-index__title-main::after {
    width: 20px;
  }
  .page-index__home-content {
    height: 500px;
    padding: 0 8px;
    margin: 15px auto;
  }
  .page-index__home-content h2 {
    font-size: 1.5em;
  }
  .page-index__home-content h3 {
    font-size: 1.2em;
  }
  .page-index__home-content p,
  .page-index__home-content ul li {
    font-size: 0.95em;
  }
  .page-index__row-games,
  .page-index__row-sport,
  .page-index__row-coop {
    padding: 30px 15px;
    margin: 15px auto;
  }
  .page-index__games-title,
  .page-index__sport-title,
  .page-index__coop-title {
    font-size: 1.3em;
  }

  /* Module 3: Game Slider Mobile */
  .page-index__slider-track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding-bottom: 10px;
  }
  .page-index__game-slide {
    scroll-snap-align: start;
    flex: 0 0 160px !important;
    max-width: 160px !important;
  }
  .page-index__game-card-image {
    padding-top: 71.2%; /* Maintain aspect ratio */
  }
  .page-index__slider-prev,
  .page-index__slider-next {
    display: none; /* Hide on mobile for better touch experience */
  }

  /* Module 4: Partner Brands Mobile */
  .page-index__banners-top-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    max-width: 100% !important;
    padding: 15px 10px;
  }
  .page-index__banner-item img {
    
    
  }

  /* Module 5: Blog Cards Mobile */
  .page-index__blog-masonry {
    grid-template-columns: 1fr !important;
  }
  .page-index__blog-card-body h5 {
    font-size: 1em;
  }
  .page-index__blog-card-body p {
    font-size: 0.85em;
  }

  /* Module 6: Latest Blog Slider Mobile */
  .page-index__blog-slider-track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding-bottom: 10px;
  }
  .page-index__blog-slide {
    scroll-snap-align: start;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    display: none; /* Hide on mobile */
  }

  /* General Image & Container Mobile Adaptation */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__hero-image,
  .page-index__wp-caption,
  .page-index__game-card-image,
  .page-index__blog-card-image,
  .page-index__blog-slide-link img {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Button Mobile Adaptation */
  .page-index__btn-primary,
  .page-index__btn-outline,
  .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;
    padding-right: 15px;
    text-align: center;
  }
  .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: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    justify-content: center;
  }
  .page-index__home-content .page-index__btn-primary {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
}