/* style/index.css */
:root {
  --primary-color: #336699;
  --secondary-color: #FFCC00;
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-light: #f1f3f5;
  --background-dark: #000000;
  --border-color: #e0e0e0;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --shadow-strong: rgba(0, 0, 0, 0.2);
}

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

/* Fixed header clearance */
.page-index__hero-section {
  padding-top: 180px; /* Desktop fixed header clearance */
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 60px; /* Add padding to the bottom */
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); /* Example gradient for hero background */
}

.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;
  padding: 0 20px;
}

.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 var(--shadow-medium);
}

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

.page-index__hero-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-index__hero-description {
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 40px;
  color: var(--text-light);
}

.page-index__hero-cta-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-light);
  border: none;
  cursor: pointer;
}

.page-index__cta-button--primary {
  background: var(--primary-color);
  color: var(--text-light);
}

.page-index__cta-button--primary:hover {
  background: #2a537f;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow-medium);
}

.page-index__cta-button--secondary {
  background: var(--text-light);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-index__cta-button--secondary:hover {
  background: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow-medium);
}

/* Game Leaderboard Section */
.page-index__game-leaderboard-section {
  padding: 60px 20px;
  background-color: var(--background-light);
  text-align: center;
}

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

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

.page-index__game-card {
  background: var(--text-light);
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--shadow-light);
  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 8px 20px var(--shadow-medium);
}

.page-index__game-card-segment {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  text-align: center;
  height: 100%;
  box-sizing: border-box;
}

.page-index__segment-1 {
  flex-shrink: 0;
  width: 140px;
  padding-left: 0;
  border-right: 1px solid var(--border-color);
  position: relative;
}

.page-index__segment-2 {
  flex-grow: 1;
  border-right: 1px solid var(--border-color);
}

.page-index__segment-3 {
  flex-shrink: 0;
  width: 180px;
  border-right: 1px solid var(--border-color);
}

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

.page-index__rank-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-light);
  font-weight: bold;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -10px;
  left: -10px;
  box-shadow: 0 2px 8px var(--shadow-light);
  z-index: 1;
}

.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__rank-badge:not(.page-index__rank-1):not(.page-index__rank-2):not(.page-index__rank-3) {
  background: linear-gradient(135deg, #ff6b35, #ff8c42);
}

.page-index__game-icon {
  max-width: 100px;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-top: 20px;
  box-shadow: 0 2px 8px var(--shadow-light);
}

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

.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;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

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

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

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

.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: #e74c3c;
  color: var(--text-light);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
}

.page-index__btn-download,
.page-index__btn-review {
  width: 100%;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px var(--shadow-light);
  border: none;
  cursor: pointer;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Ensure long words break */
}

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

.page-index__btn-download:hover {
  background: #2a537f;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px var(--shadow-medium);
}

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

.page-index__btn-review:hover {
  background: #e6b800;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px var(--shadow-medium);
}

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

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

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

.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;
  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 */
.page-index__intro-section {
  padding: 60px 20px;
  text-align: center;
}

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

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

.page-index__section-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
  color: inherit; /* Inherit color from parent section */
}

.page-index__section-description {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 40px;
  color: inherit;
}

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

.page-index__feature-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background 0.3s ease;
  color: var(--text-light);
}

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

.page-index__feature-icon {
  width: 100px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

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

.page-index__feature-item p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-light);
}

/* Core Games Overview Section */
.page-index__games-overview-section {
  padding: 60px 20px;
  background-color: var(--background-light);
  text-align: center;
}

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

.page-index__game-category-card {
  background: var(--text-light);
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--shadow-light);
  padding: 25px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-dark);
  text-align: left;
}

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

