/* style/index.css */
:root {
  --primary-color: #0056B3;
  --secondary-color: #FFC107;
  --dark-text: #333333;
  --light-text: #ffffff;
  --border-color: #e0e0e0;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Base styles for the page content */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--light-text); /* Default for dark body background */
  background-color: var(--dark-bg-1); /* Inherited from shared.css */
}

/* --- Hero Section --- */
.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: linear-gradient(135deg, var(--primary-color), #003F80);
  color: var(--light-text);
}

.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-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--light-text);
}

.page-index__hero-description {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--light-text);
}

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

.page-index__cta-button:hover {
  background: #FFD740;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* --- Game Leaderboard Section --- */
.page-index__game-leaderboard-section {
  padding: 60px 20px;
  background: #f1f3f5; /* Light background for contrast */
  color: var(--dark-text);
}

.page-index__leaderboard-container {
  max-width: 1400px; /* Wider for better card display */
  margin: 0 auto;
}

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

.page-index__leaderboard-subtitle {
  font-size: 18px;
  color: #666666;
  text-align: center;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__game-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.page-index__game-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  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-left: 20px;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

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

.page-index__segment-1 {
  position: relative;
  min-width: 120px;
  max-width: 150px;
  padding-left: 0;
  padding-right: 20px;
  border-left: none;
}

.page-index__rank-badge {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b35, #ff8c42); /* Default for 4+ */
  color: var(--light-text);
  font-weight: bold;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.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__game-icon {
  max-width: 100px;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: contain;
}

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

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

.page-index__game-name-link {
  color: var(--dark-text);
  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: 14px;
  color: var(--dark-text);
  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;
}

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

.page-index__segment-3 {
  min-width: 180px;
  max-width: 200px;
}

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

.page-index__stars {
  color: var(--secondary-color);
  font-size: 20px;
  margin-right: 5px;
  font-weight: bold;
}

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

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

.page-index__promotion-link {
  color: var(--primary-color);
  font-size: 14px;
  text-decoration: none;
  font-weight: 600;
}

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

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

.page-index__segment-4 {
  min-width: 220px;
  max-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-index__cta-button {
  display: block;
  width: 100%;
  padding: 12px 15px;
  background: var(--primary-color);
  color: var(--light-text);
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border: none;
}

.page-index__cta-button:hover {
  background: #004499;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-index__btn-review {
  background: #6c757d;
}

.page-index__btn-review:hover {
  background: #5a6268;
}

/* --- Brand Review Content Section --- */
.page-index__review-content-section {
  padding: 60px 20px;
  background: #f1f3f5; /* Light background for contrast */
  color: var(--dark-text);
}

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

.page-index__review-content-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 40px;
}

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

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

.page-index__review-body p {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--dark-text);
}

/* --- Homepage Introduction Section --- */
.page-index__intro-section {
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--primary-color), #003F80); /* Dark background */
  color: var(--light-text);
  text-align: center;
}

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

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

.page-index__intro-description {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--light-text);
}

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

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

.page-index__intro-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.page-index__intro-icon {
  width: 100px;
  height: auto;
  margin-bottom: 20px;
  max-width: 100%; /* Ensure responsive */
  display: block;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index__intro-item p {
  font-size: 15px;
  color: #e0e0e0;
}

/* --- Core Games/Services Section --- */
.page-index__games-services-section {
  padding: 60px 20px;
  background: #f1f3f5; /* Light background */
  color: var(--dark-text);
  text-align: center;
}

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

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

.page-index__games-services-description {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #666666;
}

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

.page-index__game-service-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

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

.page-index__game-service-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  max-width: 100%; /* Ensure responsive */
}

.page-index__game-service-name {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--dark-text);
}

.page-index__game-service-card p {
  font-size: 16px;
  color: #666666;
}

/* --- Promotions Section --- */
.page-index__promotions-section {
  padding: 60px 20px;
  background: linear-gradient(135deg, #004499, var(--primary-color)); /* Dark background */
  color: var(--light-text);
  text-align: center;
}

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

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

.page-index__promotions-description {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #e0e0e0;
}

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

.page-index__promotion-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background 0.3s ease;
}

.page-index__promotion-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.page-index__promotion-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  max-width: 100%; /* Ensure responsive */
}

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

.page-index__promotion-card p {
  font-size: 15px;
  color: #e0e0e0;
  margin-bottom: 20px;
}

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

.page-index__promotion-button:hover {
  background: #FFD740;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* --- Latest Blog Content Section --- */
.page-index__blog-section {
  padding: 60px 20px;
  background: #f1f3f5; /* Light background */
  color: var(--dark-text);
}

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

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

.page-index__blog-description {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #666666;
  text-align: center;
}

.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: 12px;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

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

.page-index__blog-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  max-width: 100%; /* Ensure responsive */
}

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

.page-index__blog-card-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

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

.page-index__blog-summary {
  font-size: 15px;
  color: #666666;
  margin-bottom: 15px;
}

.page-index__blog-date {
  font-size: 13px;
  color: #999999;
  display: block;
  margin-bottom: 15px;
}

