/* style/index.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --dark-text: #333333;
  --light-text: #ffffff;
  --body-bg: #0a0a0a; /* From shared.css */
  --card-bg: #1a1a1a;
  --border-color: #333333;
  --hot-badge-bg: #FF4500;
  --login-button-bg: #EA7C07;
}

/* Base styles for the page content, adapting to dark body background */
.page-index {
  color: var(--light-text); /* Light text on dark body background */
  background-color: var(--body-bg);
}

.page-index h1, .page-index h2, .page-index h3, .page-index h4, .page-index h5, .page-index h6 {
  color: var(--light-text);
}

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

.page-index a:hover {
  text-decoration: underline;
  color: #5bc0de; /* Slightly lighter primary color on hover */
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-index__cta-button:hover {
  background: #5bc0de;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* HERO Main Image Area */
.page-index__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px);
  background-color: var(--body-bg);
}

.page-index__hero-container {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.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%;
  padding: 0 20px;
}

.page-index__hero-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--light-text);
}

.page-index__hero-description {
  font-size: 20px;
  margin-bottom: 40px;
  color: #cccccc;
  line-height: 1.6;
}

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

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

.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);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 20px;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.page-index__game-card-segment {
  padding: 0 20px;
  position: relative;
}

.page-index__game-card-segment:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 80%;
  background-color: var(--border-color);
}

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

.page-index__rank-badge {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 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: 4px;
}

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

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

.page-index__game-name-link {
  color: var(--light-text);
  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: #cccccc;
  font-weight: bold;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}

.page-index__game-description a {
  color: var(--primary-color);
  font-weight: bold;
}

.page-index__game-description a:hover {
  color: #5bc0de;
}

.page-index__segment-3 {
  flex-shrink: 0;
  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: 18px;
  margin-right: 5px;
  font-weight: bold;
}

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

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

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

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

.page-index__hot-badge {
  background-color: var(--hot-badge-bg);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 5px;
}

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

.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;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-download {
  background: linear-gradient(135deg, var(--login-button-bg), #FF8C00); /* Orange gradient for primary action */
  color: #ffffff;
}

.page-index__btn-download:hover {
  background: linear-gradient(135deg, #FF8C00, var(--login-button-bg));
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

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

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

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

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

.page-index__review-content-card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 40px;
  border: 1px solid var(--border-color);
  color: var(--light-text);
}

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

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

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

.page-index__review-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Homepage Introduction Section */
.page-index__intro-section {
  padding: 60px 20px;
  background-color: var(--body-bg);
  text-align: center;
}

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

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

.page-index__intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  background: var(--card-bg);
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
}

.page-index__intro-image {
  width: 100%;
  height: auto;
  max-width: 800px;
  border-radius: 8px;
  object-fit: cover;
}

.page-index__intro-text {
  text-align: left;
  color: #cccccc;
  line-height: 1.6;
}

.page-index__intro-text h3 {
  font-size: 24px;
  font-weight: bold;
  color: var(--light-text);
  margin-top: 20px;
  margin-bottom: 15px;
}

.page-index__intro-text p {
  margin-bottom: 15px;
  font-size: 16px;
}

.page-index__intro-button {
  margin-top: 20px;
  background: var(--login-button-bg);
}

.page-index__intro-button:hover {
  background: #FF8C00;
}

/* Core Games/Services Introduction Section */
.page-index__games-showcase-section {
  padding: 60px 20px;
  background-color: var(--body-bg);
  text-align: center;
}

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

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

.page-index__games-showcase-description {
  font-size: 18px;
  color: #cccccc;
  margin-bottom: 40px;
}

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

.page-index__game-card-item {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 25px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__game-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
}

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

.page-index__game-item-title a {
  color: var(--light-text);
  text-decoration: none;
}

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

.page-index__game-card-item p {
  font-size: 15px;
  color: #cccccc;
  line-height: 1.5;
  margin-bottom: 20px;
}

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

.page-index__game-item-button:hover {
  background: #5bc0de;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

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

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

.page-index__promotions-description {
  font-size: 18px;
  color: #cccccc;
  margin-bottom: 40px;
}

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

.page-index__promotion-card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 25px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__promotion-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
}

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

.page-index__promotion-card p {
  font-size: 15px;
  color: #cccccc;
  line-height: 1.5;
  margin-bottom: 20px;
}

.page-index__promotion-button {
  margin-top: 0;
  padding: 10px 25px;
  font-size: 16px;
  background: var(--login-button-bg);
}

.page-index__promotion-button:hover {
  background: #FF8C00;
}

.page-index__promotions-button-group {
  text-align: center;
}

.page-index__view-all-promos {
  background: var(--primary-color);
  margin-top: 0;
}

.page-index__view-all-promos:hover {
  background: #5bc0de;
}

/* Latest Blog Content Section */
.page-index__blog-section {
  padding: 60px 20px;
  background-color: var(--body-bg);
  text-align: center;
}

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

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

.page-index__blog-description {
  font-size: 18px;
  color: #cccccc;
  margin-bottom: 40px;
}

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

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

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

.page-index__blog-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
}

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

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

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

