/* style/index.css */
:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #1A202C; /* Dark Blue */
  --text-color-dark-bg: #ffffff; /* White for dark backgrounds */
  --text-color-light-bg: #333333; /* Dark gray for light backgrounds */
  --border-color-light: #e0e0e0;
  --background-dark: #121212; /* Body background from shared.css */
  --background-light: #f1f3f5;
  --gradient-gold: linear-gradient(135deg, #FFD700, #FFA500);
  --gradient-silver: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  --gradient-bronze: linear-gradient(135deg, #CD7F32, #B87333);
  --gradient-orange: linear-gradient(135deg, #ff6b35, #ff8c42);
}

.page-index {
  color: var(--text-color-dark-bg); /* Default text color for dark body background */
  background-color: var(--background-dark);
}

.page-index__dark-bg {
  background-color: var(--secondary-color);
  color: var(--text-color-dark-bg);
}

.page-index__light-bg {
  background-color: #ffffff;
  color: var(--text-color-light-bg);
}

/* 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-color: var(--secondary-color); /* Dark blue 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;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-index__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 30px;
  border-radius: 8px;
  background: rgba(26, 32, 44, 0.85); /* Slightly transparent dark background */
  color: var(--text-color-dark-bg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-index__hero-title {
  font-size: 42px;
  font-weight: bold;
  color: var(--primary-color); /* Gold title */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-index__hero-description {
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--text-color-dark-bg);
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--gradient-gold); /* Gold gradient button */
  color: var(--secondary-color); /* Dark text on gold */
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-index__cta-button:hover {
  background: var(--gradient-orange); /* Orange gradient on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  color: #ffffff;
}

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

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

.page-index__leaderboard-intro {
  font-size: 18px;
  margin-bottom: 40px;
  color: var(--text-color-dark-bg);
}

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

.page-index__game-card {
  display: flex;
  align-items: stretch; /* Ensure segments stretch to full height */
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  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 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  border-left: 1px solid var(--border-color-light);
}

.page-index__segment-1 {
  border-left: none; /* No border on the very first segment */
  padding-left: 0;
  flex-basis: 150px; /* Fixed width for first segment */
  flex-shrink: 0;
}

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

.page-index__segment-3 {
  flex-basis: 180px; /* Fixed width for rating/promo segment */
  flex-shrink: 0;
}

.page-index__segment-4 {
  flex-basis: 220px; /* Fixed width for buttons segment */
  flex-shrink: 0;
  padding-right: 0;
  gap: 10px;
}

.page-index__rank-badge {
  width: 28px;
  height: 28px;
  background: var(--gradient-orange);
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.page-index__game-card-segment:first-child {
  position: relative;
}

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

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

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

.page-index__game-icon {
  max-width: 100px;
  height: auto;
  display: block;
  margin-top: 15px; /* Adjust spacing from badge */
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.page-index__game-name {
  font-size: 24px;
  font-weight: bold;
  color: #000000;
  margin-bottom: 8px;
  text-align: center;
}

.page-index__game-name-link {
  color: inherit;
  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;
  text-align: center;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.page-index__game-description a {
  color: #0066cc;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.page-index__stars {
  color: var(--primary-color); /* Gold stars */
  font-size: 18px;
  font-weight: bold;
}

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

.page-index__promotion-text {
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-index__promotion-link {
  color: #0066cc;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  transition: color 0.3s ease;
}

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

.page-index__hot-badge {
  background: #E53E3E; /* Red Hot badge */
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
}

.page-index__btn-download,
.page-index__btn-review {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  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);
}

.page-index__btn-download {
  background: var(--gradient-gold);
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.page-index__btn-download:hover {
  background: var(--gradient-orange);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

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

.page-index__btn-review:hover {
  background: #0d1118; /* Darker secondary color */
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

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

.page-index__review-content-container {
  max-width: 1400px;
  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(--text-color-light-bg);
}

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

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

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

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

.page-index__review-body strong {
  color: var(--secondary-color);
}

.page-index__review-body a {
  color: #0066cc;
  text-decoration: none;
  font-weight: bold;
}

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

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

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

.page-index__section-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 40px;
}

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

.page-index__intro-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.page-index__intro-item:hover {
  transform: translateY(-5px);
}

.page-index__intro-image {
  max-width: 150px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.page-index__item-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

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

/* Core Games/Service Introduction Section */
.page-index__core-games-section {
  padding: 60px 20px;
  background-color: var(--background-dark);
  text-align: center;
}

.page-index__games-carousel {
  display: flex;
  overflow-x: auto; /* Enable horizontal scrolling */
  gap: 20px;
  padding-bottom: 20px; /* Space for scrollbar */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: var(--primary-color) var(--secondary-color); /* Firefox */
}

.page-index__games-carousel::-webkit-scrollbar {
  height: 8px;
}

.page-index__games-carousel::-webkit-scrollbar-track {
  background: var(--secondary-color);
  border-radius: 10px;
}

.page-index__games-carousel::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 10px;
  border: 2px solid var(--secondary-color);
}

.page-index__game-card-lg {
  flex: 0 0 300px; /* Fixed width for large game cards */
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 25px;
  text-align: center;
  color: var(--text-color-light-bg);
}

.page-index__game-img {
  max-width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.page-index__game-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.page-index__game-description {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.page-index__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: var(--gradient-gold);
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-index__btn-primary:hover {
  background: var(--gradient-orange);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

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

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

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

.page-index__promotion-card:hover {
  transform: translateY(-5px);
}

.page-index__promo-img {
  max-width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.page-index__promo-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.page-index__promo-description {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

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

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

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

.page-index__blog-card:hover {
  transform: translateY(-5px);
}

.page-index__blog-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-index__blog-content {
  padding: 25px;
}

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

.page-index__blog-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-index__blog-excerpt {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

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

.page-index__btn-secondary:hover {
  background: #0d1118;
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__game-card {
    flex-wrap: wrap;
    padding: 15px;
  }
  .page-index__segment-1, .page-index__segment-3, .page-index__segment-4 {
    flex-basis: auto;
    width: 100%;
    border-left: none;
    padding: 10px 0;
  }
  .page-index__segment-1 {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
  }
  .page-index__game-icon {
    margin-top: 0;
    margin-left: 15px;
  }
  .page-index__segment-2 {
    width: 100%;
    border-left: none;
    padding: 10px 0;
  }
  .page-index__segment-4 {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    padding-left: 0;
  }
  .page-index__btn-download, .page-index__btn-review {
    flex: 1;
    max-width: 180px;
  }
}

@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: 28px;
  }

  .page-index__leaderboard-intro {
    font-size: 16px;
  }

  .page-index__game-card {
    flex-direction: column;
    align-items: center;
    padding: 15px;
  }
  
  .page-index__game-card-segment {
    width: 100%;
    border-left: none;
    padding: 10px 0;
  }
  
  .page-index__segment-1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
  }

  .page-index__rank-badge {
    position: static;
    transform: none;
    margin-bottom: 10px;
  }
  
  .page-index__game-icon {
    margin-left: 0;
  }

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

  .page-index__game-description {
    font-size: 13px;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

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

  .page-index__segment-4 {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

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

  .page-index__review-content-section {
    padding: 20px 15px;
  }
  
  .page-index__review-content-card {
    padding: 24px 20px;
  }
  
  .page-index__review-heading {
    font-size: 24px;
  }
  
  .page-index__review-content-card h3 {
    font-size: 18px;
  }
  
  .page-index__review-body p {
    font-size: 15px;
  }

  .page-index__intro-section, .page-index__core-games-section, .page-index__promotions-section, .page-index__latest-blog-section {
    padding: 40px 15px;
  }

  .page-index__section-title {
    font-size: 26px;
  }

  .page-index__intro-grid, .page-index__promotions-grid, .page-index__blog-grid {
    grid-template-columns: 1fr;
  }

  .page-index__intro-image {
    max-width: 120px;
  }

  .page-index__item-title {
    font-size: 20px;
  }

  .page-index__games-carousel {
    padding-bottom: 15px;
  }

  .page-index__game-card-lg {
    flex: 0 0 280px;
    padding: 20px;
  }

  .page-index__game-img {
    height: 150px;
  }

  .page-index__blog-img {
    height: 180px;
  }

  .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-container,
  .page-index__review-content-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }
  .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-blog-section {
    padding-left: 15px;
    padding-right: 15px;
  }
}