/* style/index.css */

/* Biến CSS cho màu sắc */
:root {
  --primary-color: #B80F0A; /* Deep Red */
  --secondary-color: #FFD700; /* Gold */
  --text-color-dark-bg: #ffffff; /* White for dark backgrounds */
  --text-color-light-bg: #333333; /* Dark gray for light backgrounds */
  --background-color-page: #000000; /* Body background from shared.css */
  --background-color-card: #ffffff; /* White for cards */
  --border-color-light: #e0e0e0;
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-strong: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Base styles for the page content */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark-bg); /* Default text color for dark body background */
  background-color: var(--background-color-page); /* Ensure body background is respected */
}

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

.page-index h1,
.page-index h2,
.page-index h3 {
  color: var(--text-color-dark-bg);
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.3;
}

.page-index h1 {
  font-size: 3.2em;
  font-weight: 700;
  color: var(--secondary-color); /* Gold for main title */
}

.page-index h2 {
  font-size: 2.5em;
  font-weight: 700;
  margin-top: 40px;
  color: var(--text-color-dark-bg);
}

.page-index h3 {
  font-size: 1.8em;
  font-weight: 600;
  color: var(--primary-color);
}

.page-index p {
  margin-bottom: 15px;
  font-size: 1.1em;
  color: var(--text-color-dark-bg);
}

.page-index a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Shared Card Styles */
.page-index__card,
.page-index__promotion-card,
.page-index__blog-card {
  background: var(--background-color-card); /* White background for cards */
  color: var(--text-color-light-bg); /* Dark text for cards */
  border-radius: 8px;
  box-shadow: var(--shadow-light);
  padding: 25px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__card:hover,
.page-index__promotion-card:hover,
.page-index__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.page-index__card h3,
.page-index__promotion-card h3,
.page-index__blog-card h3 {
  color: var(--primary-color); /* Primary color for card titles */
  font-size: 1.5em;
  margin-top: 0;
  margin-bottom: 15px;
}

.page-index__card p,
.page-index__promotion-card p,
.page-index__blog-card p {
  color: var(--text-color-light-bg);
}

.page-index__card-image,
.page-index__promotion-image,
.page-index__blog-image,
.page-index__game-item-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 15px;
  border-radius: 4px;
  object-fit: cover;
}

/* CTA Button Styles */
.page-index__cta-button,
.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-index__cta-button {
  background: var(--primary-color);
  color: var(--text-color-dark-bg);
  margin-top: 20px;
}

.page-index__cta-button:hover {
  background: #a00d08;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.page-index__btn-primary {
  background: var(--primary-color);
  color: var(--text-color-dark-bg);
}

.page-index__btn-primary:hover {
  background: #a00d08;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

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

.page-index__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-color-dark-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* HERO Main Image Area */
.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: #000000; /* Ensure dark background */
  color: var(--text-color-dark-bg);
}

.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-content h1 {
  color: var(--secondary-color); /* Gold for hero title */
  margin-bottom: 15px;
  font-size: 3.5em;
}

.page-index__hero-content p {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto 25px auto;
  color: var(--text-color-dark-bg);
}

/* Module 1: Game Leaderboard */
.page-index__game-leaderboard-section {
  padding: 60px 20px;
  background: var(--background-color-page); /* Dark background for the section */
  color: var(--text-color-dark-bg);
}

.page-index__game-leaderboard-section .page-index__page-title {
  color: var(--secondary-color);
  font-size: 2.8em;
  margin-bottom: 40px;
}

.page-index__game-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1400px; /* Slightly wider than 1200px for better content display */
  margin: 0 auto;
}

