/* style/index.css */

:root {
  --primary-color: #0A2239;
  --secondary-color: #FFD700;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f1f3f5;
  --border-light: #e4e4e4;
  --rank-gold-start: #FFD700;
  --rank-gold-end: #FFA500;
  --rank-silver-start: #C0C0C0;
  --rank-silver-end: #A0A0A0;
  --rank-bronze-start: #CD7F32;
  --rank-bronze-end: #B87333;
  --rank-default-start: #ff6b35;
  --rank-default-end: #ff8c42;
}

.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--background-light);
}

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

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

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

.page-index__section-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-index__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--secondary-color);
  border-radius: 2px;
}

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

.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);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.page-index__cta-button--secondary {
  background: var(--primary-color);
  color: var(--text-light);
  border: 2px solid var(--secondary-color);
}

.page-index__cta-button--secondary:hover {
  background: #1a3a5a;
  border-color: #e6c200;
}

.page-index__cta-button--small {
  padding: 10px 20px;
  font-size: 14px;
  margin-top: 20px;
}

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

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

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

/* 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), #2A4A6A);
}

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

.page-index__hero-description {
  font-size: 20px;
  color: #e0e0e0;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

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

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

.page-index__game-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px 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 8px 25px rgba(0, 0, 0, 0.15);
}

.page-index__game-card-segment {
  padding: 0 20px;
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%; /* Ensure segments take full height for vertical lines */
}

.page-index__game-card-segment:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background-color: var(--border-light);
}

.page-index__segment-1 {
  width: 150px;
  padding-left: 0;
  text-align: center;
}

.page-index__rank-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rank-default-start), var(--rank-default-end));
  color: var(--text-light);
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -10px;
  left: -10px;
  z-index: 1;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.page-index__rank-1 {
  background: linear-gradient(135deg, var(--rank-gold-start), var(--rank-gold-end));
}
.page-index__rank-2 {
  background: linear-gradient(135deg, var(--rank-silver-start), var(--rank-silver-end));
}
.page-index__rank-3 {
  background: linear-gradient(135deg, var(--rank-bronze-start), var(--rank-bronze-end));
}

.page-index__game-icon {
  max-width: 100px;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-top: 15px; /* Adjust if badge overlaps too much */
}

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

.page-index__game-name {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 8px;
  text-transform: uppercase;
  line-height: 1.2;
}

.page-index__game-name-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__game-name-link:hover {
  color: #0066cc;
  text-decoration: underline;
}

