/* style/index.css */
:root {
  --primary-color: #1E3A8A;
  --secondary-color: #F59E0B;
  --text-color-dark-bg: #ffffff;
  --text-color-light-bg: #333333;
  --bg-color-dark: #0a0a0a;
  --bg-color-light: #f1f3f5;
  --card-bg-light: #ffffff;
  --border-color-light: #e0e0e0;
}

.page-index {
  color: var(--text-color-dark-bg); /* Body background is dark, so text is light */
  background-color: var(--bg-color-dark); /* Should be inherited from shared.css body */
}

/* --- 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: var(--bg-color-dark); /* Inherit from body or specific dark bg */
}

.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: 48px;
  font-weight: bold;
  color: var(--text-color-dark-bg);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-index__hero-description {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.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: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

.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-light);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  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: 0 20px;
  border-left: 1px solid var(--border-color-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%; /* Ensure segments have equal height */
}

.page-index__segment-1 {
  border-left: none;
  padding-left: 0;
  width: 120px; /* Fixed width */
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-index__segment-2 {
  flex: 1; /* Stretch to fill available space */
  min-width: 200px; /* Minimum width for description */
}

.page-index__segment-3 {
  width: 180px; /* Fixed width */
  flex-shrink: 0;
}

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

.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: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.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__rank-badge:not(.page-index__rank-1):not(.page-index__rank-2):not(.page-index__rank-3) {
  background: linear-gradient(135deg, #ff6b35, #ff8c42); /* Orange for 4+ */
}

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

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

.page-index__game-name-link {
  color: var(--text-color-light-bg);
  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: var(--text-color-light-bg);
  font-weight: bold;
  text-align: center;
  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__game-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

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

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

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

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

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

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

.page-index__btn-primary {
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.page-index__btn-secondary {
  background: var(--card-bg-light);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.page-index__cta-button {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

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

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

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

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

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

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

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

.page-index__keyword {
  font-weight: bold;
  color: var(--primary-color);
}

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

.page-index__intro-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-color-dark); /* Ensure container has dark background for light text */
  padding: 20px;
  border-radius: 8px;
}

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

.page-index__intro-description {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
}

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

.page-index__intro-item {
  background: var(--card-bg-light);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: center;
  color: var(--text-color-light-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__intro-icon {
  max-width: 150px; /* Increased size */
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.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-light-bg);
}

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

.page-index__core-games-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-color-dark);
  padding: 20px;
  border-radius: 8px;
}

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

.page-index__core-games-description {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
}

.page-index__game-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
}

.page-index__tab-button {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color-dark-bg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px 25px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-index__tab-button:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.page-index__tab-button--active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
}

.page-index__game-panel {
  display: none;
  background: var(--card-bg-light);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 40px;
  color: var(--text-color-light-bg);
  text-align: center;
}

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

.page-index__game-image {
  max-width: 400px; /* Increased size */
  height: auto;
  border-radius: 8px;
  margin-bottom: 25px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index__game-panel p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Offers Section --- */
.page-index__offers-section {
  padding: 60px 20px;
  background: var(--bg-color-dark);
  color: var(--text-color-dark-bg);
}

.page-index__offers-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-color-dark);
  padding: 20px;
  border-radius: 8px;
}

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

.page-index__offers-description {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
}

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

.page-index__offer-card {
  background: var(--card-bg-light);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: center;
  color: var(--text-color-light-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__offer-image {
  max-width: 250px; /* Increased size */
  height: auto;
  margin-bottom: 20px;
  border-radius: 4px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index__offer-card p {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 25px;
  color: var(--text-color-light-bg);
}

.page-index__offer-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
}

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

.page-index__blog-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-color-dark);
  padding: 20px;
  border-radius: 8px;
}

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

.page-index__blog-description {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
}

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

.page-index__blog-post {
  background: var(--card-bg-light);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: left;
  color: var(--text-color-light-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-index__post-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  display: block;
}

.page-index__post-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

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

.page-index__post-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-index__post-summary {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-color-light-bg);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-index__read-more {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  align-self: flex-start;
}

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

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

.page-index__view-all-button:hover {
  background: var(--secondary-color);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-index__hero-title {
    font-size: 40px;
  }
  .page-index__hero-description {
    font-size: 18px;
  }
  .page-index__page-title,
  .page-index__intro-title,
  .page-index__core-games-title,
  .page-index__offers-title,
  .page-index__blog-title {
    font-size: 32px;
  }
  .page-index__game-card {
    flex-wrap: wrap;
    justify-content: center;
    padding: 15px;
  }
  .page-index__game-card-segment {
    border-left: none;
    padding: 10px 15px;
    width: 100%;
  }
  .page-index__segment-1,
  .page-index__segment-3,
  .page-index__segment-4 {
    width: 100%;
  }
  .page-index__segment-2 {
    min-width: unset;
  }
  .page-index__game-rating,
  .page-index__promotion-text {
    justify-content: center;
  }
  .page-index__game-icon {
    max-width: 80px;
  }
  .page-index__rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    margin-bottom: 0;
  }
  .page-index__review-content-card {
    padding: 30px;
  }
  .page-index__intro-grid,
  .page-index__offers-grid,
  .page-index__blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  .page-index__game-image {
    max-width: 300px;
  }
}

@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-title {
    font-size: 32px;
  }
  .page-index__hero-description {
    font-size: 16px;
  }
  .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__core-games-section,
  .page-index__offers-section,
  .page-index__blog-section {
    padding: 30px 15px;
  }

  .page-index__page-title,
  .page-index__intro-title,
  .page-index__core-games-title,
  .page-index__offers-title,
  .page-index__blog-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

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

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

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

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

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

  .page-index__game-name {
    font-size: 20px;
  }
  .page-index__game-description {
    font-size: 13px;
    line-height: 1.3;
  }

  .page-index__game-rating,
  .page-index__promotion-text {
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .page-index__stars {
    font-size: 18px;
  }

  .page-index__rating-number {
    font-size: 16px;
  }

  .page-index__promotion-link {
    font-size: 13px;
  }

  .page-index__segment-4 {
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .page-index__btn-download,
  .page-index__btn-review {
    max-width: 100% !important;
    width: 100% !important;
    font-size: 12px !important;
    padding: 8px 12px !important;
    white-space: normal;
    word-wrap: break-word;
    min-width: auto;
  }

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

  .page-index__intro-description,
  .page-index__core-games-description,
  .page-index__offers-description,
  .page-index__blog-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-index__intro-item,
  .page-index__offer-card,
  .page-index__blog-post {
    padding: 20px;
  }

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

  .page-index__intro-icon,
  .page-index__offer-image {
    max-width: 120px;
  }
  .page-index__game-tabs {
    flex-direction: column;
    align-items: center;
  }
  .page-index__tab-button {
    width: 80%;
  }
  .page-index__game-image {
    max-width: 250px;
  }
  .page-index__panel-title {
    font-size: 24px;
  }
  .page-index__game-panel p {
    font-size: 15px;
  }
  .page-index__post-image {
    height: 180px;
  }
  .page-index__post-title {
    font-size: 18px;
  }
  .page-index__post-summary {
    font-size: 14px;
  }
  .page-index__read-more {
    font-size: 14px;
    padding: 8px 15px;
  }
  .page-index__view-all-button {
    font-size: 16px;
    padding: 12px 25px;
  }

  /* Mobile image adaptation */
  .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-section,
  .page-index__game-leaderboard-section,
  .page-index__review-content-section,
  .page-index__intro-section,
  .page-index__core-games-section,
  .page-index__offers-section,
  .page-index__blog-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Contrast Fixes */
.page-index__dark-section {
  background: var(--bg-color-dark);
  color: var(--text-color-dark-bg);
}

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

.page-index__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-index__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}