/* style/index.css */
:root {
  --primary-color: #007BFF;
  --secondary-color: #28A745;
  --accent-color: #FFC107;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --border-color: #e0e0e0;
  --background-grey: #f1f3f5;
}

.page-index {
  color: var(--text-color-light); /* Default text color for page content, assuming dark body bg */
}

/* 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 based on fixed header height */
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-color-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-color-light);
  line-height: 1.2;
}

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

.page-index__hero-description strong {
  color: var(--accent-color);
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--accent-color);
  color: var(--text-color-dark);
  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: #FFD700;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Game Leaderboard Section */
.page-index__game-leaderboard-section {
  padding: 40px 20px;
  background: var(--background-grey);
  color: var(--text-color-dark); /* Ensure dark text on light background */
}

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

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

.page-index__game-card {
  background: #ffffff;
  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);
}

.page-index__game-card-segment {
  padding: 0 20px;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.page-index__segment-1 {
  flex-shrink: 0;
  width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 0;
  padding-right: 20px;
  flex-direction: column;
}

.page-index__rank-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: bold;
  font-size: 16px;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

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

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

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

.page-index__rank-badge {
  background: linear-gradient(135deg, #ff6b35, #ff8c42); /* Orange for others */
}

.page-index__game-icon {
  max-width: 100px;
  height: auto;
  display: block;
  margin-top: 10px; /* Space for rank badge */
  border-radius: 4px;
}

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

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

.page-index__game-name-link {
  color: var(--text-color-dark);
  text-decoration: none;
  transition: color 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-color-dark);
  font-weight: bold;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}

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

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

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

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

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

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

.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: #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;
}

.page-index__btn-download,
.page-index__btn-review {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.3;
  min-height: 48px;
}

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

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

.page-index__btn-review {
  background: var(--secondary-color);
  color: #ffffff;
}

.page-index__btn-review:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Brand Review Content Section */
.page-index__review-content-section {
  padding: 40px 20px;
  background: var(--background-grey);
}

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

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

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

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

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

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

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

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

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

.page-index__content-wrapper {
  display: flex;
  gap: 40px;
  align-items: center;
}

.page-index__text-block {
  flex: 1;
  line-height: 1.7;
  font-size: 16px;
}

.page-index__text-block strong {
  color: var(--primary-color);
}

.page-index__image-block {
  flex-shrink: 0;
  width: 500px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.page-index__image-block img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

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

.page-index__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.6;
}

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

.page-index__game-card-small {
  background: var(--background-grey);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-index__game-card-small:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-index__game-type-image {
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
}

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

.page-index__game-card-small p {
  font-size: 15px;
  line-height: 1.6;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-index__btn-small {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 15px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-index__btn-small:hover {
  background: #0056b3;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 60px 20px;
  background: var(--background-grey);
  color: var(--text-color-dark);
}

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

.page-index__promo-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.page-index__promo-image {
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
}

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

.page-index__promo-card p {
  font-size: 15px;
  line-height: 1.6;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-index__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-index__btn-primary:hover {
  background: #0056b3;
}

/* Latest Blog Section */
.page-index__latest-blog-section {
  padding: 60px 20px;
  background: #ffffff;
  color: var(--text-color-dark);
}

.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: var(--background-grey);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  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 5px 15px rgba(0, 0, 0, 0.1);
}

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

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

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

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

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

.page-index__blog-excerpt {
  font-size: 15px;
  color: #555555;
  line-height: 1.6;
  margin-bottom: 15px;
}

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

.page-index__view-all-button-container {
  text-align: center;
  margin-top: 40px;
}

.page-index__btn-secondary {
  display: inline-block;
  padding: 12px 30px;
  background: #ffffff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.page-index__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__hero-title {
    font-size: 40px;
  }

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

  .page-index__page-title,
  .page-index__section-title {
    font-size: 32px;
  }

  .page-index__game-card {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

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

  .page-index__game-card-segment:not(:first-child)::before {
    display: none;
  }

  .page-index__segment-1 {
    width: 100%;
    flex-direction: row;
    gap: 20px;
    justify-content: center;
    padding-right: 0;
  }

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

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

  .page-index__segment-2 {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

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

  .page-index__game-description {
    font-size: 13px;
  }

  .page-index__segment-3 {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-top: 10px;
  }

  .page-index__segment-4 {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-top: 10px;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
  }

  .page-index__btn-download,
  .page-index__btn-review {
    flex: 1;
    max-width: 48%;
    font-size: 13px;
    padding: 10px 10px;
  }

  .page-index__content-wrapper {
    flex-direction: column;
  }

  .page-index__image-block {
    width: 100%;
    max-width: 500px;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: 160px !important; /* Mobile: Adjust based on fixed header height */
    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__hero-cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }

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

  .page-index__game-leaderboard-section,
  .page-index__review-content-section,
  .page-index__introduction-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;
  }

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

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

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

  .page-index__content-wrapper {
    gap: 20px;
  }

  .page-index__text-block {
    font-size: 15px;
  }

  .page-index__game-type-title,
  .page-index__promo-title,
  .page-index__blog-title {
    font-size: 20px;
  }

  .page-index__game-card-small p,
  .page-index__promo-card p,
  .page-index__blog-excerpt {
    font-size: 14px;
  }

  .page-index__btn-small,
  .page-index__btn-primary,
  .page-index__btn-secondary {
    font-size: 14px;
    padding: 10px 20px;
  }

  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__game-card,
  .page-index__review-content-card,
  .page-index__game-card-small,
  .page-index__promo-card,
  .page-index__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .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;
  }
}

@media (max-width: 480px) {
  .page-index__hero-title {
    font-size: 28px;
  }

  .page-index__page-title,
  .page-index__section-title {
    font-size: 24px;
  }

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

  .page-index__segment-4 {
    flex-direction: column;
  }

  .page-index__btn-download,
  .page-index__btn-review {
    max-width: 100%;
    width: 100%;
  }

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

  .page-index__segment-1 {
    flex-direction: column;
    gap: 10px;
  }

  .page-index__rank-badge {
    position: static;
    margin-bottom: 5px;
  }

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

  .page-index__game-description {
    font-size: 12px;
  }

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

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

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