.page-index__game-description {
  font-size: 14px;
  color: var(--text-dark);
  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__segment-3 {
  width: 180px;
  text-align: center;
}

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

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

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

.page-index__promotion-text {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #0066cc;
  font-weight: bold;
}

.page-index__promotion-link {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-index__hot-badge {
  background: #ff4d4f;
  color: var(--text-light);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: bold;
  text-transform: uppercase;
}

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

.page-index__btn-download, .page-index__btn-review {
  width: 100%;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-download {
  background: var(--primary-color);
  color: var(--text-light);
}

.page-index__btn-download:hover {
  background: #1a3a5a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.page-index__btn-review {
  background: var(--secondary-color);
  color: var(--primary-color);
}

.page-index__btn-review:hover {
  background: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

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

.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-content-card h2 {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 24px;
  text-align: center;
  line-height: 1.3;
}

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

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

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

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

.page-index__intro-content {
  max-width: 900px;
  margin: 0 auto;
  font-size: 18px;
}

.page-index__intro-content p {
  margin-bottom: 20px;
  line-height: 1.7;
}

.page-index__intro-content .page-index__text-link {
  color: var(--secondary-color);
}

.page-index__intro-content .page-index__text-link:hover {
  color: #e6c200;
}

/* Core Games/Services Section */
.page-index__core-games-section {
  padding: 60px 20px;
  background: var(--background-light);
}

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

.page-index__game-type-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-index__game-type-card h3 {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-index__game-type-card p {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 60px 20px;
  background: var(--primary-color);
  color: var(--text-light);
}

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

.page-index__promo-card {
  background: #1a3a5a; /* Slightly lighter dark for cards */
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-index__promo-card h3 {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.page-index__promo-card p {
  font-size: 15px;
  color: #e0e0e0;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-index__promo-card .page-index__text-link {
  color: var(--secondary-color);
}

.page-index__promo-card .page-index__text-link:hover {
  color: #e6c200;
}

/* Latest Blog Content Section */
.page-index__blog-section {
  padding: 60px 20px;
  background: var(--background-light);
}

.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: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__blog-img {
  max-width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

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

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

.page-index__blog-link:hover {
  color: #0066cc;
  text-decoration: underline;
}

.page-index__blog-card p {
  font-size: 15px;
  color: #555555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-index__blog-date {
  font-size: 13px;
  color: #999999;
  font-style: italic;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__hero-title {
    font-size: 40px;
  }
  .page-index__hero-description {
    font-size: 18px;
  }
  .page-index__page-title {
    font-size: 32px;
  }
  .page-index__game-card {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  .page-index__game-card-segment {
    padding: 10px 15px;
    width: 100%;
    border-left: none !important;
  }
  .page-index__game-card-segment:not(:first-child)::before {
    display: none;
  }
  .page-index__segment-1, .page-index__segment-3, .page-index__segment-4 {
    width: auto;
  }
  .page-index__segment-1 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding-top: 20px;
    position: relative;
  }
  .page-index__rank-badge {
    position: static;
    margin-right: 15px;
    top: auto;
    left: auto;
    box-shadow: none;
  }
  .page-index__game-icon {
    margin-top: 0;
  }
  .page-index__segment-2 {
    order: -1; /* Move game name/desc to top */
  }
  .page-index__game-name {
    font-size: 22px;
  }
  .page-index__game-description {
    font-size: 13px;
  }
  .page-index__btn-download, .page-index__btn-review {
    padding: 10px 15px;
    font-size: 15px;
  }
  .page-index__promo-card h3, .page-index__game-type-card h3 {
    font-size: 20px;
  }
  .page-index__blog-card h3 {
    font-size: 18px;
  }
}

@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;
    margin-top: 20px;
  }
  .page-index__page-title {
    font-size: 28px;
    margin-bottom: 40px;
  }
  .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__blog-section {
    padding: 30px 15px;
  }
  .page-index__review-content-card {
    padding: 25px 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__game-card {
    padding: 15px;
    flex-direction: column;
    align-items: stretch;
  }
  .page-index__game-card-segment {
    width: 100% !important;
    padding: 10px 0 !important;
    border-left: none !important;
  }
  .page-index__game-card-segment:not(:first-child)::before {
    display: none;
  }
  .page-index__segment-1 {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding-top: 10px !important;
    margin-bottom: 10px;
  }
  .page-index__rank-badge {
    position: static;
    margin-right: 15px;
  }
  .page-index__game-icon {
    max-width: 80px;
    margin-top: 0;
  }
  .page-index__game-name {
    font-size: 20px;
    margin-top: 10px;
  }
  .page-index__game-description {
    font-size: 12px;
    line-height: 1.3;
  }
  .page-index__segment-3 {
    width: 100%;
    border-top: 1px solid var(--border-light);
    padding-top: 15px !important;
    margin-top: 15px;
  }
  .page-index__promotion-text {
    font-size: 13px;
  }
  .page-index__segment-4 {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-top: 1px solid var(--border-light);
    padding-top: 15px !important;
    margin-top: 15px;
  }
  .page-index__btn-download, .page-index__btn-review {
    font-size: 14px !important;
    padding: 10px 15px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    min-width: auto !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .page-index__game-types, .page-index__promo-grid, .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-index__game-type-img, .page-index__promo-img, .page-index__blog-img {
    height: 180px;
  }
  .page-index__game-type-card h3, .page-index__promo-card h3 {
    font-size: 20px;
  }
  .page-index__blog-card h3 {
    font-size: 18px;
  }
  .page-index__game-type-card p, .page-index__promo-card p, .page-index__blog-card p {
    font-size: 14px;
  }
}

/* Ensure all images are responsive and do not overflow */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
  box-sizing: border-box;
}

.page-index__section, .page-index__card, .page-index__container {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .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;
  }
}