/* style/index.css */
:root {
  --primary-color: #0A2463;
  --secondary-color: #FFD700;
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-light: #f1f3f5;
  --background-white: #ffffff;
  --border-light: #e4e4e4;
  --shadow-light: rgba(0, 0, 0, 0.1);
}

.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Text color for dark body background */
  background-color: var(--dark-bg-1); /* Assuming dark-bg-1 from shared.css is dark */
}

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

.page-index__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 20px;
  padding-top: 40px; /* Ensure space above title */
}

.page-index__section-description {
  font-size: 18px;
  color: #cccccc;
  text-align: center;
  margin-bottom: 60px;
}

/* 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-color: var(--primary-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: 48px;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

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

.page-index__cta-button {
  display: inline-block;
  padding: 18px 45px;
  background: linear-gradient(135deg, var(--secondary-color), #FFA500);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 10px;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  border: none;
}

.page-index__cta-button:hover {
  background: linear-gradient(135deg, #FFA500, #FFC107);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

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

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

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

.page-index__game-card {
  background: var(--background-white);
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--shadow-light);
  padding: 20px;
  display: flex;
  align-items: center;
  text-align: left;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.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) {
  border-left: 1px solid var(--border-light);
}

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

.page-index__rank-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-weight: bold;
  font-size: 20px;
  position: absolute;
  top: -10px;
  left: -10px;
  box-shadow: 0 2px 5px 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__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: 10px;
}

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

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

.page-index__game-name-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.page-index__game-name-link:hover {
  color: #0066cc;
  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: #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;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-index__game-rating {
  display: flex;
  align-items: 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;
  color: var(--text-dark);
  font-weight: bold;
}

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

.page-index__promotion-link {
  color: #0066cc;
  font-size: 14px;
  text-decoration: none;
  font-weight: bold;
}

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

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

.page-index__segment-4 {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

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

.page-index__btn-download {
  background: linear-gradient(135deg, var(--primary-color), #2c3e50);
  color: var(--text-light);
}

.page-index__btn-download:hover {
  background: linear-gradient(135deg, #2c3e50, var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

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

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

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

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

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

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

.page-index__review-content-card h3 {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-top: 30px;
  margin-bottom: 15px;
}

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

.page-index__review-body p strong {
    color: var(--primary-color);
}

/* Homepage Introduction Section */
.page-index__intro-section {
  padding: 80px 20px;
  background-color: var(--primary-color);
}

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

.page-index__intro-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__intro-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-index__intro-image {
  max-width: 180px;
  height: auto;
  margin: 0 auto 20px;
  display: block;
  border-radius: 8px;
}

.page-index__item-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

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

/* Core Games Showcase Section */
.page-index__games-showcase {
  padding: 80px 20px;
  background-color: var(--background-light);
}

.page-index__games-showcase .page-index__section-title {
  color: var(--primary-color);
}

.page-index__games-showcase .page-index__section-description {
  color: var(--text-dark);
}

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

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

.page-index__game-card-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-index__game-item-image {
  max-width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

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

.page-index__game-item-desc {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.page-index__game-item-button {
  display: inline-block;
  padding: 10px 25px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-index__game-item-button:hover {
  background: #FFA500;
  transform: translateY(-2px);
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 80px 20px;
  background-color: var(--primary-color);
}

.page-index__promotions-section .page-index__section-title {
  color: var(--secondary-color);
}

.page-index__promotions-section .page-index__section-description {
  color: var(--text-light);
}

.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: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-light);
}

.page-index__promo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

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

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

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

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

/* Blog Section */
.page-index__blog-section {
  padding: 80px 20px;
  background-color: var(--background-light);
}

.page-index__blog-section .page-index__section-title {
  color: var(--primary-color);
}

.page-index__blog-section .page-index__section-description {
  color: var(--text-dark);
}

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

.page-index__blog-card {
  background: var(--background-white);
  border-radius: 10px;
  box-shadow: 0 4px 10px var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-dark);
}

.page-index__blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-index__blog-image {
  max-width: 100%;
  height: 220px;
  object-fit: cover;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  display: block;
}

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

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

.page-index__blog-link {
  text-decoration: none;
  color: inherit;
}

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

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

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

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

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