.page-index__blog-excerpt {
  font-size: 15px;
  color: #cccccc;
  line-height: 1.5;
  margin-bottom: 20px;
}

.page-index__blog-read-more {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
}

.page-index__blog-read-more:hover {
  background: #5bc0de;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-index__blog-button-group {
  text-align: center;
}

.page-index__view-all-news {
  background: var(--primary-color);
  margin-top: 0;
}

.page-index__view-all-news:hover {
  background: #5bc0de;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__game-card {
    flex-wrap: wrap;
    justify-content: center;
    padding: 15px;
  }

  .page-index__game-card-segment {
    padding: 10px;
    border-left: none !important;
    width: 100%;
  }

  .page-index__game-card-segment:not(:first-child)::before {
    display: none;
  }

  .page-index__segment-1, .page-index__segment-3, .page-index__segment-4 {
    width: 100%;
    text-align: center;
  }

  .page-index__segment-2 {
    order: -1; /* Move game name/description to top */
    margin-bottom: 15px;
  }

  .page-index__game-icon {
    margin-top: 10px;
  }

  .page-index__game-rating, .page-index__promotion-text {
    justify-content: center;
  }

  .page-index__btn-download, .page-index__btn-review {
    margin-left: auto;
    margin-right: auto;
    max-width: 250px;
  }
}

@media (max-width: 768px) {
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 30px;
  }

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

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

  .page-index__cta-button {
    padding: 12px 25px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-index__game-leaderboard-section, .page-index__review-content-section, .page-index__intro-section, .page-index__games-showcase-section, .page-index__promotions-section, .page-index__blog-section {
    padding: 20px 15px;
  }

  .page-index__page-title, .page-index__intro-title, .page-index__games-showcase-title, .page-index__promotions-title, .page-index__blog-title {
    font-size: 28px;
    margin-bottom: 25px;
  }

  .page-index__review-content-card, .page-index__intro-content, .page-index__game-card-item, .page-index__promotion-card, .page-index__blog-card {
    padding: 20px;
  }

  .page-index__review-title {
    font-size: 24px;
  }

  .page-index__review-body h3, .page-index__intro-text h3, .page-index__game-item-title, .page-index__promotion-card-title, .page-index__blog-card-title {
    font-size: 18px;
  }

  .page-index__review-body p, .page-index__intro-text p, .page-index__game-card-item p, .page-index__promotion-card p, .page-index__blog-excerpt {
    font-size: 14px;
  }

  .page-index__games-grid, .page-index__promotions-grid, .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-index__game-card-segment {
    width: 100%;
    padding: 0;
    text-align: center;
  }

  .page-index__segment-1 {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
  }

  .page-index__rank-badge {
    margin-right: 10px;
    margin-bottom: 0;
  }

  .page-index__game-icon {
    max-width: 80px;
    height: auto;
  }

  .page-index__segment-2 {
    order: -1;
    margin-bottom: 15px;
  }

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

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

  .page-index__segment-3 {
    width: 100%;
    margin-bottom: 15px;
  }

  .page-index__promotion-text {
    flex-direction: column;
    gap: 5px;
  }

  .page-index__segment-4 {
    width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-index__btn-download, .page-index__btn-review {
    font-size: 14px;
    padding: 10px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-index__promotions-button-group, .page-index__blog-button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__view-all-promos, .page-index__view-all-news {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px;
    font-size: 16px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Ensure all content containers are constrained */
  .page-index__hero-container,
  .page-index__game-leaderboard,
  .page-index__review-content-container,
  .page-index__intro-container,
  .page-index__games-showcase-container,
  .page-index__promotions-container,
  .page-index__blog-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }

  .page-index__hero-content {
    padding: 0 15px;
  }
}