.page-index__blog-readmore {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
}

.page-index__blog-readmore:hover {
  text-decoration: underline;
}

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

.page-index__view-all-button {
    display: inline-block;
    padding: 15px 35px;
    background: var(--primary-color);
    color: var(--light-text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-index__view-all-button:hover {
    background: #004499;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-index__hero-title {
    font-size: 36px;
  }

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

  .page-index__cta-button {
    padding: 15px 35px;
    font-size: 18px;
  }

  .page-index__page-title,
  .page-index__review-title,
  .page-index__intro-title,
  .page-index__games-services-title,
  .page-index__promotions-title,
  .page-index__blog-title {
    font-size: 30px;
  }

  .page-index__leaderboard-subtitle,
  .page-index__intro-description,
  .page-index__games-services-description,
  .page-index__promotions-description,
  .page-index__blog-description {
    font-size: 16px;
  }

  .page-index__game-card {
    flex-wrap: wrap;
    justify-content: center;
    padding: 15px;
  }

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

  .page-index__game-card-segment:last-child {
    margin-bottom: 0;
  }

  .page-index__segment-1 {
    min-width: unset;
    max-width: 100%;
    flex-direction: row;
    gap: 15px;
  }

  .page-index__rank-badge {
    position: static;
    width: 28px;
    height: 28px;
    font-size: 16px;
    box-shadow: none;
  }

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

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

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

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

  .page-index__segment-3 {
    min-width: unset;
    max-width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
  }

  .page-index__game-rating {
    margin-bottom: 0;
  }

  .page-index__segment-4 {
    min-width: unset;
    max-width: 100%;
    flex-direction: row;
    gap: 10px;
  }

  .page-index__cta-button {
    font-size: 14px;
    padding: 10px 12px;
  }

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

  .page-index__review-subtitle,
  .page-index__intro-item-title,
  .page-index__game-service-name,
  .page-index__promotion-card-title,
  .page-index__blog-card-title {
    font-size: 20px;
  }

  .page-index__game-service-image,
  .page-index__promotion-image,
  .page-index__blog-image {
    height: 160px;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: 140px !important; /* Mobile: Adjust for fixed header */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-index__hero-image img {
    border-radius: 4px;
  }
  
  .page-index__hero-title {
    font-size: 28px;
  }
  
  .page-index__hero-description {
    font-size: 15px;
  }

  .page-index__cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }

  .page-index__page-title,
  .page-index__review-title,
  .page-index__intro-title,
  .page-index__games-services-title,
  .page-index__promotions-title,
  .page-index__blog-title {
    font-size: 26px;
  }

  .page-index__leaderboard-subtitle,
  .page-index__intro-description,
  .page-index__games-services-description,
  .page-index__promotions-description,
  .page-index__blog-description {
    font-size: 15px;
  }

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

  .page-index__game-card {
    padding: 10px;
    flex-direction: column;
    gap: 10px;
  }

  .page-index__game-card-segment {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 10px;
  }

  .page-index__segment-1 {
    flex-direction: column;
    gap: 10px;
  }

  .page-index__rank-badge {
    position: static;
    margin-bottom: 10px;
  }

  .page-index__game-icon {
    max-width: 70px;
  }

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

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

  .page-index__segment-3 {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
  }

  .page-index__game-rating {
    flex-direction: column;
    margin-bottom: 5px;
  }

  .page-index__segment-4 {
    flex-direction: column;
    gap: 8px;
  }

  .page-index__cta-button {
    font-size: 12px !important;
    padding: 8px 10px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    min-width: auto !important;
  }

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

  .page-index__review-subtitle,
  .page-index__intro-item-title,
  .page-index__game-service-name,
  .page-index__promotion-card-title,
  .page-index__blog-card-title {
    font-size: 18px;
  }

  .page-index__game-service-image,
  .page-index__promotion-image,
  .page-index__blog-image {
    height: 140px;
  }
  
  /* Force responsive images and containers */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__hero-container,
  .page-index__leaderboard-container,
  .page-index__review-content-container,
  .page-index__intro-container,
  .page-index__games-services-container,
  .page-index__promotions-container,
  .page-index__blog-container,
  .page-index__hero-section,
  .page-index__game-leaderboard-section,
  .page-index__review-content-section,
  .page-index__intro-section,
  .page-index__games-services-section,
  .page-index__promotions-section,
  .page-index__blog-section,
  .page-index__game-card,
  .page-index__intro-item,
  .page-index__game-service-card,
  .page-index__promotion-card,
  .page-index__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__game-card, .page-index__review-content-card, .page-index__intro-item, .page-index__game-service-card, .page-index__promotion-card, .page-index__blog-card {
      padding-left: 15px !important;
      padding-right: 15px !important;
  }
  .page-index__intro-grid, .page-index__games-grid, .page-index__promotions-grid, .page-index__blog-grid {
      gap: 20px;
  }
  .page-index__view-all-button {
      padding: 12px 25px;
      font-size: 16px;
  }
}