/* style/index.css */
:root {
  --primary-color: #003366;
  --secondary-color: #FFD700;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f1f3f5;
  --border-light: #e4e4e4;
  --gradient-gold-1st: linear-gradient(135deg, #FFD700, #FFA500);
  --gradient-silver-2nd: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  --gradient-bronze-3rd: linear-gradient(135deg, #CD7F32, #B87333);
  --gradient-orange-default: linear-gradient(135deg, #ff6b35, #ff8c42);
}

.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default for dark body background */
  background-color: #000000; /* Inherited from shared.css body, for context */
}

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

.page-index__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-index__dark-bg-text {
  color: var(--text-light);
}

/* 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: var(--primary-color);
}

.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;
  color: var(--secondary-color);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

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

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

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

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

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

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

.page-index__game-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  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 6px 16px rgba(0, 0, 0, 0.15);
}

.page-index__game-card-segment {
  padding-left: 20px;
  padding-right: 20px;
  border-left: 1px solid var(--border-light);
  height: 100%; /* Ensure vertical line extends */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-index__segment-1 {
  border-left: none;
  padding-left: 0;
  min-width: 150px;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.page-index__rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #ffffff;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

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

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

.page-index__rank-badge:not(.page-index__rank-1):not(.page-index__rank-2):not(.page-index__rank-3) {
  background: var(--gradient-orange-default);
}

.page-index__game-icon {
  max-width: 100px;
  height: auto;
  display: block;
  margin-top: 10px;
  border-radius: 4px;
}

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

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

.page-index__game-name-link {
  text-decoration: none;
  color: inherit;
}

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

.page-index__game-description {
  font-size: 14px;
  color: #000000;
  font-weight: bold;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}

.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__segment-3 {
  min-width: 180px;
  max-width: 180px;
  text-align: center;
}

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

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

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

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

.page-index__promotion-link {
  color: #0066cc;
  text-decoration: none;
  margin-right: 5px;
}

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

.page-index__hot-badge {
  background: #ff4d4f;
  color: #ffffff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: bold;
}

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

.page-index__btn-download, .page-index__btn-review {
  width: 100%;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  color: var(--text-light);
  background: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

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

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

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

/* Brand Review Content Body (Module 1.5) */
.page-index__review-content-section {
  padding: 40px 20px;
  background: var(--background-light);
  color: var(--text-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;
}

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

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

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

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

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

/* Homepage Introduction (Module 2) */
.page-index__intro-section {
  padding: 60px 20px;
  text-align: center;
}

.page-index__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.page-index__dark-bg .page-index__section-title {
  color: var(--secondary-color);
}

.page-index__text-block {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index__feature-item {
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-dark);
}

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

.page-index__feature-icon {
  width: 100px;
  height: auto;
  margin-bottom: 15px;
}

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

.page-index__feature-item p {
  font-size: 15px;
  color: var(--text-dark);
}

/* Core Game/Service Introduction (Module 3) */
.page-index__games-intro-section {
  padding: 60px 20px;
  text-align: center;
}

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

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

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

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

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

.page-index__game-type-description {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.page-index__game-type-link {
  display: inline-block;
  padding: 10px 25px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-index__game-type-link:hover {
  background: #e0b800;
}

/* Promotional Activities (Module 4) */
.page-index__promotions-section {
  padding: 60px 20px;
  text-align: center;
}

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

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

.page-index__promotion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

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

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

.page-index__promotion-description {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.page-index__promotion-button {
  display: inline-block;
  padding: 10px 25px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

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

/* Latest Blog Content (Module 5) */
.page-index__blog-section {
  padding: 60px 20px;
  text-align: center;
}

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

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

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

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

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

.page-index__blog-link {
  text-decoration: none;
  color: inherit;
}

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

.page-index__blog-excerpt {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  -webkit-box-orient: vertical;
}

.page-index__blog-readmore {
  display: inline-block;
  color: #0066cc;
  text-decoration: none;
  font-weight: bold;
}

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

/* Responsive Design */
@media (max-width: 1440px) {
  .page-index__game-leaderboard {
    max-width: 1200px;
  }
}

@media (max-width: 1200px) {
  .page-index__hero-title {
    font-size: 38px;
  }
  .page-index__hero-description {
    font-size: 18px;
  }
  .page-index__page-title {
    font-size: 32px;
  }
  .page-index__review-title {
    font-size: 26px;
  }
  .page-index__section-title {
    font-size: 28px;
  }
  .page-index__text-block {
    font-size: 16px;
  }
}

@media (max-width: 992px) {
  .page-index__hero-title {
    font-size: 32px;
  }
  .page-index__hero-description {
    font-size: 16px;
  }
  .page-index__page-title {
    font-size: 28px;
  }
  .page-index__game-card {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  .page-index__game-card-segment {
    border-left: none;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    margin-bottom: 15px;
  }
  .page-index__segment-1, .page-index__segment-3, .page-index__segment-4 {
    min-width: unset;
    max-width: 100%;
  }
  .page-index__segment-1 {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
  }
  .page-index__rank-badge {
    position: static;
    margin-right: 15px;
  }
  .page-index__game-icon {
    margin-top: 0;
  }
  .page-index__segment-2, .page-index__segment-3, .page-index__segment-4 {
    border-top: 1px solid var(--border-light);
    padding-top: 15px;
  }
  .page-index__segment-4 {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }
  .page-index__btn-download, .page-index__btn-review {
    width: calc(50% - 5px);
    font-size: 13px;
    padding: 10px 15px;
  }
  .page-index__review-content-card {
    padding: 30px;
  }
  .page-index__feature-grid, .page-index__game-types-grid, .page-index__promotion-grid, .page-index__blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@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: 28px;
  }
  .page-index__hero-description {
    font-size: 15px;
  }
  .page-index__cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }
  .page-index__game-leaderboard-section,
  .page-index__review-content-section,
  .page-index__intro-section,
  .page-index__games-intro-section,
  .page-index__promotions-section,
  .page-index__blog-section {
    padding: 30px 15px;
  }
  .page-index__page-title {
    font-size: 24px;
    margin-bottom: 30px;
  }
  .page-index__game-card {
    padding: 15px;
  }
  .page-index__game-name {
    font-size: 20px;
  }
  .page-index__game-description {
    font-size: 13px;
  }
  .page-index__btn-download, .page-index__btn-review {
    width: 100%; /* Full width on small mobiles */
    font-size: 12px;
    padding: 8px 12px;
    white-space: normal;
    word-wrap: break-word;
    min-width: auto;
  }
  .page-index__segment-4 {
    padding-left: 10px;
    padding-right: 10px;
  }
  .page-index__review-content-card {
    padding: 20px;
  }
  .page-index__review-title {
    font-size: 22px;
  }
  .page-index__review-content-card h3 {
    font-size: 18px;
  }
  .page-index__review-body p {
    font-size: 14px;
  }
  .page-index__section-title {
    font-size: 24px;
  }
  .page-index__text-block {
    font-size: 15px;
  }
  .page-index__feature-grid, .page-index__game-types-grid, .page-index__promotion-grid, .page-index__blog-grid {
    grid-template-columns: 1fr;
  }
  .page-index__feature-item, .page-index__game-type-card, .page-index__promotion-card, .page-index__blog-card {
    padding: 20px;
  }
  .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;
  }
}

@media (max-width: 480px) {
  .page-index__hero-title {
    font-size: 24px;
  }
  .page-index__hero-description {
    font-size: 14px;
  }
  .page-index__cta-button {
    font-size: 14px;
    padding: 10px 25px;
  }
  .page-index__page-title {
    font-size: 20px;
  }
  .page-index__game-name {
    font-size: 18px;
  }
  .page-index__segment-4 {
    flex-direction: column;
    gap: 8px;
  }
  .page-index__btn-download, .page-index__btn-review {
    width: 100%;
  }
  .page-index__review-title {
    font-size: 20px;
  }
  .page-index__review-content-card h3 {
    font-size: 16px;
  }
  .page-index__section-title {
    font-size: 20px;
  }
  .page-index__feature-title, .page-index__game-type-title, .page-index__promotion-title, .page-index__blog-title {
    font-size: 18px;
  }
  .page-index__blog-image {
    height: 150px;
  }
}