/* style/index.css */
:root {
  --primary-color: #007BFF;
  --secondary-color: #28A745;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --background-dark: #000000;
  --background-light: #f1f3f5;
  --card-background: #ffffff;
  --border-color: #e4e4e4;
}

.page-index {
  font-family: 'Arial', sans-serif;
  color: var(--text-color-light); /* Body background is dark, so text is light */
  line-height: 1.6;
  background-color: var(--background-dark);
}

/* Fixed nav bar spacing */
.page-index__hero-section {
  padding-top: 180px; /* Desktop: Adjust based on fixed header height */
  padding-bottom: 60px;
}

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

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

/* HERO Section */
.page-index__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.8), rgba(40, 167, 69, 0.8));
  overflow: hidden;
}

.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;
  z-index: 2;
}

.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 10px 30px rgba(0, 0, 0, 0.3);
}

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

.page-index__hero-content h1 {
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.page-index__hero-content p {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__cta-button {
  display: inline-block;
  padding: 18px 45px;
  background: var(--secondary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
  border: none;
}

.page-index__cta-button:hover {
  background: darken(var(--secondary-color), 10%); /* Dynamic darkening */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

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

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

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

.page-index__game-card-segment {
  padding: 0 20px;
  height: 100%; /* Ensure segments take full height for vertical lines */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-index__game-card-segment:not(:first-child) {
  border-left: 1px solid var(--border-color);
}

.page-index__segment-1 {
  flex-basis: 150px;
  min-width: 150px;
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 0;
  padding-right: 20px;
}

.page-index__rank-badge {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b35, #ff8c42); /* Default orange for 4+ */
  color: var(--text-color-light);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 1;
  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__game-icon {
  max-width: 100px;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 8px;
  object-fit: contain;
  padding-left: 10px;
}

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

.page-index__game-name {
  font-size: 26px;
  font-weight: bold;
  color: var(--text-color-dark);
  margin-bottom: 8px;
  text-transform: uppercase;
  line-height: 1.2;
}

.page-index__game-name-link {
  color: var(--text-color-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: 15px;
  color: var(--text-color-dark);
  font-weight: bold;
  text-align: center;
  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: darken(var(--primary-color), 10%);
  text-decoration: underline;
}

.page-index__segment-3 {
  flex-basis: 180px;
  min-width: 180px;
  text-align: center;
}

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

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

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

.page-index__promotion-text {
  font-size: 14px;
  color: var(--primary-color);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.page-index__promotion-link {
  color: var(--primary-color);
  text-decoration: none;
  margin-right: 5px;
  transition: color 0.3s ease;
}

.page-index__promotion-link:hover {
  color: darken(var(--primary-color), 10%);
  text-decoration: underline;
}

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

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

.page-index__btn-download,
.page-index__btn-review {
  display: block;
  width: 100%;
  padding: 12px 15px;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 16px;
  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;
}

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

.page-index__btn-download:hover {
  background: darken(var(--primary-color), 10%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

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

.page-index__btn-review:hover {
  background: darken(var(--secondary-color), 10%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

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

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

.page-index__review-content-card {
  background: var(--card-background);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 40px;
  color: var(--text-color-dark);
}

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

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

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

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

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

.page-index__intro-card {
  background: var(--card-background);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 40px;
  text-align: center;
  color: var(--text-color-dark);
}

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

.page-index__intro-card p {
  font-size: 17px;
  margin-bottom: 20px;
  line-height: 1.7;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__btn-primary {
  display: inline-block;
  padding: 14px 30px;
  background: var(--primary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  margin-top: 15px;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-index__btn-primary:hover {
  background: darken(var(--primary-color), 10%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

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

.page-index__core-games-card {
  background: var(--card-background);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 40px;
  text-align: center;
  color: var(--text-color-dark);
}

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

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

.page-index__game-type-item {
  background: #f8f8f8;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__game-type-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-index__game-type-icon {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 20px auto;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px;
}

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

.page-index__game-type-item p {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
  line-height: 1.6;
}

.page-index__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  background: var(--secondary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-index__btn-secondary:hover {
  background: darken(var(--secondary-color), 10%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.page-index__promotions-card {
  background: var(--card-background);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 40px;
  text-align: center;
  color: var(--text-color-dark);
}

.page-index__promotions-card h2 {
  font-size: 32px;
  font-weight: bold;
  color: var(--text-color-dark);
  margin-bottom: 30px;
}

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

.page-index__promotion-item {
  background: #f8f8f8;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__promotion-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-index__promotion-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 20px auto;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px;
}

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

.page-index__promotion-item p {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
  line-height: 1.6;
}

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

.page-index__blog-card {
  background: var(--card-background);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 40px;
  text-align: center;
  color: var(--text-color-dark);
}

.page-index__blog-card h2 {
  font-size: 32px;
  font-weight: bold;
  color: var(--text-color-dark);
  margin-bottom: 30px;
}

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

.page-index__blog-item {
  background: #f8f8f8;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
}

.page-index__blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-index__blog-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 20px;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px;
}

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

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

.page-index__blog-title-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__hero-content h1 {
    font-size: 40px;
  }
  .page-index__hero-content p {
    font-size: 18px;
  }
  .page-index__cta-button {
    padding: 15px 35px;
    font-size: 18px;
  }
  .page-index__page-title {
    font-size: 32px;
  }
  .page-index__game-name {
    font-size: 22px;
  }
  .page-index__game-description {
    font-size: 14px;
  }
  .page-index__btn-download, .page-index__btn-review {
    font-size: 15px;
    padding: 10px 12px;
  }
  .page-index__review-content-card h2, .page-index__intro-card h2, .page-index__core-games-card h2, .page-index__promotions-card h2, .page-index__blog-card h2 {
    font-size: 28px;
  }
  .page-index__review-content-card h3 {
    font-size: 22px;
  }
  .page-index__review-body p, .page-index__intro-card p, .page-index__game-type-item p, .page-index__promotion-item p, .page-index__blog-item p {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: 140px !important; /* Mobile: Adjust based on mobile fixed header height */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .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;
    margin-bottom: 30px;
  }
  .page-index__game-card {
    flex-wrap: wrap;
    padding: 15px;
    gap: 10px;
  }
  .page-index__game-card-segment {
    padding: 0 10px;
    border-left: none !important;
    width: 100%;
    flex-basis: auto;
    min-width: auto;
  }
  .page-index__segment-1 {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    margin-bottom: 10px;
  }
  .page-index__rank-badge {
    position: static;
    margin-right: 10px;
  }
  .page-index__game-icon {
    max-width: 80px;
    padding-left: 0;
  }
  .page-index__segment-2 {
    order: 1;
    width: 100%;
    margin-bottom: 10px;
  }
  .page-index__segment-3 {
    order: 2;
    width: 100%;
    margin-bottom: 10px;
  }
  .page-index__segment-4 {
    order: 3;
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }
  .page-index__btn-download, .page-index__btn-review {
    max-width: 100% !important;
    width: 100% !important;
    font-size: 13px !important;
    padding: 10px 10px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    min-width: auto !important;
  }
  .page-index__review-content-section, .page-index__intro-section, .page-index__core-games-section, .page-index__promotions-section, .page-index__blog-section {
    padding: 30px 15px;
  }
  .page-index__review-content-card, .page-index__intro-card, .page-index__core-games-card, .page-index__promotions-card, .page-index__blog-card {
    padding: 25px 20px;
  }
  .page-index__review-content-card h2, .page-index__intro-card h2, .page-index__core-games-card h2, .page-index__promotions-card h2, .page-index__blog-card h2 {
    font-size: 24px;
  }
  .page-index__review-content-card h3 {
    font-size: 20px;
  }
  .page-index__review-body p, .page-index__intro-card p, .page-index__game-type-item p, .page-index__promotion-item p, .page-index__blog-item p {
    font-size: 14px;
  }
  .page-index__game-types, .page-index__promotion-list, .page-index__blog-list {
    grid-template-columns: 1fr;
  }
  .page-index__game-type-icon, .page-index__promotion-image, .page-index__blog-image {
    min-width: 100% !important;
    min-height: auto !important;
  }
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__section,
  .page-index__card,
  .page-index__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Helper for darken function (not natively supported in pure CSS, but concept for AI) */
/* This would typically be handled by a preprocessor like SASS or dynamic JS */
/* For static CSS, values are hardcoded based on the desired effect */