.page-index__category-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.page-index__category-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-index__category-description {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.page-index__category-button {
  display: inline-block;
  background: var(--secondary-color);
  color: var(--text-dark);
  padding: 10px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.page-index__category-button:hover {
  background: #e6b800;
  transform: translateY(-2px);
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 60px 20px;
  text-align: center;
}

.page-index__promo-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: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  transition: transform 0.3s ease, background 0.3s ease;
  color: var(--text-light);
  text-align: left;
}

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

.page-index__promo-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

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

.page-index__promo-button {
  display: inline-block;
  background: var(--secondary-color);
  color: var(--text-dark);
  padding: 10px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.page-index__promo-button:hover {
  background: #e6b800;
  transform: translateY(-2px);
}

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

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

.page-index__blog-card {
  background: var(--text-light);
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
  overflow: hidden;
  color: var(--text-dark);
}

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

.page-index__blog-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

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

.page-index__blog-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

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

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

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

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

.page-index__view-all-button {
  background: var(--primary-color);
  color: var(--text-light);
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-light);
  border: none;
  cursor: pointer;
}

.page-index__view-all-button:hover {
  background: #2a537f;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow-medium);
}

/* 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 {
    flex-wrap: wrap;
    justify-content: center;
  }
  .page-index__game-card-segment {
    width: 100%;
    border-right: none;
    padding: 10px 0;
  }
  .page-index__segment-1 {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  .page-index__rank-badge {
    position: static;
    margin-right: 10px;
  }
  .page-index__game-icon {
    margin-top: 0;
  }
  .page-index__segment-2 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
  }
  .page-index__segment-3 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    width: 100%;
  }
  .page-index__segment-4 {
    width: 100%;
    padding-top: 15px;
  }
  .page-index__review-content-card {
    padding: 30px;
  }
  .page-index__section-title {
    font-size: 28px;
  }
  .page-index__section-description {
    font-size: 16px;
  }
  .page-index__feature-title {
    font-size: 20px;
  }
  .page-index__category-title {
    font-size: 22px;
  }
  .page-index__promo-title {
    font-size: 20px;
  }
  .page-index__blog-title {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: 140px; /* Mobile fixed header clearance */
    padding-bottom: 40px;
  }
  .page-index__hero-container {
    padding: 0 15px;
  }
  .page-index__hero-title {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .page-index__hero-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-index__hero-cta-group {
    flex-direction: column;
    gap: 15px;
  }
  .page-index__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    width: 100%;
    max-width: 300px; /* Limit button width on mobile */
    margin: 0 auto;
  }

  .page-index__game-leaderboard-section {
    padding: 40px 15px;
  }
  .page-index__page-title {
    font-size: 26px;
    margin-bottom: 30px;
  }
  .page-index__game-card {
    padding: 15px;
  }
  .page-index__segment-1, .page-index__segment-2, .page-index__segment-3, .page-index__segment-4 {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
  }
  .page-index__segment-1 {
    flex-direction: column;
    gap: 10px;
  }
  .page-index__rank-badge {
    position: static;
    margin-bottom: 10px;
  }
  .page-index__game-icon {
    max-width: 80px;
  }
  .page-index__game-name {
    font-size: 20px;
  }
  .page-index__game-description {
    font-size: 13px;
  }
  .page-index__stars, .page-index__rating-number {
    font-size: 16px;
  }
  .page-index__promotion-link {
    font-size: 13px;
  }
  .page-index__hot-badge {
    font-size: 11px;
    padding: 3px 6px;
  }
  .page-index__btn-download, .page-index__btn-review {
    padding: 10px 15px;
    font-size: 14px;
    max-width: 100%;
    width: 100%;
  }

  .page-index__review-content-section {
    padding: 30px 15px;
  }
  .page-index__review-content-card {
    padding: 25px;
  }
  .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__intro-section, .page-index__games-overview-section, .page-index__promotions-section, .page-index__latest-blog-section {
    padding: 40px 15px;
  }
  .page-index__section-title {
    font-size: 24px;
  }
  .page-index__section-description {
    font-size: 15px;
  }
  .page-index__features-grid, .page-index__game-categories, .page-index__promo-grid, .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-index__feature-icon {
    width: 80px;
  }
  .page-index__feature-title {
    font-size: 20px;
  }
  .page-index__category-image {
    height: 160px;
  }
  .page-index__category-title {
    font-size: 20px;
  }
  .page-index__promo-image {
    height: 150px;
  }
  .page-index__promo-title {
    font-size: 18px;
  }
  .page-index__blog-image {
    height: 180px;
  }
  .page-index__blog-title {
    font-size: 16px;
  }
  .page-index__view-all-button {
    padding: 12px 25px;
    font-size: 16px;
  }
}