/* style/index.css */
:root {
  --primary-color: #007bff;
  --secondary-color: #28a745;
  --dark-bg-1: #0d0d0d; /* Giả định từ shared.css, dùng để thiết lập màu chữ tương phản */
  --light-text-color: #ffffff;
  --dark-text-color: #333333;
  --gray-border: #e4e4e4;
}

.page-index {
  color: var(--light-text-color); /* Body background là dark, nên dùng light text */
  background-color: var(--dark-bg-1);
}

/* HERO Section Styles */
.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(--dark-bg-1); /* Match body 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;
}

.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%;
  color: var(--light-text-color);
}

.page-index__hero-content h1 {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--light-text-color);
  font-weight: bold;
}

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

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  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: #218838; /* Darker secondary color */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

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

.page-index__page-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--dark-text-color);
  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: #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, 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;
  border-left: 1px solid var(--gray-border);
  height: 100%; /* Ensure segments have consistent height for vertical lines */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-index__segment-1 {
  border-left: none; /* No border on the very first segment */
  padding-left: 0;
  min-width: 120px; /* Fixed width for rank and icon */
  max-width: 150px;
  align-items: center;
  text-align: center;
  position: relative;
}

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

.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__game-icon {
  max-width: 100px;
  height: auto;
  display: block;
  margin-top: 20px; /* Space for badge */
  border-radius: 4px;
}

.page-index__segment-2 {
  flex: 1; /* Main content column, flexible width */
  text-align: center;
}

.page-index__game-name {
  font-size: 24px;
  font-weight: bold;
  color: #000000;
  margin-bottom: 5px;
  text-transform: uppercase;
  line-height: 1.2;
}

.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;
  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__segment-3 {
  min-width: 150px;
  max-width: 180px;
  text-align: center;
}

.page-index__game-rating {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 5px;
  font-size: 18px;
  color: #FFC107; /* Yellow stars */
}

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

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

.page-index__promotion-text {
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.page-index__promotion-link {
  color: var(--primary-color);
  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: #dc3545;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 5px;
  white-space: nowrap;
}

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

.page-index__cta-button {
  display: block;
  width: 100%;
  padding: 12px 15px;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Ensure long words break */
}

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

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

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

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

/* Brand Review Content Section */
.page-index__review-content-section {
  padding: 40px 20px;
  background: #f1f3f5; /* Light background for contrast */
}

.page-index__review-content-container {
  max-width: 1400px; /* Wider for better readability */
  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(--dark-text-color);
}

.page-index__review-content-card h2 {
  font-size: 28px;
  font-weight: bold;
  color: #333333;
  margin-bottom: 24px;
  text-align: center;
}

.page-index__review-content-card h3 {
  font-size: 20px;
  font-weight: bold;
  color: #333333;
  margin-top: 24px;
  margin-bottom: 12px;
}

.page-index__review-body {
  color: #333333;
  line-height: 1.7;
}

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

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

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

.page-index__intro-card {
  background: rgba(255, 255, 255, 0.05); /* Slightly transparent white for dark background */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  padding: 40px;
  text-align: center;
  color: var(--light-text-color);
}

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

.page-index__intro-card p {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 15px;
  color: var(--light-text-color);
}

.page-index__intro-features {
  display: flex;
  justify-content: space-around;
  gap: 30px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-index__feature-item {
  flex: 1 1 30%;
  min-width: 280px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--light-text-color);
}

.page-index__feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-index__feature-icon {
  width: 100px;
  height: auto;
  margin-bottom: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

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

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

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

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

.page-index__core-games-container h2 {
  font-size: 32px;
  font-weight: bold;
  color: var(--dark-text-color);
  margin-bottom: 20px;
}

.page-index__core-games-container p {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 40px;
  color: var(--dark-text-color);
}

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

.page-index__game-category-card {
  background: #ffffff;
  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;
  color: var(--dark-text-color);
}

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

.page-index__game-category-icon {
  width: 120px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index__game-category-card h3 a {
  color: var(--dark-text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__game-category-card h3 a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-index__game-category-card p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--dark-text-color);
}

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

.page-index__category-button:hover {
  background: #0056b3;
}

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

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

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

.page-index__promotions-container p {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 40px;
  color: var(--light-text-color);
}

.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.08);
  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;
  color: var(--light-text-color);
}

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

.page-index__promo-icon {
  width: 100px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

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

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

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

.page-index__promo-button:hover {
  background: #218838;
}

/* Latest News Section */
.page-index__latest-news-section {
  padding: 60px 20px;
  background: #f1f3f5; /* Light background for contrast */
  color: var(--dark-text-color);
}

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

.page-index__latest-news-container h2 {
  font-size: 32px;
  font-weight: bold;
  color: var(--dark-text-color);
  margin-bottom: 20px;
}

.page-index__latest-news-container p {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 40px;
  color: var(--dark-text-color);
}

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

.page-index__news-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--dark-text-color);
}

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