.page-index__game-card {
  display: flex;
  align-items: center;
  background: var(--background-color-card);
  color: var(--text-color-light-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  padding: 20px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__game-card-segment {
  padding: 0 20px;
  border-left: 1px solid var(--border-color-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-shrink: 0;
}

.page-index__segment-1 {
  border-left: none; /* No left border for the first segment */
  padding-left: 0;
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.page-index__segment-2 {
  flex: 1; /* Main content column, takes available space */
  align-items: center;
  justify-content: center;
}

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

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

.page-index__rank-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: bold;
  font-size: 1.2em;
  position: relative;
  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); /* 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__rank-badge:not(.page-index__rank-1):not(.page-index__rank-2):not(.page-index__rank-3) {
  background: linear-gradient(135deg, #ff6b35, #ff8c42); /* Orange for 4+ */
}

.page-index__game-icon {
  max-width: 100px;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: contain;
}

.page-index__game-name {
  font-size: 1.8em;
  font-weight: bold;
  color: #000000;
  text-transform: uppercase;
  margin-bottom: 5px;
  text-align: center;
}

.page-index__game-name-link {
  color: #000000;
  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: 0.95em;
  color: #000000;
  font-weight: bold;
  text-align: center;
  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__game-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  gap: 5px;
}

.page-index__stars {
  color: var(--secondary-color);
  font-size: 1.2em;
  font-weight: bold;
}

.page-index__rating-number {
  font-size: 1.1em;
  font-weight: bold;
  color: var(--text-color-light-bg);
}

.page-index__promotion-text {
  font-size: 0.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

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

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

.page-index__hot-badge {
  background: #ff4d4d;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: bold;
  text-transform: uppercase;
}

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

.page-index__review-content-container {
  max-width: 1400px; /* Wider for better readability */
  margin: 0 auto;
}

.page-index__review-content-card {
  background: var(--background-color-card); /* White background */
  border-radius: 8px;
  box-shadow: var(--shadow-light);
  padding: 40px;
  color: var(--text-color-light-bg);
}

.page-index__review-content-card h2 {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 24px;
  text-align: center;
}

.page-index__review-content-card h3 {
  font-size: 1.8em;
  font-weight: bold;
  color: var(--primary-color);
  margin-top: 24px;
  margin-bottom: 12px;
  text-align: left; /* Align subheadings left within the card */
}

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

.page-index__review-body p {
  margin-bottom: 16px;
  font-size: 1.1em;
  color: var(--text-color-light-bg);
  text-align: left;
}

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

.page-index__review-body a:hover {
  color: #a00d08;
  text-decoration: underline;
}

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

.page-index__introduction-section h2 {
  color: var(--secondary-color);
}

.page-index__introduction-section p {
  max-width: 900px;
  margin: 0 auto 30px auto;
  text-align: center;
}

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

/* Module 3: Core Game/Service Introduction */
.page-index__games-section {
  padding: 60px 20px;
  background: var(--background-color-page); /* Dark background */
  color: var(--text-color-dark-bg);
}

.page-index__games-section h2 {
  color: var(--secondary-color);
}

.page-index__games-section p {
  max-width: 900px;
  margin: 0 auto 30px auto;
  text-align: center;
}

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

.page-index__game-item {
  background: var(--background-color-card);
  color: var(--text-color-light-bg);
  border-radius: 8px;
  box-shadow: var(--shadow-light);
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__game-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.page-index__game-item h3 {
  color: var(--primary-color);
  font-size: 1.4em;
  margin-top: 15px;
  margin-bottom: 10px;
}

.page-index__game-item p {
  font-size: 0.95em;
  color: var(--text-color-light-bg);
}

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

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

.page-index__promotions-section p {
  max-width: 900px;
  margin: 0 auto 30px auto;
  text-align: center;
}

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

.page-index__promotion-card h3 {
  color: var(--primary-color);
}

.page-index__promotion-card .page-index__btn-primary {
  margin-top: 20px;
}

/* Module 5: Latest Blog Content */
.page-index__blog-section {
  padding: 60px 20px;
  background: var(--background-color-page); /* Dark background */
  color: var(--text-color-dark-bg);
}

.page-index__blog-section h2 {
  color: var(--secondary-color);
}

.page-index__blog-section p {
  max-width: 900px;
  margin: 0 auto 30px auto;
  text-align: center;
}

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

.page-index__blog-card h3 {
  color: var(--primary-color);
}

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

.page-index__blog-card h3 a:hover {
  color: #a00d08;
  text-decoration: underline;
}

.page-index__blog-card .page-index__btn-secondary {
  margin-top: 20px;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__hero-content h1 {
    font-size: 3em;
  }
  .page-index__game-card {
    flex-wrap: wrap;
    padding: 15px;
  }
  .page-index__game-card-segment {
    border-left: none;
    padding: 10px 15px;
    width: 100%;
    text-align: center;
  }
  .page-index__segment-1 {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    width: 100%;
    padding-left: 0;
    top: 0; /* Reset position */
    left: 0; /* Reset position */
  }
  .page-index__rank-badge {
    position: static;
  }
  .page-index__segment-2 {
    order: -1; /* Move game name to top */
    padding-top: 0;
    margin-bottom: 10px;
  }
  .page-index__segment-3,
  .page-index__segment-4 {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
  }
  .page-index__segment-4 {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .page-index__btn-download, .page-index__btn-review {
    width: 80%;
  }
  .page-index__game-leaderboard-section .page-index__page-title {
    font-size: 2.2em;
  }
  .page-index__review-content-card h2 {
    font-size: 2em;
  }
  .page-index__review-content-card h3 {
    font-size: 1.6em;
  }
}

@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-content h1 {
    font-size: 2.2em;
  }
  .page-index__hero-content p {
    font-size: 1em;
  }
  .page-index__cta-button {
    padding: 12px 25px;
    font-size: 1em;
  }
  .page-index h1 {
    font-size: 2.5em;
  }
  .page-index h2 {
    font-size: 2em;
    margin-top: 30px;
  }
  .page-index h3 {
    font-size: 1.5em;
  }
  .page-index p {
    font-size: 1em;
  }

  .page-index__game-leaderboard-section {
    padding: 40px 15px;
  }
  .page-index__game-leaderboard-section .page-index__page-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-index__game-card {
    padding: 10px;
  }
  .page-index__game-card-segment {
    padding: 5px 10px;
  }
  .page-index__game-icon {
    max-width: 80px;
  }
  .page-index__game-name {
    font-size: 1.4em;
  }
  .page-index__game-description {
    font-size: 0.85em;
  }
  .page-index__stars {
    font-size: 1em;
  }
  .page-index__rating-number {
    font-size: 0.9em;
  }
  .page-index__promotion-text {
    font-size: 0.8em;
  }
  .page-index__btn-download,
  .page-index__btn-review {
    padding: 10px 15px;
    font-size: 0.9em;
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal;
    word-wrap: break-word;
    min-width: auto;
  }
  .page-index__segment-4 {
    padding-left: 10px;
    padding-right: 10px;
  }

  .page-index__review-content-section {
    padding: 30px 15px;
  }
  .page-index__review-content-card {
    padding: 25px 20px;
  }
  .page-index__review-content-card h2 {
    font-size: 1.8em;
  }
  .page-index__review-content-card h3 {
    font-size: 1.4em;
  }
  .page-index__review-body p {
    font-size: 1em;
  }

  .page-index__introduction-section,
  .page-index__games-section,
  .page-index__promotions-section,
  .page-index__blog-section {
    padding: 40px 15px;
  }
  .page-index__container {
    padding: 0 15px;
  }
  .page-index__grid-3,
  .page-index__games-grid,
  .page-index__promotions-grid,
  .page-index__blog-grid {
    gap: 20px;
  }

  /* Ensure all images are responsive and do not overflow */
  .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__promotion-card,
  .page-index__blog-card,
  .page-index__game-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__segment-1, .page-index__segment-2, .page-index__segment-3, .page-index__segment-4 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}