/* style/index.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #0056b3; /* Darker shade for hover */
  --accent-color: #EA7C07; /* Login button color */
  --text-light-color: #ffffff;
  --text-dark-color: #333333;
  --background-dark: #0a0a0a; /* Body background from shared.css */
}

.page-index {
  color: var(--text-light-color); /* Body background is dark, so text is light */
  background-color: var(--background-dark);
}

.page-index__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
}

.page-index__video-container {
  position: relative;
  width: 100%; /* Important for desktop flex layout */
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.page-index__video-link {
  display: block;
  text-decoration: none;
  position: relative;
  width: 100%;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__video-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-index__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.page-index__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none; /* Prevents video controls from blocking click */
}

.page-index__video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.page-index__video-link:hover .page-index__video-overlay {
  opacity: 1;
}

.page-index__video-click-hint {
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  padding: 10px 20px;
  background: rgba(38, 169, 224, 0.8); /* Using primary color */
  border-radius: 5px;
  white-space: nowrap;
}

.page-index__video-cta {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}

.page-index__play-now-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--accent-color); /* Login button color */
  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;
  cursor: pointer;
}

.page-index__play-now-button:hover {
  background: #c76706; /* Slightly darker accent color */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-index__play-now-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Title Section */
.page-index__title-section {
  padding: 80px 20px;
  text-align: center;
  background-color: var(--background-dark);
  color: var(--text-light-color);
}

.page-index__title-container {
  max-width: 900px;
  margin: 0 auto;
}

.page-index__main-title {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive H1 font size */
}

.page-index__title-description {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.8);
}

.page-index__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__cta-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

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

.page-index__cta-button--secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
}

/* About Section (Brand Introduction) */
.page-index__about-section {
  padding: 80px 20px;
  text-align: center;
}

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

.page-index__about-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 40px;
  color: #ffffff;
}

.page-index__about-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
}

.page-index__about-content p {
  font-size: 1.1em;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
  max-width: 800px;
}

.page-index__about-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  margin: 20px 0;
  object-fit: cover;
}

/* Games Section */
.page-index__games-section {
  padding: 80px 20px;
  text-align: center;
  background-color: var(--background-dark);
  color: var(--text-light-color);
}

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

.page-index__games-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-index__games-description {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 50px;
  color: rgba(255, 255, 255, 0.8);
}

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

.page-index__game-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-index__game-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-index__game-card-title {
  font-size: 1.4em;
  font-weight: 600;
  margin: 20px 15px 10px;
  color: var(--primary-color);
}

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

.page-index__game-card-title a:hover {
  color: var(--secondary-color);
}

.page-index__game-card-text {
  font-size: 1em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  padding: 0 15px 20px;
  flex-grow: 1;
}

/* Why Choose Us Section */
.page-index__why-choose-us-section {
  padding: 80px 20px;
  text-align: center;
}

.page-index__why-choose-us-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-index__why-choose-us-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-index__why-choose-us-description {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 50px;
  color: rgba(255, 255, 255, 0.8);
}

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

.page-index__feature-item {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-index__feature-item:hover {
  transform: translateY(-5px);
  background-color: rgba(38, 169, 224, 0.1);
}

.page-index__feature-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
}

.page-index__feature-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-index__feature-text {
  font-size: 1em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  flex-grow: 1;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 80px 20px;
  text-align: center;
  background-color: var(--background-dark);
  color: var(--text-light-color);
}

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

.page-index__promotions-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-index__promotions-description {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 50px;
  color: rgba(255, 255, 255, 0.8);
}

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

.page-index__promotion-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-index__promotion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-index__promotion-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-index__promotion-card-title {
  font-size: 1.4em;
  font-weight: 600;
  margin: 20px 15px 10px;
  color: var(--primary-color);
}

.page-index__promotion-card-text {
  font-size: 1em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  padding: 0 15px;
  flex-grow: 1;
}

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

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

/* FAQ Section */
.page-index__faq-section {
  padding: 80px 20px;
  background-color: var(--background-dark);
  color: var(--text-light-color);
}

.page-index__faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.page-index__faq-main-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
  color: #ffffff;
}

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

details.page-index__faq-item summary.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

