/* style/index.css */
:root {
  --primary-color: #1A73E8;
  --secondary-color: #FFD700;
  --text-color-dark-bg: #ffffff;
  --text-color-light-bg: #333333;
  --background-dark: #0a0a0a; /* Body background from shared.css */
  --card-background-light: #ffffff;
  --border-color: #e0e0e0;
}

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

/* 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;
  padding-top: 180px; /* Desktop: Adjust for fixed header */
  background: linear-gradient(135deg, var(--primary-color) 0%, #0a0a0a 100%); /* Adjusted for dark body background */
  color: var(--text-color-dark-bg);
}

.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;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

.page-index__hero-content h1 {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-color-dark-bg);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-index__hero-content p {
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 30px;
  color: var(--text-color-dark-bg);
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--text-color-light-bg);
  text-decoration: none;
  border-radius: 5px;
  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);
}

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

/* Game Leaderboard Section */
.page-index__game-leaderboard-section {
  padding: 60px 20px;
  background: #f1f3f5; /* Light background for leaderboard */
  color: var(--text-color-light-bg);
}

.page-index__page-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--text-color-light-bg);
  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-light);
  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, box-shadow 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;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.page-index__game-card-segment:not(:first-child) {
  border-left: 1px solid var(--border-color);
}

.page-index__segment-1 {
  min-width: 120px;
  max-width: 150px;
  padding-left: 0;
  position: relative;
}

.page-index__rank-badge {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: bold;
  font-size: 16px;
  background: linear-gradient(135deg, #ff6b35, #ff8c42); /* Default for 4+ */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

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

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

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

.page-index__game-icon {
  max-width: 100px;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
  margin-top: 10px;
}

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

.page-index__game-name {
  font-size: 24px;
  font-weight: bold;
  color: #000000;
  text-align: center;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.page-index__game-name-link {
  color: #000000;
  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: #000000;
  font-weight: bold;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.page-index__game-description a {
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
}

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

.page-index__segment-3 {
  min-width: 150px;
  max-width: 200px;
  text-align: center;
}

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

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

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

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

.page-index__promotion-link {
  color: var(--primary-color);
  font-size: 14px;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

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

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

.page-index__segment-4 {
  min-width: 200px;
  max-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-index__cta-button {
  display: block;
  width: 100%;
  padding: 12px 15px;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-index__btn-download {
  background: var(--primary-color);
  color: #ffffff;
}

.page-index__btn-download:hover {
  background: #155bb5;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.page-index__btn-review {
  background: #f0f0f0;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.page-index__btn-review:hover {
  background: #e0e0e0;
  color: #155bb5;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* Brand Review Content Section */
.page-index__review-content-section {
  padding: 40px 20px;
  background: #f1f3f5; /* Light background for content */
  color: var(--text-color-light-bg);
}

.page-index__review-content-container {
  max-width: 1400px;
  margin: 0 auto;
}

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

.page-index__review-content-card h2 {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-color-light-bg);
  margin-bottom: 24px;
  text-align: center;
}

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

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

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

/* Homepage Introduction Section */
.page-index__intro-section {
  padding: 60px 20px;
  background: var(--background-dark);
  color: var(--text-color-dark-bg);
}

.page-index__intro-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.page-index__intro-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 30px;
  color: var(--text-color-dark-bg);
}

.page-index__intro-content p {
  font-size: 18px;
  margin-bottom: 40px;
  color: var(--text-color-dark-bg);
}

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

.page-index__feature-item {
  background: rgba(255, 255, 255, 0.05); /* Slightly lighter card on dark background */
  border-radius: 8px;
  padding: 30px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background 0.3s ease;
}

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

.page-index__feature-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  object-fit: contain;
  filter: brightness(1.2); /* Slightly brighter for visibility on dark bg */
}

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

.page-index__feature-item p {
  font-size: 15px;
  color: #cccccc;
  margin-bottom: 0;
}

/* Core Games/Services Section */
.page-index__core-games-section {
  padding: 60px 0;
  background: var(--background-dark);
  color: var(--text-color-dark-bg);
}

.page-index__core-games-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding: 0 20px;
}

.page-index__core-games-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 40px;
  color: var(--text-color-dark-bg);
}

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

.page-index__game-carousel::-webkit-scrollbar {
  height: 8px;
}

.page-index__game-carousel::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.page-index__game-carousel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.page-index__game-card-item {
  flex: 0 0 300px; /* Fixed width for items */
  scroll-snap-align: start;
  background: rgba(255, 255, 255, 0.08); /* Slightly lighter card on dark background */
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.page-index__game-card-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.12);
}

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

.page-index__game-card-item h3 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--text-color-dark-bg);
}

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