.page-index__view-all-button:hover {
  background: #2c3e50;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__hero-title {
    font-size: 42px;
  }
  .page-index__hero-description {
    font-size: 20px;
  }
  .page-index__cta-button {
    padding: 15px 35px;
    font-size: 18px;
  }
  .page-index__game-card {
    flex-wrap: wrap;
    justify-content: center;
    padding: 15px;
  }
  .page-index__game-card-segment {
    width: 100%;
    padding: 10px 0;
    border-left: none !important;
    text-align: center;
  }
  .page-index__game-card-segment:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
  }
  .page-index__segment-1 {
    flex-direction: row;
    gap: 15px;
    width: auto;
    position: relative;
    top: auto;
    left: auto;
    justify-content: center;
  }
  .page-index__rank-badge {
    position: static;
    margin-right: 10px;
  }
  .page-index__game-icon {
    margin-top: 0;
  }
  .page-index__segment-2 {
    order: -1;
    margin-bottom: 15px;
  }
  .page-index__segment-3 {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
  }
  .page-index__segment-4 {
    width: 100%;
    flex-direction: row;
    gap: 15px;
  }
  .page-index__btn-download, .page-index__btn-review {
    flex: 1;
    font-size: 15px;
    padding: 12px;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: 140px !important; /* Mobile: Adjust based on fixed header height */
    padding-bottom: 40px;
  }
  .page-index__hero-title {
    font-size: 32px;
  }
  .page-index__hero-description {
    font-size: 18px;
  }
  .page-index__cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }
  .page-index__section-title {
    font-size: 28px;
    padding-top: 30px;
  }
  .page-index__section-description {
    font-size: 16px;
    margin-bottom: 40px;
  }
  .page-index__game-leaderboard-section,
  .page-index__review-content-section,
  .page-index__intro-section,
  .page-index__games-showcase,
  .page-index__promotions-section,
  .page-index__blog-section {
    padding: 40px 15px;
  }
  .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__intro-image {
    max-width: 150px;
  }
  .page-index__item-title,
  .page-index__promo-title,
  .page-index__blog-title {
    font-size: 20px;
  }
  .page-index__game-item-image,
  .page-index__promo-image,
  .page-index__blog-image {
    height: 160px;
  }
  .page-index__game-item-desc,
  .page-index__promo-desc,
  .page-index__blog-excerpt {
    font-size: 14px;
  }
  .page-index__game-item-button,
  .page-index__promo-button,
  .page-index__view-all-button {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  /* Mobile specific leaderboard adjustments */
  .page-index__game-card {
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
  }
  .page-index__game-card-segment {
    width: 100%;
    padding: 10px 0;
    border-left: none !important;
    border-bottom: 1px solid var(--border-light);
  }
  .page-index__game-card-segment:last-child {
    border-bottom: none;
  }
  .page-index__segment-1 {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding-top: 0;
    padding-bottom: 10px;
  }
  .page-index__rank-badge {
    width: 35px;
    height: 35px;
    font-size: 18px;
    position: static;
  }
  .page-index__game-icon {
    max-width: 80px;
  }
  .page-index__game-name {
    font-size: 20px;
  }
  .page-index__game-description {
    font-size: 13px;
  }
  .page-index__segment-3 {
    flex-direction: column;
    gap: 5px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .page-index__game-rating {
    margin-bottom: 5px;
  }
  .page-index__stars {
    font-size: 18px;
  }
  .page-index__rating-number {
    font-size: 16px;
  }
  .page-index__segment-4 {
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 0;
  }
  .page-index__btn-download,
  .page-index__btn-review {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 14px !important;
    padding: 10px 12px !important;
    white-space: normal;
    word-wrap: break-word;
    min-width: auto;
  }

  /* General mobile image and container responsiveness */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__intro-item,
  .page-index__game-card-item,
  .page-index__promo-card,
  .page-index__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Contrast Fixes */
.page-index__dark-bg {
  color: var(--text-light); /* Deep dark background with light text */
  background: var(--primary-color);
}

.page-index__light-bg {
  color: var(--text-dark); /* Light background with dark text */
  background: var(--background-white);
}

.page-index__medium-bg {
  color: var(--text-dark); /* Medium brightness background, default to dark text */
  background: var(--secondary-color);
}

.page-index__content-area, .page-index__text-block {
  color: var(--text-dark);
  background: var(--background-white);
}

.page-index p, .page-index li {
  color: inherit;
}

.page-index__card {
  background: var(--background-white);
  color: var(--text-dark);
  border: 1px solid var(--border-light);
}

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

.page-index__btn-primary {
  background: var(--primary-color);
  color: var(--text-light);
  border: 2px solid transparent;
}

.page-index__btn-secondary {
  background: var(--background-white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-index__contrast-fix {
  background: var(--background-white) !important;
  color: var(--text-dark) !important;
  border: 1px solid var(--border-light) !important;
}

.page-index__text-contrast-fix {
  color: var(--text-dark) !important;
  text-shadow: none !important;
}