/* style/index.css */

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-button-bg: #C30808;
  --login-button-bg: #C30808;
  --register-login-font: #FFFF00;
  --text-on-dark-bg: #ffffff;
  --text-on-light-bg: #333333;
  --jackpot-title-color: #ffd700;
  --active-tab-color: #ff0000;
}

.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-on-dark-bg); /* Body background is dark, so text is light */
  background-color: var(--dark-bg-1, #0d0d0d); /* Assuming shared.css defines --dark-bg-1 */
}

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

.page-index__section {
  padding: 60px 0;
  margin-bottom: 20px;
}

.page-index__section:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter background for contrast */
}

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

.page-index__sub-heading {
  font-size: 24px;
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--text-on-dark-bg);
}

.page-index__text-block {
  font-size: 16px;
  margin-bottom: 15px;
  color: var(--text-on-dark-bg);
}

.page-index__text-center {
  text-align: center;
  margin-top: 30px;
}

.page-index__btn-primary,
.page-index__btn-secondary,
.page-index__btn-register,
.page-index__btn-login {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  text-align: center;
  white-space: nowrap;
  word-wrap: break-word;
  box-sizing: border-box;
}

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

.page-index__btn-primary:hover {
  background-color: darken(var(--primary-color), 10%);
  transform: translateY(-2px);
}

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

.page-index__btn-secondary:hover {
  background-color: rgba(var(--primary-color), 0.1);
  transform: translateY(-2px);
}

.page-index__btn-register {
  background-color: var(--register-button-bg);
  color: var(--register-login-font);
  border: 2px solid var(--register-button-bg);
}

.page-index__btn-register:hover {
  background-color: darken(var(--register-button-bg), 10%);
  transform: translateY(-2px);
}

.page-index__btn-login {
  background-color: var(--login-button-bg);
  color: var(--register-login-font);
  border: 2px solid var(--login-button-bg);
}

.page-index__btn-login:hover {
  background-color: darken(var(--login-button-bg), 10%);
  transform: translateY(-2px);
}

.page-index__button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.page-index__button-group .page-index__btn-primary,
.page-index__button-group .page-index__btn-secondary,
.page-index__button-group .page-index__btn-register,
.page-index__button-group .page-index__btn-login {
  flex-grow: 1;
  max-width: 250px;
}

/* HERO主图区域 */
.page-index__hero-section {
  position: relative;
  padding: 0;
  margin: 0;
  width: 100%;
  overflow: hidden;
}

.page-index__hero-container {
  position: relative;
  margin: 0 auto;
  width: 100%;
}

.page-index__hero-image {
  width: 100%;
  margin: 0;
  line-height: 0;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
}

/* LOGO轮播区域 */
.page-index__logo-carousel-section {
  width: 100%;
  padding: 30px 0;
  background-color: rgba(255, 255, 255, 0.08); /* Slightly different background for visual separation */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-index__logo-carousel-container {
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.page-index__logo-carousel {
  display: flex;
  gap: 20px;
  overflow: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  padding: 8px 0;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none; /* Disable user interaction */
}

.page-index__logo-carousel::-webkit-scrollbar {
  display: none;
}

.page-index__logo-item {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--secondary-color);
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  pointer-events: auto;
}

.page-index__logo-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.page-index__logo-item a {
  display: block;
  width: 100%;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  pointer-events: auto;
}

.page-index__logo-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 游戏展示区域 */
.page-index__games-section {
  width: 100%;
  padding: 60px 20px;
  background-color: var(--dark-bg-1, #0d0d0d);
}

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

.page-index__games-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 30px;
  align-items: start;
}

.page-index__featured-game-area {
  width: 100%;
}

.page-index__featured-game-title {
  font-size: 28px;
  font-weight: bold;
  margin: 0 0 25px 0;
  color: var(--jackpot-title-color); /* Yellow text */
  text-align: left;
}

.page-index__featured-game {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--secondary-color);
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__featured-game:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.page-index__featured-game-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__featured-game-image {
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.page-index__featured-game-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-index__games-grid-area {
  width: 100%;
}

.page-index__games-tabs {
  display: flex;
  gap: 25px;
  margin-bottom: 25px;
  align-items: center;
}

.page-index__games-tab {
  background: none;
  border: none;
  padding: 0;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  color: #999999;
  transition: color 0.3s ease;
  text-decoration: none;
  position: relative;
}

.page-index__games-tab:hover {
  color: var(--text-on-dark-bg);
}

.page-index__games-tab.active {
  color: var(--active-tab-color); /* Red text */
  text-decoration: underline;
}

.page-index__games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  display: none;
}

.page-index__games-grid.active {
  display: grid;
}

.page-index__game-card {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: var(--secondary-color);
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__game-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__game-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

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

.page-index__game-card-title {
  font-size: 15px;
  font-weight: 500;
  margin: 10px 0 10px 0;
  padding: 0 8px;
  color: var(--text-on-light-bg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  line-height: 1.4;
}

/* 模块 3: Core Games */
.page-index__game-category {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 40px;
  text-align: center;
}

.page-index__game-category .page-index__sub-heading {
  margin-top: 20px;
  color: var(--text-on-dark-bg);
}

.page-index__game-category .page-index__text-block {
  color: var(--text-on-dark-bg);
}

.page-index__category-image {
  width: 100%;
  height: auto;
  max-width: 800px;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
}

/* 模块 4: Promotions */
.page-index__promotions-section {
  background-color: var(--dark-bg-1, #0d0d0d);
}

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

.page-index__promo-card {
  background-color: var(--secondary-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  padding-bottom: 20px;
}

.page-index__promo-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  margin-bottom: 15px;
}

.page-index__promo-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-on-light-bg);
  margin: 0 15px 10px 15px;
}

.page-index__promo-desc {
  font-size: 15px;
  color: #666666;
  margin: 0 15px 20px 15px;
}

/* 模块 5: Security & Support */
.page-index__security-support-section {
  background-color: rgba(255, 255, 255, 0.05);
}

.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-color: rgba(255, 255, 255, 0.08);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-index__feature-item .page-index__sub-heading {
  font-size: 20px;
  margin-top: 0;
  margin-bottom: 10px;
}

.page-index__feature-item .page-index__text-block {
  font-size: 15px;
}

/* 模块 6: FAQ */
.page-index__faq-section {
  background-color: var(--dark-bg-1, #0d0d0d);
}

.page-index__faq-list {
  margin-top: 40px;
}

.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--secondary-color);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-index__faq-item.active .page-index__faq-question {
  border-radius: 8px 8px 0 0;
}

.page-index__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-index__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--text-on-light-bg);
}