.page-index__btn-secondary {
  display: inline-block;
  padding: 10px 25px;
  background: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.page-index__btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--text-color-light-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 60px 20px;
  background: #f1f3f5; /* Light background for promotions */
  color: var(--text-color-light-bg);
}

.page-index__promotions-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

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

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

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

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

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

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

.page-index__promo-card h3 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--text-color-light-bg);
}

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

.page-index__btn-primary {
  display: inline-block;
  padding: 12px 30px;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-index__btn-primary:hover {
  background: #155bb5;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* Latest Blog Content Section */
.page-index__blog-section {
  padding: 60px 20px;
  background: #f1f3f5; /* Light background for blog */
  color: var(--text-color-light-bg);
}

.page-index__blog-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

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

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

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

.page-index__blog-post-card {
  background: var(--card-background-light);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__blog-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

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

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

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

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

.page-index__blog-content p {
  font-size: 15px;
  color: #666666;
  margin-bottom: 15px;
}

.page-index__post-date {
  font-size: 13px;
  color: #999999;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__game-card {
    flex-wrap: wrap;
    padding: 15px;
  }
  
  .page-index__game-card-segment {
    padding: 10px;
    border-left: none !important;
    width: 100%;
  }
  
  .page-index__game-card-segment:not(:first-child) {
    border-top: 1px solid var(--border-color);
  }
  
  .page-index__segment-1 {
    min-width: auto;
    max-width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    padding-top: 0;
    padding-bottom: 0;
  }

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

  .page-index__game-icon {
    max-width: 80px;
    height: auto;
  }

  .page-index__segment-2, .page-index__segment-3, .page-index__segment-4 {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }
  
  .page-index__segment-4 {
    flex-direction: row;
    gap: 10px;
  }
  
  .page-index__cta-button {
    flex: 1;
    font-size: 14px;
    padding: 10px 10px;
  }

  .page-index__hero-content h1 {
    font-size: 36px;
  }

  .page-index__hero-content p {
    font-size: 18px;
  }

  .page-index__page-title, .page-index__promotions-title, .page-index__blog-title {
    font-size: 32px;
  }
  
  .page-index__intro-title, .page-index__core-games-title {
    font-size: 28px;
  }

  .page-index__game-carousel {
    justify-content: flex-start;
  }
  
  .page-index__game-card-item {
    flex: 0 0 280px;
  }
}

@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-image img {
    border-radius: 4px;
  }
  
  .page-index__hero-content h1 {
    font-size: 28px;
    margin-bottom: 15px;
  }
  
  .page-index__hero-content p {
    font-size: 16px;
    margin-bottom: 20px;
  }
  
  .page-index__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    margin-top: 20px;
  }

  .page-index__game-leaderboard-section, .page-index__review-content-section, .page-index__intro-section, .page-index__core-games-section, .page-index__promotions-section, .page-index__blog-section {
    padding: 30px 15px;
  }

  .page-index__page-title, .page-index__promotions-title, .page-index__blog-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  
  .page-index__intro-title, .page-index__core-games-title {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .page-index__game-card {
    flex-direction: column;
    padding: 15px 10px;
  }

  .page-index__game-card-segment {
    width: 100%;
    padding: 10px 0;
    align-items: center;
  }

  .page-index__segment-1 {
    flex-direction: row;
    justify-content: center;
    gap: 15px;
  }
  
  .page-index__rank-badge {
    position: static;
  }

  .page-index__game-icon {
    max-width: 80px;
  }

  .page-index__game-name {
    font-size: 20px;
  }

  .page-index__game-description {
    font-size: 13px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .page-index__segment-4 {
    flex-direction: column;
    gap: 10px;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  .page-index__btn-download, .page-index__btn-review {
    max-width: 100% !important;
    width: 100% !important;
    font-size: 12px !important;
    padding: 8px 12px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    min-width: auto !important;
  }

  .page-index__review-content-card {
    padding: 24px 20px;
  }
  
  .page-index__review-content-card h2 {
    font-size: 24px;
  }
  
  .page-index__review-content-card h3 {
    font-size: 18px;
  }
  
  .page-index__review-body p {
    font-size: 15px;
  }

  .page-index__intro-features {
    grid-template-columns: 1fr;
  }

  .page-index__feature-icon {
    width: 80px;
    height: 80px;
  }

  .page-index__game-carousel {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-index__game-card-item {
    flex: 0 0 90%; /* Make items wider for better visibility on mobile */
    margin-right: 15px;
  }

  .page-index__promo-grid, .page-index__blog-grid {
    grid-template-columns: 1fr;
  }

  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__section, .page-index__card, .page-index__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}