/* style/index.css */
:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --background-light: #f1f3f5;
  --background-card: #ffffff;
  --border-light: #e4e4e4;
  --shadow-light: 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(--text-color-light); /* Default to light text for dark body background */
  background-color: var(--dark-bg-1); /* Assuming --dark-bg-1 is dark from shared.css */
}

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

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

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

.page-index__text-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-index__text-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* CTA Button Base Style */
.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: linear-gradient(135deg, var(--primary-color), #FFA500);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
}

.page-index__cta-button:hover {
  background: linear-gradient(135deg, #FFA500, var(--secondary-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-index__main-cta {
  padding: 18px 45px;
  font-size: 20px;
}

.page-index__small-cta {
  padding: 10px 20px;
  font-size: 15px;
}

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

/* Color Contrast Specifics */
.page-index__dark-bg {
  background-color: var(--dark-bg-1);
  color: var(--text-color-light);
}

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

.page-index__card,
.page-index__intro-card,
.page-index__promotion-card,
.page-index__blog-card,
.page-index__game-card-small {
  background: var(--background-card);
  color: var(--text-color-dark);
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 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: linear-gradient(135deg, #FFD700, #8B0000);
  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;
}

.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%;
}

.page-index__hero-title {
  font-size: 48px;
  color: #ffffff;
  margin-bottom: 20px;
  font-weight: 900;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-index__hero-description {
  font-size: 22px;
  color: #f0f0f0;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-index__hero-link {
  color: #ffffff;
  text-decoration: underline;
  font-weight: bold;
}

.page-index__hero-link:hover {
  color: var(--primary-color);
}

.page-index__hero-cta {
  padding: 18px 50px;
  font-size: 22px;
}

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

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

.page-index__game-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1000px; /* Slightly wider than 1200px container for overall content, but leaderboard items max-width for readability */
  margin: 0 auto;
}

.page-index__game-card {
  display: flex;
  align-items: center;
  padding: 20px;
  background: var(--background-card);
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow-light);
  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: 0 20px;
  border-left: 1px solid var(--border-light);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

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

.page-index__segment-2 {
  flex: 1;
  min-width: 200px;
}

.page-index__segment-3 {
  min-width: 150px;
  flex-shrink: 0;
}

.page-index__segment-4 {
  min-width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.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;
  border-radius: 4px;
  margin-top: 10px; /* Space from rank badge */
}

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

.page-index__game-name-link {
  color: #000000;
  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;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.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__game-rating {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

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

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

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

.page-index__promotion-link {
  color: #0066cc;
  text-decoration: none;
  font-weight: bold;
}

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

.page-index__hot-badge {
  background: #ff4d4d;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.page-index__btn-download,
.page-index__btn-review {
  width: 100%;
  padding: 12px 15px;
  font-size: 16px;
  white-space: normal;
  word-wrap: break-word;
  min-width: auto;
}

.page-index__btn-review {
  background: linear-gradient(135deg, #6c757d, #495057);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-index__btn-review:hover {
  background: linear-gradient(135deg, #495057, #343a40);
}

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

.page-index__review-content-container {
  max-width: 1400px; /* Wider than leaderboard for better readability */
  margin: 0 auto;
}

.page-index__review-content-card {
  background: var(--background-card);
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow-light);
  padding: 40px;
}

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

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

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

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

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

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

.page-index__intro-card {
  padding: 30px;
  text-align: center;
}

.page-index__intro-icon {
  width: 120px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index__games-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.page-index__tab-button {
  background: #e0e0e0;
  color: var(--text-color-dark);
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.page-index__tab-button:hover {
  background: #d0d0d0;
}

.page-index__tab-button.active {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-index__tab-button.active:hover {
  background: var(--secondary-color);
}

.page-index__game-type-panel {
  display: none;
}

.page-index__game-type-panel.active {
  display: block;
}

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

.page-index__game-card-small {
  padding: 20px;
  text-align: center;
}

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

.page-index__game-type-description {
  font-size: 16px;
  color: var(--text-color-dark);
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.7;
}

.page-index__game-type-panel .page-index__main-cta {
  display: block;
  margin: 0 auto;
  max-width: 300px;
}

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

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

.page-index__promotion-card {
  padding: 25px;
  text-align: center;
}

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

.page-index__view-all-promotions {
  text-align: center;
  margin-top: 50px;
}

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

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

.page-index__blog-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

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

.page-index__blog-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-index__blog-card .page-index__card-title {
  font-size: 20px;
  text-align: left;
  margin-bottom: 10px;
}

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

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

.page-index__blog-excerpt {
  font-size: 15px;
  color: #555555;
  line-height: 1.5;
  margin-bottom: 15px;
  flex-grow: 1;
  text-align: left;
}

.page-index__blog-date {
  font-size: 13px;
  color: #888888;
  text-align: left;
}

.page-index__view-all-articles {
  text-align: center;
  margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__hero-title {
    font-size: 40px;
  }
  .page-index__hero-description {
    font-size: 20px;
  }
  .page-index__hero-cta {
    padding: 15px 40px;
    font-size: 20px;
  }
  .page-index__section-title {
    font-size: 30px;
  }
  .page-index__page-title {
    font-size: 28px;
  }
  .page-index__game-card {
    flex-wrap: wrap;
    padding: 15px;
  }
  .page-index__game-card-segment {
    padding: 10px;
    border-left: none;
    width: 100%;
    text-align: center;
  }
  .page-index__segment-1,
  .page-index__segment-3,
  .page-index__segment-4 {
    min-width: unset;
    max-width: 100%;
  }
  .page-index__rank-badge {
    position: static;
    margin: 0 auto 10px auto;
  }
  .page-index__game-icon {
    margin: 0 auto 10px auto;
  }
  .page-index__segment-2 {
    order: -1;
    margin-bottom: 10px;
  }
  .page-index__segment-4 {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }
  .page-index__btn-download,
  .page-index__btn-review {
    flex: 1 1 calc(50% - 5px);
    max-width: unset;
    font-size: 14px;
    padding: 10px 10px;
  }
  .page-index__intro-grid,
  .page-index__game-grid,
  .page-index__promotion-grid,
  .page-index__blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-index__review-content-card {
    padding: 30px;
  }
}

@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: 18px;
  }
  .page-index__hero-cta {
    padding: 12px 30px;
    font-size: 18px;
  }
  .page-index__container {
    padding: 30px 15px;
  }
  .page-index__section-title {
    font-size: 28px;
  }
  .page-index__page-title {
    font-size: 26px;
  }
  .page-index__game-card {
    flex-direction: column;
    align-items: stretch;
  }
  .page-index__game-card-segment {
    width: 100%;
    border-left: none;
    padding: 10px 0;
  }
  .page-index__segment-1,
  .page-index__segment-2,
  .page-index__segment-3,
  .page-index__segment-4 {
    border-bottom: 1px solid var(--border-light);
  }
  .page-index__segment-4 {
    border-bottom: none;
    padding-bottom: 0;
    flex-wrap: wrap;
    justify-content: center;
  }
  .page-index__btn-download,
  .page-index__btn-review {
    flex: 1 1 100%;
    max-width: 100% !important;
    width: 100% !important;
    font-size: 14px !important;
    padding: 8px 12px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    min-width: auto !important;
  }
  .page-index__game-name {
    font-size: 20px;
  }
  .page-index__game-description {
    font-size: 13px;
  }
  .page-index__intro-grid,
  .page-index__game-grid,
  .page-index__promotion-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr;
  }
  .page-index__review-content-card {
    padding: 24px 20px;
  }
  .page-index__review-title {
    font-size: 24px;
  }
  .page-index__review-content-card h3 {
    font-size: 18px;
  }
  .page-index__review-body p {
    font-size: 15px;
  }
  .page-index__intro-icon {
    width: 100px;
  }
  .page-index__tab-button {
    padding: 10px 18px;
    font-size: 14px;
  }
  .page-index__game-image,
  .page-index__promotion-image,
  .page-index__blog-image {
    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__review-content-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}