/* style/index.css */
:root {
  --primary-color: #007bff;
  --secondary-color: #ffc107;
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #050505;
  --card-background: #ffffff;
  --border-color: #e4e4e4;
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--background-dark);
}

/* --- Fixed Header Spacing --- */
.page-index__hero-section {
  padding-top: 180px; /* Desktop: Adjust for fixed header */
}

/* --- HERO Section --- */
.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;
  background: linear-gradient(135deg, #007bff, #0056b3); /* Darker gradient for contrast */
  color: var(--text-light);
}

.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: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-light);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.page-index__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  color: #f0f8ff;
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 10px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.page-index__cta-button:hover {
  background: #e0a800;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* --- Game Leaderboard Section (Module 1) --- */
.page-index__game-leaderboard-section {
  padding: 60px 20px;
  background: #f1f3f5; /* Lighter background for the leaderboard cards */
  color: var(--text-dark);
}

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

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

.page-index__game-card {
  background: var(--card-background);
  border-radius: 8px;
  box-shadow: var(--shadow-light);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.page-index__game-card-segment {
  padding: 0 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.page-index__game-card-segment:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 80%;
  background-color: var(--border-color);
}

.page-index__segment-1 {
  flex-shrink: 0;
  width: 120px;
  padding-left: 0;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

.page-index__rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: bold;
  font-size: 16px;
  margin-right: 10px;
  flex-shrink: 0;
}

.page-index__rank-1 {
  background: linear-gradient(135deg, #FFD700, #FFA500); /* Gold */
}

.page-index__rank-2 {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0); /* Silver */
}

.page-index__rank-3 {
  background: linear-gradient(135deg, #CD7F32, #B87333); /* Bronze */
}

.page-index__rank-badge:not(.page-index__rank-1):not(.page-index__rank-2):not(.page-index__rank-3) {
  background: linear-gradient(135deg, #ff6b35, #ff8c42); /* Orange for 4+ */
}

.page-index__game-icon {
  max-width: 80px; /* Smaller icon size */
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.page-index__segment-2 {
  flex-grow: 1;
  text-align: center;
  align-items: center;
}

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

.page-index__game-name-link {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.page-index__game-name-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

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

.page-index__game-description a {
  color: #0066cc;
  font-weight: bold;
  text-decoration: none;
}

.page-index__game-description a:hover {
  color: #004499;
  text-decoration: underline;
}

.page-index__segment-3 {
  flex-shrink: 0;
  width: 180px;
}

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

.page-index__stars {
  color: #ffc107;
  font-size: 18px;
  margin-right: 5px;
  font-weight: bold;
}

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

.page-index__promotion-text {
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-index__promotion-link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  margin-right: 5px;
}

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

.page-index__hot-badge {
  background: #dc3545;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: bold;
}

.page-index__segment-4 {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 0;
}

.page-index__btn-download,
.page-index__btn-review {
  display: block;
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  color: var(--text-light);
  background: var(--primary-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: none;
}

.page-index__btn-download:hover,
.page-index__btn-review:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.page-index__btn-review {
  background: var(--secondary-color);
  color: var(--text-dark);
}

.page-index__btn-review:hover {
  background: #e0a800;
}

/* --- Brand Review Content Section (Module 1.5) --- */
.page-index__review-content-section {
  padding: 40px 20px;
  background: #f1f3f5; /* Consistent with leaderboard background */
  color: var(--text-dark);
}

.page-index__review-content-container {
  max-width: 1400px; /* Slightly wider for better readability */
  margin: 0 auto;
}

.page-index__review-content-card {
  background: var(--card-background);
  border-radius: 8px;
  box-shadow: var(--shadow-light);
  padding: 40px;
}

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

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

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

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

/* --- Homepage Introduction Section (Module 2) --- */
.page-index__introduction-section {
  padding: 60px 20px;
  background: var(--primary-color); /* Dark section with primary color */
  color: var(--text-light);
  text-align: center;
}

.page-index__dark-section {
  background: var(--primary-color);
  color: var(--text-light);
}

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

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

.page-index__section-description {
  font-size: 18px;
  margin-bottom: 40px;
  color: #f0f8ff;
}

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

.page-index__intro-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 30px;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-index__intro-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.page-index__intro-icon {
  max-width: 100px; /* Min size for icons */
  height: auto;
  margin-bottom: 20px;
  filter: brightness(1.2); /* Slightly brighten icons on dark bg */
}

.page-index__intro-heading {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--text-light);
}

.page-index__intro-item p {
  font-size: 15px;
  color: #f0f8ff;
}

/* --- Core Games/Services Section (Module 3) --- */
.page-index__core-games-section {
  padding: 60px 20px;
  background: var(--card-background);
  color: var(--text-dark);
  text-align: center;
}

.page-index__game-carousel {
  display: flex;
  overflow-x: auto; /* Enable horizontal scrolling */
  gap: 30px;
  padding-bottom: 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.page-index__game-card-item {
  flex: 0 0 300px; /* Fixed width for each card */
  scroll-snap-align: start;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: var(--shadow-light);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__game-card-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.page-index__game-image {
  max-width: 100%;
  height: 200px; /* Fixed height for consistent look */
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 15px;
}

.page-index__game-item-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.page-index__game-card-item p {
  font-size: 15px;
  color: #555555;
  margin-bottom: 20px;
}

.page-index__game-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-index__game-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* --- Promotions Section (Module 4) --- */
.page-index__promotions-section {
  padding: 60px 20px;
  background: var(--primary-color); /* Dark section with primary color */
  color: var(--text-light);
  text-align: center;
}

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

.page-index__promo-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 30px;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-index__promo-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.page-index__promo-image {
  max-width: 100%;
  height: 200px; /* Fixed height for consistent look */
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 15px;
}

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

.page-index__promo-card p {
  font-size: 15px;
  color: #f0f8ff;
  margin-bottom: 20px;
}

.page-index__promo-link {
  display: inline-block;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-index__promo-link:hover {
  color: #e0a800;
  text-decoration: underline;
}

/* --- Latest Blog Content Section (Module 5) --- */
.page-index__blog-section {
  padding: 60px 20px;
  background: var(--card-background);
  color: var(--text-dark);
  text-align: center;
}

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

.page-index__blog-card {
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.page-index__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.page-index__blog-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

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

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

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

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

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

.page-index__blog-date {
  font-size: 13px;
  color: #888888;
}

.page-index__view-all-button {
  margin-top: 20px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-index__hero-title {
    font-size: 40px;
  }
  .page-index__hero-description {
    font-size: 18px;
  }
  .page-index__page-title {
    font-size: 30px;
  }
  .page-index__game-card-segment {
    padding: 0 10px;
  }
  .page-index__segment-1 {
    width: 100px;
  }
  .page-index__game-icon {
    max-width: 70px;
  }
  .page-index__game-name {
    font-size: 20px;
  }
  .page-index__segment-3 {
    width: 150px;
  }
  .page-index__segment-4 {
    width: 180px;
  }
  .page-index__btn-download,
  .page-index__btn-review {
    font-size: 13px;
    padding: 10px 12px;
  }
  .page-index__review-content-card {
    padding: 30px;
  }
  .page-index__review-title {
    font-size: 26px;
  }
  .page-index__review-content-card h3 {
    font-size: 19px;
  }
  .page-index__section-title {
    font-size: 28px;
  }
  .page-index__section-description {
    font-size: 16px;
  }
  .page-index__intro-heading,
  .page-index__promo-title,
  .page-index__game-item-title,
  .page-index__blog-title {
    font-size: 20px;
  }
  .page-index__game-card-item,
  .page-index__promo-card,
  .page-index__blog-card {
    flex: 0 0 280px;
  }
  .page-index__game-carousel {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  /* Fixed Header Spacing for Mobile */
  .page-index__hero-section {
    padding-top: 140px !important; /* Mobile: Adjust for fixed header */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__hero-title {
    font-size: 36px;
  }
  .page-index__hero-description {
    font-size: 16px;
  }
  .page-index__cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }
  .page-index__game-leaderboard-section {
    padding: 30px 15px;
  }
  .page-index__page-title {
    font-size: 26px;
    margin-bottom: 30px;
  }
  .page-index__game-card {
    flex-direction: column; /* Stack segments vertically on mobile */
    align-items: flex-start; /* Align content to start */
    padding: 15px;
  }
  .page-index__game-card-segment {
    width: 100% !important;
    padding: 10px 0 !important;
    border-left: none !important;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    text-align: center;
  }
  .page-index__game-card-segment:last-child {
    border-bottom: none;
  }
  .page-index__game-card-segment:not(:first-child)::before {
    display: none;
  }
  .page-index__segment-1 {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
  }
  .page-index__rank-badge {
    margin-right: 15px;
    font-size: 14px;
    width: 24px;
    height: 24px;
  }
  .page-index__game-icon {
    max-width: 60px;
  }
  .page-index__game-name {
    font-size: 20px;
    margin-bottom: 5px;
  }
  .page-index__game-description {
    font-size: 13px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  .page-index__segment-3 {
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }
  .page-index__game-rating {
    margin-right: 15px;
    margin-bottom: 0;
  }
  .page-index__segment-4 {
    flex-direction: row; /* Buttons side-by-side on mobile if possible, or wrap */
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 100%; /* Ensure segment takes full width */
  }
  .page-index__btn-download,
  .page-index__btn-review {
    flex: 1 1 calc(50% - 5px); /* Two buttons per row, with gap */
    max-width: calc(50% - 5px) !important;
    font-size: 12px !important;
    padding: 8px 10px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    min-width: auto !important;
  }
  .page-index__review-content-section {
    padding: 20px 15px;
  }
  .page-index__review-content-card {
    padding: 24px 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__introduction-section,
  .page-index__core-games-section,
  .page-index__promotions-section,
  .page-index__blog-section {
    padding: 30px 15px;
  }
  .page-index__section-title {
    font-size: 24px;
  }
  .page-index__section-description {
    font-size: 15px;
  }
  .page-index__intro-grid,
  .page-index__promotions-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-index__intro-item,
  .page-index__promo-card,
  .page-index__blog-card {
    padding: 20px;
  }
  .page-index__intro-heading,
  .page-index__promo-title,
  .page-index__game-item-title,
  .page-index__blog-title {
    font-size: 18px;
  }
  .page-index__game-carousel {
    gap: 15px;
    padding-bottom: 15px;
  }
  .page-index__game-card-item {
    flex: 0 0 260px;
    padding: 20px;
  }
  .page-index__game-image,
  .page-index__promo-image,
  .page-index__blog-image {
    height: 150px;
  }
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__hero-container,
  .page-index__review-content-container,
  .page-index__game-leaderboard-section,
  .page-index__introduction-section,
  .page-index__core-games-section,
  .page-index__promotions-section,
  .page-index__blog-section
  {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Ensure images don't have filters */
.page-index img {
  filter: none;
}

/* Contrast fixes for dark background body */
.page-index__hero-section .page-index__hero-title,
.page-index__hero-section .page-index__hero-description,
.page-index__introduction-section .page-index__section-title,
.page-index__introduction-section .page-index__section-description,
.page-index__intro-item h3,
.page-index__intro-item p,
.page-index__promotions-section .page-index__section-title,
.page-index__promotions-section .page-index__section-description,
.page-index__promo-card h3,
.page-index__promo-card p {
  color: var(--text-light); /* Ensure light text on dark primary background */
}

.page-index__game-leaderboard-section .page-index__page-title,
.page-index__game-card h3,
.page-index__game-card p,
.page-index__game-card a,
.page-index__review-content-section h2,
.page-index__review-content-section h3,
.page-index__review-content-section p,
.page-index__core-games-section h2,
.page-index__core-games-section h3,
.page-index__core-games-section p,
.page-index__blog-section h2,
.page-index__blog-section h3,
.page-index__blog-section p,
.page-index__blog-section span {
  color: var(--text-dark); /* Ensure dark text on light card/section backgrounds */
}

.page-index__promo-link {
  color: var(--secondary-color);
}

.page-index__cta-button {
  background: var(--secondary-color);
  color: var(--text-dark);
}

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