:root {
  --primary-color: #0056b3; /* Deep blue */
  --secondary-color: #ffc107; /* Bright yellow */
  --dark-bg-color: #0a0a0a;
  --light-text-color: #ffffff;
  --dark-text-color: #333333;
  --card-bg-color: #ffffff;
  --border-color: #e0e0e0;
  --light-gray-bg: #f1f3f5;
  --rank-1-gradient: linear-gradient(135deg, #FFD700, #FFA500);
  --rank-2-gradient: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  --rank-3-gradient: linear-gradient(135deg, #CD7F32, #B87333);
  --rank-default-gradient: linear-gradient(135deg, #ff6b35, #ff8c42);
}

/* Page content area on a dark body background */
.page-index {
  color: var(--light-text-color); /* Light text on dark body background */
  background-color: var(--dark-bg-color); /* This will be overridden by shared.css body, but good to define scope */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

.page-index h1, .page-index h2, .page-index h3, .page-index h4, .page-index h5, .page-index h6 {
  color: var(--light-text-color);
}

/* Ensure images are responsive */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* HERO主图区域 */
.page-index__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 180px; /* Desktop: Adjust for fixed header */
  background-color: var(--dark-bg-color);
  color: var(--light-text-color);
}

.page-index__hero-container {
  position: relative;
  width: 100%;
  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;
}

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

.page-index__hero-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--light-text-color);
}

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

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--light-text-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
}

.page-index__cta-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* 模块 1: 游戏排行榜 */
.page-index__game-leaderboard-section {
  background-color: var(--light-gray-bg); /* Light grey background for this section */
  color: var(--dark-text-color); /* Dark text for this section */
  padding: 40px 20px;
}

.page-index__page-title {
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--dark-text-color);
}