.page-index__news-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
}

.page-index__news-card h3 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--dark-text-color);
}

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

.page-index__news-card h3 a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-index__news-card p {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 10px;
  color: #555555;
}

.page-index__news-date {
  font-size: 14px;
  color: #888888;
}

.page-index__view-all-news {
  margin-top: 40px;
}

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

.page-index__view-all-button:hover {
  background: #0056b3;
}

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

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

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

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

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

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

  .page-index__segment-3 {
    min-width: 130px;
    max-width: 160px;
  }

  .page-index__segment-4 {
    min-width: 160px;
    max-width: 180px;
  }

  .page-index__cta-button {
    font-size: 14px;
    padding: 10px 12px;
  }

  .page-index__review-content-card h2,
  .page-index__intro-card h2,
  .page-index__core-games-container h2,
  .page-index__promotions-container h2,
  .page-index__latest-news-container h2 {
    font-size: 28px;
  }

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

  .page-index__intro-card p,
  .page-index__core-games-container p,
  .page-index__promotions-container p,
  .page-index__latest-news-container p {
    font-size: 17px;
  }

  .page-index__feature-item,
  .page-index__game-category-card,
  .page-index__promo-card,
  .page-index__news-card {
    flex: 1 1 45%;
  }
}

@media (max-width: 768px) {
  .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-section,
  .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__latest-news-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__hero-section {
    padding-top: 160px !important; /* Mobile: Adjust based on fixed header height */
    padding-bottom: 40px;
  }

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

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

  .page-index__cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }

  .page-index__page-title {
    font-size: 28px;
  }

  .page-index__game-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }

  .page-index__game-card-segment {
    width: 100%;
    border-left: none;
    padding: 10px 0;
    text-align: left;
    box-sizing: border-box;
  }

  .page-index__segment-1 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding-left: 0;
    min-width: auto;
    max-width: 100%;
    position: relative;
  }

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

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

  .page-index__segment-2 {
    padding-top: 15px;
    text-align: left;
  }

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

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

  .page-index__segment-3 {
    min-width: auto;
    max-width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
  }

  .page-index__game-rating,
  .page-index__promotion-text {
    justify-content: flex-start;
    margin-bottom: 0;
  }

  .page-index__segment-4 {
    min-width: auto;
    max-width: 100% !important;
    width: 100% !important;
    padding: 15px 10px 0 10px;
    box-sizing: border-box;
  }

  .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,
  .page-index__intro-card,
  .page-index__promo-card,
  .page-index__news-card {
    padding: 24px 20px;
  }

  .page-index__review-content-card h2,
  .page-index__intro-card h2,
  .page-index__core-games-container h2,
  .page-index__promotions-container h2,
  .page-index__latest-news-container h2 {
    font-size: 24px;
  }

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

  .page-index__review-body p,
  .page-index__intro-card p,
  .page-index__core-games-container p,
  .page-index__promotions-container p,
  .page-index__latest-news-container p {
    font-size: 15px;
  }

  .page-index__feature-item,
  .page-index__game-category-card,
  .page-index__promo-card,
  .page-index__news-card {
    flex: 1 1 100%;
    min-width: unset;
  }

  .page-index__news-image {
    height: 180px;
  }
}