.page-index__faq-toggle {
  font-size: 26px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.page-index__faq-item.active .page-index__faq-toggle {
  color: #333;
  transform: rotate(45deg);
}

.page-index__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 25px;
  opacity: 0;
  background: #f9f9f9;
  color: #555;
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important;
  padding: 20px 25px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
  color: var(--text-on-light-bg);
}

/* 模块 7: Latest Blog */
.page-index__blog-section {
  background-color: rgba(255, 255, 255, 0.05);
}

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

.page-index__blog-card {
  background-color: var(--secondary-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.page-index__blog-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.page-index__blog-card h3 {
  font-size: 20px;
  font-weight: bold;
  margin: 15px 15px 10px 15px;
  color: var(--text-on-light-bg);
}

.page-index__blog-card h3 a {
  color: var(--text-on-light-bg);
  text-decoration: none;
}

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

.page-index__blog-summary {
  font-size: 15px;
  color: #666666;
  margin: 0 15px 20px 15px;
  flex-grow: 1;
}

/* Responsive styles */

@media (max-width: 1024px) {
  .page-index__hero-image img {
    height: 600px;
    object-position: center;
  }

  .page-index__games-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .page-index__featured-game-image {
    height: 450px;
  }

  .page-index__games-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-index__heading {
    font-size: 28px;
  }

  .page-index__sub-heading {
    font-size: 22px;
  }

  .page-index__text-block {
    font-size: 15px;
  }
}

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

  .page-index__container {
    padding: 0 15px;
  }

  .page-index__section {
    padding: 40px 0;
    margin-bottom: 15px;
  }

  .page-index__heading {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .page-index__sub-heading {
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 10px;
  }

  .page-index__text-block {
    font-size: 14px;
  }

  /* HERO主图区域 */
  .page-index__hero-section {
    padding-top: 0 !important; /* Ensure no double padding if shared.css sets body padding */
  }

  .page-index__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: 400px !important; /* Adjusted height for mobile */
    object-fit: cover;
  }

  /* LOGO轮播区域 */
  .page-index__logo-carousel-section {
    padding: 20px 0;
  }

  .page-index__logo-carousel {
    gap: 15px;
  }

  .page-index__logo-item {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    flex-shrink: 0;
  }

  /* 游戏展示区域 */
  .page-index__games-section {
    padding: 40px 15px;
  }

  .page-index__games-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .page-index__featured-game-title {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .page-index__featured-game-image {
    height: 300px !important;
  }

  .page-index__games-tabs {
    gap: 15px;
    margin-bottom: 20px;
  }

  .page-index__games-tab {
    font-size: 16px;
  }

  .page-index__games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .page-index__game-card-image {
    height: 150px !important;
  }

  .page-index__game-card-title {
    font-size: 13px;
    margin: 8px 0 8px 0;
    padding: 0 5px;
  }

  /* 通用图片和容器 */
  .page-index img:not(.page-index__logo-item img) {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__container,
  .page-index__game-category,
  .page-index__promo-card,
  .page-index__feature-item,
  .page-index__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 按钮与按钮容器 */
  .page-index__btn-primary,
  .page-index__btn-secondary,
  .page-index__btn-register,
  .page-index__btn-login {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 10px 15px;
    font-size: 15px;
  }

  .page-index__button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important;
    gap: 10px;
  }

  /* 模块 3: Core Games */
  .page-index__game-category {
    padding: 20px;
  }

  /* 模块 4: Promotions */
  .page-index__promo-grid {
    gap: 20px;
  }

  .page-index__promo-image {
    height: 200px;
  }

  .page-index__promo-title {
    font-size: 18px;
  }

  .page-index__promo-desc {
    font-size: 14px;
  }

  /* 模块 5: Security & Support */
  .page-index__feature-grid {
    gap: 20px;
  }

  .page-index__feature-item {
    padding: 20px;
  }

  .page-index__feature-item .page-index__sub-heading {
    font-size: 18px;
  }

  /* 模块 6: FAQ */
  .page-index__faq-question {
    padding: 15px 20px;
  }

  .page-index__faq-question h3 {
    font-size: 15px;
  }

  .page-index__faq-toggle {
    font-size: 22px;
    width: 26px;
    height: 26px;
  }

  .page-index__faq-answer {
    padding: 0 20px;
  }

  .page-index__faq-item.active .page-index__faq-answer {
    padding: 15px 20px !important;
  }

  /* 模块 7: Latest Blog */
  .page-index__blog-grid {
    gap: 20px;
  }

  .page-index__blog-image {
    height: 200px;
  }

  .page-index__blog-card h3 {
    font-size: 18px;
  }

  .page-index__blog-summary {
    font-size: 14px;
  }
}