/* style/index.css */

/* Biến CSS */
:root {
  --primary-color: #FFD700; /* Vàng */
  --secondary-color: #1E90FF; /* Xanh dương */
  --dark-text-color: #333333;
  --light-text-color: #ffffff;
  --light-bg-color: #f1f3f5;
  --card-bg-color: #ffffff;
  --border-color: #e0e0e0;
  --rank-1-gradient: linear-gradient(135deg, #FFD700, #FFA500); /* Vàng */
  --rank-2-gradient: linear-gradient(135deg, #C0C0C0, #A0A0A0); /* Bạc */
  --rank-3-gradient: linear-gradient(135deg, #CD7F32, #B87333); /* Đồng */
  --rank-default-gradient: linear-gradient(135deg, #ff6b35, #ff8c42); /* Cam */
}

.page-index {
  color: var(--light-text-color); /* Default text color for main content, assuming dark body bg */
  background-color: var(--dark-bg-1); /* This should come from shared.css */
}

/* 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 for fixed header */
  background-color: var(--dark-bg-1); /* Ensure consistent 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); /* Light text for dark background */
}

.page-index__hero-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color); /* Use primary color for title */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--light-text-color);
  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: var(--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: var(--light-bg-color); /* Light background for leaderboard */
  color: var(--dark-text-color); /* Dark text for light background */
}

.page-index__page-title {
  font-size: 32px;
  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: var(--card-bg-color);
  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 8px 20px rgba(0, 0, 0, 0.15);
}

.page-index__game-card-segment {
  padding: 0 20px;
  border-left: 1px solid var(--border-color);
  height: 100%; /* Ensure segments have consistent height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.page-index__segment-1 {
  border-left: none; /* No left border for the first segment */
  padding-left: 0;
  flex-basis: 150px; /* Fixed width for icon/badge */
  flex-shrink: 0;
  display: flex;
  flex-direction: row; /* Align badge and icon horizontally */
  align-items: center;
  gap: 10px; /* Space between badge and icon */
}

.page-index__rank-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light-text-color);
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
  position: relative; /* For precise positioning if needed */
}

.page-index__rank-1 {
  background: var(--rank-1-gradient);
}

.page-index__rank-2 {
  background: var(--rank-2-gradient);
}

.page-index__rank-3 {
  background: var(--rank-3-gradient);
}

.page-index__rank-badge:not(.page-index__rank-1):not(.page-index__rank-2):not(.page-index__rank-3) {
  background: var(--rank-default-gradient);
}

.page-index__game-icon {
  max-width: 80px; /* Adjusted from 100px to 80px for better fit */
  height: auto;
  display: block;
  border-radius: 4px;
  flex-shrink: 0;
}

.page-index__segment-2 {
  flex: 1; /* Main content column, takes remaining space */
  padding-left: 20px;
  padding-right: 20px;
}

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