.page-index__game-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-index__game-card {
  background: var(--card-bg-color);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

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

.page-index__game-card-segment {
  padding: 0 20px;
  border-left: 1px solid var(--border-color);
  height: 100%; /* Ensure segments have consistent height */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-index__segment-1 {
  border-left: none;
  padding-left: 0;
  flex-basis: 150px; /* Fixed width for first segment */
  flex-shrink: 0;
  align-items: center;
  text-align: center;
  position: relative;
}

.page-index__rank-badge {
  position: absolute;
  top: -10px;
  left: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rank-default-gradient);
  color: var(--light-text-color);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.page-index__rank-1 {
  background: var(--rank-1-gradient);
}

.page-index__rank-2 {
  background: var(--rank-2-gradient);
}

.page-index__rank-3 {
  background: var(--rank-3-gradient);
}

.page-index__game-icon {
  max-width: 100px;
  height: auto;
  border-radius: 4px;
  margin-top: 15px; /* Adjust margin to accommodate rank badge */
}

.page-index__segment-2 {
  flex: 1; /* Main content column, can stretch */
  align-items: center;
  text-align: center;
}

.page-index__game-name {
  font-size: 24px;
  font-weight: bold;
  color: var(--dark-text-color);
  margin: 0 0 10px 0;
  text-transform: uppercase;
}

.page-index__game-name-link {
  color: var(--dark-text-color); /* Ensure link text is dark on white card background */
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.page-index__game-name-link:hover {
  color: var(--primary-color); /* Change to primary color on hover */
  text-decoration: underline;
}

.page-index__game-description {
  font-size: 14px;
  color: var(--dark-text-color);
  font-weight: bold;
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.page-index__game-description a {
  color: var(--primary-color); /* Blue for links in description */
  font-weight: bold;
  text-decoration: none;
}

.page-index__game-description a:hover {
  color: var(--dark-text-color);
  text-decoration: underline;
}

.page-index__segment-3 {
  flex-basis: 180px; /* Fixed width for rating/promo segment */
  flex-shrink: 0;
  align-items: center;
  text-align: center;
}

.page-index__game-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.page-index__stars {
  color: var(--secondary-color);
  font-size: 20px;
  margin-right: 5px;
  font-weight: bold;
}

.page-index__rating-number {
  font-size: 18px;
  font-weight: bold;
  color: var(--dark-text-color);
}

.page-index__promotion-text {
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.page-index__promotion-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-index__promotion-link:hover {
  text-decoration: underline;
}

.page-index__hot-badge {
  background: #dc3545;
  color: var(--light-text-color);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.page-index__segment-4 {
  flex-basis: 200px; /* Fixed width for CTA buttons */
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  padding-right: 0;
}

.page-index__btn-download, .page-index__btn-review {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  border: none;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-download {
  background: var(--primary-color);
  color: var(--light-text-color);
}

.page-index__btn-download:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-index__btn-review {
  background: var(--light-gray-bg);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.page-index__btn-review:hover {
  background: var(--primary-color);
  color: var(--light-text-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 模块 1.5: Brand Review Content */
.page-index__review-content-section {
  padding: 40px 20px;
  background: var(--light-gray-bg); /* Light grey background */
}

.page-index__review-content-container {
  max-width: 1400px; /* Wider than leaderboard cards */
  margin: 0 auto;
}

.page-index__review-content-card {
  background: var(--card-bg-color); /* White background */
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 40px;
  color: var(--dark-text-color);
}

.page-index__review-title {
  font-size: 28px;
  font-weight: bold;
  color: var(--dark-text-color);
  margin-bottom: 24px;
  text-align: center;
}

.page-index__review-content-card h3 {
  font-size: 20px;
  font-weight: bold;
  color: var(--dark-text-color);
  margin-top: 24px;
  margin-bottom: 12px;
}

.page-index__review-body {
  color: var(--dark-text-color);
  line-height: 1.7;
}

.page-index__review-body p {
  margin-bottom: 16px;
  font-size: 16px;
}

/* Other sections on dark body background */
.page-index__homepage-intro-section,
.page-index__core-games-section,
.page-index__promotions-section,
.page-index__latest-blog-section {
  background-color: var(--dark-bg-color);
  color: var(--light-text-color);
  padding: 60px 20px;
}

.page-index__container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-index__section-title {
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--light-text-color);
}

.page-index__sub-title {
  font-size: 24px;
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--light-text-color);
}

.page-index__feature-list {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 20px;
  color: var(--light-text-color);
}

.page-index__feature-list li {
  margin-bottom: 10px;
  font-size: 16px;
}

/* Core Games Section */
.page-index__game-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-index__game-type-card {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  color: var(--light-text-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__game-type-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
}

.page-index__game-type-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--light-text-color);
}

.page-index__game-type-description {
  font-size: 15px;
  margin-bottom: 20px;
  color: var(--light-text-color);
}

/* Promotions Section */
.page-index__promotion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-index__promotion-card {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  color: var(--light-text-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__promotion-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
}

.page-index__promotion-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--light-text-color);
}

.page-index__promotion-description {
  font-size: 15px;
  margin-bottom: 20px;
  color: var(--light-text-color);
}

/* Latest Blog Section */
.page-index__blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-index__blog-card {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  color: var(--light-text-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-index__blog-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
}

.page-index__blog-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--light-text-color);
}

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

.page-index__blog-title-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.page-index__blog-excerpt {
  font-size: 15px;
  margin-bottom: 15px;
  flex-grow: 1;
  color: var(--light-text-color);
}

.page-index__blog-date {
  font-size: 13px;
  color: #cccccc;
  margin-bottom: 15px;
}

.page-index__cta-button--small {
  padding: 8px 15px;
  font-size: 14px;
  margin-top: auto; /* Push button to bottom */
}

.page-index__cta-button--large {
  padding: 18px 50px;
  font-size: 20px;
}

.page-index__center-button {
  text-align: center;
  margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__game-card {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding: 15px;
  }

  .page-index__game-card-segment {
    border-left: none;
    padding: 10px 0;
    width: 100%;
  }

  .page-index__segment-1 {
    flex-basis: auto;
    margin-bottom: 10px;
  }

  .page-index__rank-badge {
    position: static;
    margin-right: 10px;
  }

  .page-index__game-icon {
    margin-top: 0;
    max-width: 80px;
    display: inline-block;
    vertical-align: middle;
  }

  .page-index__segment-2, .page-index__segment-3, .page-index__segment-4 {
    flex-basis: auto;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .page-index__segment-4 {
    gap: 8px;
  }

  .page-index__btn-download, .page-index__btn-review {
    font-size: 14px;
    padding: 10px 15px;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: 160px !important; /* Mobile: Adjust for fixed header */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__hero-title {
    font-size: 32px;
  }

  .page-index__hero-description {
    font-size: 16px;
  }

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

  .page-index__page-title,
  .page-index__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .page-index__review-content-section,
  .page-index__game-leaderboard-section,
  .page-index__homepage-intro-section,
  .page-index__core-games-section,
  .page-index__promotions-section,
  .page-index__latest-blog-section {
    padding: 30px 15px;
  }

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

  .page-index__review-title {
    font-size: 24px;
  }

  .page-index__review-content-card h3 {
    font-size: 18px;
  }

  .page-index__review-body p {
    font-size: 15px;
  }

  .page-index__sub-title {
    font-size: 20px;
  }

  .page-index__feature-list li {
    font-size: 15px;
  }

  .page-index__game-type-grid,
  .page-index__promotion-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__game-type-image,
  .page-index__promotion-image,
  .page-index__blog-image {
    height: 150px;
  }

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

  .page-index__game-type-description,
  .page-index__promotion-description,
  .page-index__blog-excerpt {
    font-size: 14px;
  }

  .page-index__blog-date {
    font-size: 12px;
  }

  .page-index__cta-button--small {
    font-size: 13px;
    padding: 7px 12px;
  }

  .page-index__cta-button--large {
    font-size: 16px;
    padding: 14px 40px;
  }

  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__review-content-container,
  .page-index__game-leaderboard,
  .page-index__game-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0px;
    padding-right: 0px;
  }

  .page-index__game-card {
    padding: 15px;
  }

  .page-index__game-card-segment {
    padding: 0;
  }

  .page-index__segment-4 {
    padding-left: 0px;
    padding-right: 0px;
  }

  .page-index__btn-download, .page-index__btn-review {
    max-width: 100%;
    width: 100%;
    font-size: 12px;
    padding: 8px 12px;
    white-space: normal;
    word-wrap: break-word;
    min-width: auto;
  }
}