details.page-index__faq-item summary.page-index__faq-question::-webkit-details-marker {
  display: none;
}

details.page-index__faq-item summary.page-index__faq-question:hover {
  background: rgba(255, 255, 255, 0.15);
}

.page-index__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #ffffff;
}

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
  transition: transform 0.3s ease;
}

details.page-index__faq-item[open] .page-index__faq-toggle {
  transform: rotate(45deg);
}

details.page-index__faq-item .page-index__faq-answer {
  padding: 0 20px 20px;
  background: rgba(0, 0, 0, 0.2); /* Darker background for answer */
  border-radius: 0 0 8px 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1em;
  line-height: 1.6;
}

/* Brand Introduction Section */
.page-index__brand-intro-section {
  padding: 80px 20px;
  text-align: center;
}

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

.page-index__brand-intro-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 40px;
  color: #ffffff;
}

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

.page-index__brand-intro-item {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
  height: 100%;
}

.page-index__brand-intro-subtitle {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-index__brand-intro-item p {
  font-size: 1em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

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

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

.page-index__blog-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  color: #ffffff;
}

.page-index__blog-description {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 50px;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
}

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

.page-index__blog-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-index__blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-index__blog-item-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-index__blog-item-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-index__blog-item-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--primary-color);
}

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

.page-index__blog-item-title a:hover {
  color: var(--secondary-color);
}

.page-index__blog-item-excerpt {
  font-size: 1em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-index__blog-item-date {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.6);
  text-align: right;
  display: block;
}

/* Reusable Dark Section Class */
.page-index__dark-section {
  background-color: var(--background-dark);
  color: var(--text-light-color);
}

/* Global image reset for content area */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Ensures images fill their space without distortion */
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
  .page-index__games-title, .page-index__why-choose-us-title, .page-index__promotions-title, .page-index__faq-main-title, .page-index__brand-intro-title, .page-index__blog-title {
    font-size: 2em;
  }
  .page-index__main-title {
    font-size: clamp(1.8em, 5vw, 3em);
  }
}

@media (max-width: 768px) {
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-index__video-section,
  .page-index__title-section,
  .page-index__about-section,
  .page-index__games-section,
  .page-index__why-choose-us-section,
  .page-index__promotions-section,
  .page-index__faq-section,
  .page-index__brand-intro-section,
  .page-index__blog-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* body handles --header-offset, small top padding for sections */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  
  .page-index__video-container,
  .page-index__video-link,
  .page-index__video-wrapper,
  .page-index__title-container,
  .page-index__about-container,
  .page-index__games-container,
  .page-index__why-choose-us-container,
  .page-index__promotions-container,
  .page-index__faq-container,
  .page-index__brand-intro-container,
  .page-index__blog-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow-x: hidden !important;
  }

  .page-index__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain; /* Ensure full video is visible */
  }

  .page-index__video-cta {
    margin-top: 20px;
    padding: 0 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .page-index__play-now-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-index__video-click-hint {
    font-size: 14px !important;
    padding: 8px 16px !important;
  }

  .page-index__main-title {
    font-size: clamp(1.5em, 7vw, 2.5em);
  }

  .page-index__title-description {
    font-size: 1em;
  }

  .page-index__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-index__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-index__about-title, .page-index__games-title, .page-index__why-choose-us-title, .page-index__promotions-title, .page-index__faq-main-title, .page-index__brand-intro-title, .page-index__blog-title {
    font-size: 1.8em;
  }

  .page-index__game-categories, .page-index__features-grid, .page-index__promotion-list, .page-index__brand-intro-content, .page-index__blog-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__game-card-image, .page-index__promotion-image, .page-index__blog-item-image {
    height: 180px;
  }
  
  .page-index__feature-icon {
    width: 80px;
    height: 80px;
  }

  details.page-index__faq-item summary.page-index__faq-question {
    padding: 15px;
  }
  .page-index__faq-qtext {
    font-size: 1em;
  }
  details.page-index__faq-item .page-index__faq-answer {
    padding: 0 15px 15px;
  }

  /* Ensure all images are responsive */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 480px) {
  .page-index__main-title {
    font-size: clamp(1.2em, 8vw, 2em);
  }
  .page-index__video-click-hint {
    font-size: 12px !important;
  }
}