.page-index__game-name-link {
  color: var(--dark-text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__game-name-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.page-index__game-description {
  font-size: 14px;
  color: var(--dark-text-color);
  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(--secondary-color);
  font-weight: bold;
  text-decoration: none;
}

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

.page-index__segment-3 {
  flex-basis: 180px; /* Fixed width for rating/promo text */
  flex-shrink: 0;
  padding-left: 20px;
  padding-right: 20px;
}

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

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

.page-index__rating-number {
  font-size: 16px;
  font-weight: bold;
}

.page-index__promotion-text {
  font-size: 14px;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-index__promotion-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
}

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

.page-index__hot-badge {
  background: #ff4d4d;
  color: var(--light-text-color);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
}

.page-index__segment-4 {
  flex-basis: 220px; /* Fixed width for buttons */
  flex-shrink: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-index__btn-download,
.page-index__btn-review {
  display: block;
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: none;
  white-space: normal;
  word-wrap: break-word;
  min-width: auto;
}

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

.page-index__btn-download:hover {
  background: darken(var(--primary-color), 10%); /* Placeholder for darker shade */
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

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

.page-index__btn-review:hover {
  background: darken(var(--secondary-color), 10%); /* Placeholder for darker shade */
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

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

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

.page-index__review-content-card {
  background: var(--card-bg-color);
  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(--dark-text-color);
  margin-bottom: 24px;
  text-align: center;
}

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

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

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

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

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

.page-index__intro-content {
  background: rgba(255, 255, 255, 0.05); /* Slightly transparent background */
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-index__intro-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color);
}

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

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

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

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

.page-index__feature-item img {
  max-width: 150px; /* Adjust image size for feature items */
  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(--primary-color);
}

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

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

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

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

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

.page-index__game-card-large {
  background: var(--card-bg-color);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--dark-text-color);
}

.page-index__game-card-large:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.page-index__game-image {
  max-width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index__game-card-large h3 a.page-index__game-link {
  color: var(--dark-text-color);
  text-decoration: none;
}

.page-index__game-card-large h3 a.page-index__game-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

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

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

.page-index__btn-detail:hover {
  background: darken(var(--secondary-color), 10%); /* Placeholder for darker shade */
  transform: translateY(-2px);
}

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

.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: 15px;
  color: var(--primary-color);
}

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

.page-index__promotions-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);
  padding: 25px;
  border-radius: 8px;
  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(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.page-index__promo-card img {
  max-width: 100%;
  height: 180px; /* Fixed height for promo images */
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-index__promo-card h3 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--primary-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(--primary-color);
  color: var(--light-text-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.page-index__promo-button:hover {
  background: darken(var(--primary-color), 10%); /* Placeholder for darker shade */
  transform: translateY(-2px);
}

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

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

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

.page-index__blog-subtitle {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 40px;
  color: var(--dark-text-color);
}

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

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

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

.page-index__blog-card img {
  max-width: 100%;
  height: 180px; /* Fixed height for blog images */
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 15px;
  display: block;
}

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

.page-index__blog-card h3 a.page-index__blog-link {
  color: var(--dark-text-color);
  text-decoration: none;
}

.page-index__blog-card h3 a.page-index__blog-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

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

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

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

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

.page-index__view-all-button:hover {
    background: darken(var(--secondary-color), 10%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* 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: 28px;
  }
  .page-index__game-card {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  .page-index__game-card-segment {
    border-left: none;
    padding: 10px 15px;
    width: 100%;
    flex-basis: auto;
  }
  .page-index__segment-1 {
    flex-direction: column;
    gap: 5px;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 10px;
  }
  .page-index__game-icon {
    max-width: 60px;
  }
  .page-index__segment-2,
  .page-index__segment-3,
  .page-index__segment-4 {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 10px;
  }
  .page-index__game-name,
  .page-index__game-description {
    text-align: center;
  }
  .page-index__segment-4 {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .page-index__btn-download, .page-index__btn-review {
    flex-grow: 1;
    max-width: 48%;
  }
  .page-index__intro-features, .page-index__games-grid, .page-index__promotions-grid, .page-index__blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@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-title {
    font-size: 32px;
  }
  .page-index__hero-description {
    font-size: 16px;
  }
  .page-index__cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }
  .page-index__page-title {
    font-size: 24px;
    margin-bottom: 30px;
  }
  .page-index__game-card {
    padding: 15px;
  }
  .page-index__segment-1 {
    margin-bottom: 15px;
  }
  .page-index__game-icon {
    max-width: 50px;
  }
  .page-index__game-name {
    font-size: 20px;
  }
  .page-index__game-description {
    font-size: 13px;
  }
  .page-index__segment-4 {
    padding-left: 10px;
    padding-right: 10px;
    flex-direction: column; /* Stack buttons vertically on small mobile */
    gap: 8px;
  }
  .page-index__btn-download,
  .page-index__btn-review {
    max-width: 100% !important;
    width: 100% !important;
    font-size: 12px;
    padding: 8px 12px;
    white-space: normal;
    word-wrap: break-word;
    min-width: auto;
  }
  .page-index__review-content-section,
  .page-index__intro-section,
  .page-index__games-section,
  .page-index__promotions-section,
  .page-index__blog-section {
    padding: 30px 15px;
  }
  .page-index__review-content-card,
  .page-index__intro-content,
  .page-index__game-card-large,
  .page-index__promo-card,
  .page-index__blog-card {
    padding: 20px;
  }
  .page-index__review-content-card h2,
  .page-index__intro-title,
  .page-index__games-title,
  .page-index__promotions-title,
  .page-index__blog-title {
    font-size: 24px;
  }
  .page-index__review-content-card h3,
  .page-index__feature-item h3,
  .page-index__game-card-large h3,
  .page-index__promo-card h3,
  .page-index__blog-card h3 {
    font-size: 18px;
  }
  .page-index__review-body p,
  .page-index__intro-description,
  .page-index__feature-item p,
  .page-index__game-card-large p,
  .page-index__promotions-subtitle,
  .page-index__promo-card p,
  .page-index__blog-subtitle,
  .page-index__blog-card p,
  .page-index__blog-date {
    font-size: 14px;
  }
  .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-container,
  .page-index__games-container,
  .page-index__promotions-container,
  .page-index__blog-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}