/* style/slot-games.css */
:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --card-bg: #FFFFFF;
  --background-color: #F4F7FB;
  --text-main-color: #1F2D3D;
  --text-black-color: #000000;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
}

/* body 已 padding-top: var(--header-offset)；页面禁止再写该变量 */
.page-slot-games {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-main-color);
  background-color: var(--background-color);
  line-height: 1.6;
}

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

.page-slot-games__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-bottom: 60px; /* Space for content below image */
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--primary-color);
}

.page-slot-games__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit image height */
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.page-slot-games__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.8); /* Slightly darken image for text contrast */
}

.page-slot-games__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 40px 20px;
  margin-top: -100px; /* Pull content up over the image slightly for visual flow */
  background: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  color: var(--text-main-color);
}

.page-slot-games__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  color: var(--primary-color);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.page-slot-games__hero-description {
  font-size: 1.15rem;
  margin-bottom: 30px;
  color: var(--text-main-color);
}

.page-slot-games__cta-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-slot-games__btn-primary,
.page-slot-games__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-slot-games__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.4);
}

.page-slot-games__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(47, 107, 255, 0.6);
}

.page-slot-games__btn-secondary {
  background: #ffffff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-slot-games__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-3px);
}

.page-slot-games__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

.page-slot-games__intro-section,
.page-slot-games__game-showcase,
.page-slot-games__why-choose,
.page-slot-games__how-to-play,
.page-slot-games__tips-strategies,
.page-slot-games__faq-section,
.page-slot-games__conclusion-section {
  padding: 60px 0;
}

.page-slot-games__text-block {
  font-size: 1.05rem;
  margin-bottom: 20px;
  text-align: justify;
  color: var(--text-main-color);
}

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

.page-slot-games__game-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-slot-games__game-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  margin-bottom: 15px;
}

.page-slot-games__game-title {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-slot-games__game-title a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-slot-games__game-title a:hover {
  text-decoration: underline;
}

.page-slot-games__game-description {
  font-size: 0.95rem;
  color: var(--text-main-color);
  padding: 0 15px;
  margin-bottom: 15px;
}

.page-slot-games__btn-small {
  display: inline-block;
  background: var(--button-gradient);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.page-slot-games__btn-small:hover {
  background: var(--primary-color);
}

.page-slot-games__view-all-games {
  text-align: center;
  margin-top: 50px;
}

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

.page-slot-games__feature-item {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease;
}

.page-slot-games__feature-item:hover {
  transform: translateY(-5px);
}

.page-slot-games__feature-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 20px;
}

.page-slot-games__feature-title {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-slot-games__feature-description {
  font-size: 0.95rem;
  color: var(--text-main-color);
}

.page-slot-games__steps-list,
.page-slot-games__tips-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
}

.page-slot-games__step-item,
.page-slot-games__tip-item {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding: 25px;
  margin-bottom: 20px;
  border-left: 5px solid var(--primary-color);
  transition: border-color 0.3s ease;
}

.page-slot-games__step-item:last-child,
.page-slot-games__tip-item:last-child {
  margin-bottom: 0;
}

.page-slot-games__step-item:hover,
.page-slot-games__tip-item:hover {
  border-left-color: var(--secondary-color);
}

.page-slot-games__step-title,
.page-slot-games__tip-title {
  font-size: 1.25rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-slot-games__step-description,
.page-slot-games__tip-description {
  font-size: 1rem;
  color: var(--text-main-color);
}

.page-slot-games__faq-list {
  margin-top: 30px;
}

.page-slot-games__faq-item {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.page-slot-games__faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-main-color);
  background-color: #f9fbfd;
  border-bottom: 1px solid var(--border-color);
}

.page-slot-games__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-slot-games__faq-item[open] summary {
  background-color: var(--primary-color);
  color: #ffffff;
  border-bottom-color: var(--primary-color);
}

.page-slot-games__faq-item[open] .page-slot-games__faq-toggle {
  color: #ffffff;
}

.page-slot-games__faq-qtext {
  flex-grow: 1;
  color: inherit; /* Inherit color from summary */
}

.page-slot-games__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

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

.page-slot-games__faq-answer {
  padding: 20px 25px;
  font-size: 1rem;
  color: var(--text-main-color);
  line-height: 1.6;
}

.page-slot-games__conclusion-section .page-slot-games__cta-buttons {
  margin-top: 40px;
}

/* 智能文字颜色选择器 - 必须实现（使用BEM命名规则） */
.page-slot-games__card,
.page-slot-games__section,
.page-slot-games__box {
  /* System will automatically analyze background brightness and choose the best text color */
}

/* 亮度计算和颜色选择原则（使用BEM命名规则） */
.page-slot-games__dark-bg {
  color: #ffffff; /* Deep background with light text */
  background: var(--primary-color); /* Using brand color but ensuring contrast */
}

.page-slot-games__light-bg {
  color: var(--text-main-color); /* Light background with dark text */
  background: var(--card-bg);
}

.page-slot-games__medium-bg {
  /* Medium brightness background requires intelligent analysis */
  color: var(--text-black-color); /* Default to dark text */
  background: var(--secondary-color);
}

/* 正文内容区域 - 最高优先级（使用BEM命名规则） */
.page-slot-games__content-area,
.page-slot-games__text-block {
  color: var(--text-main-color); /* Ensure readability on most backgrounds */
  /* Default background is from body/section, which is var(--background-color) */
}

/* 页面内容区域内的段落和列表项 */
.page-slot-games p,
.page-slot-games li {
  color: var(--text-main-color); /* Ensure readability on most backgrounds */
}

/* 卡片和容器 - 智能背景选择（使用BEM命名规则） */
.page-slot-games__card {
  background: var(--card-bg); /* Prioritize white background for readability */
  color: var(--text-main-color);
  border: 1px solid var(--border-color); /* Add border to enhance readability */
}

/* 深色区域特殊处理（使用BEM命名规则） */
.page-slot-games__dark-section {
  background: var(--primary-color);
  color: #ffffff; /* Force white text */
}

/* 按钮文字对比度保障（使用BEM命名规则） */
.page-slot-games__btn-primary {
  background: var(--button-gradient);
  color: #ffffff; /* Button text always white */
  border: 2px solid transparent;
}

.page-slot-games__btn-secondary {
  background: #ffffff;
  color: var(--primary-color); /* Use brand color to ensure contrast */
  border: 2px solid var(--primary-color);
}

/* 对比度紧急修复类（使用BEM命名规则） */
.page-slot-games__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

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

/* 响应式设计 */
@media (max-width: 992px) {
  .page-slot-games__hero-content {
    margin-top: -80px;
    padding: 30px 15px;
  }

  .page-slot-games__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .page-slot-games__hero-description {
    font-size: 1rem;
  }

  .page-slot-games__game-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .page-slot-games__features-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .page-slot-games__section-title {
    font-size: clamp(1.6rem, 4.5vw, 2.5rem);
  }
}

@media (max-width: 768px) {
  .page-slot-games__hero-section {
    padding-bottom: 40px;
  }

  .page-slot-games__hero-content {
    margin-top: -60px;
    border-radius: 10px;
  }

  .page-slot-games__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .page-slot-games__hero-description {
    font-size: 0.95rem;
  }

  .page-slot-games__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .page-slot-games__btn-primary,
  .page-slot-games__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1rem;
  }

  .page-slot-games__intro-section,
  .page-slot-games__game-showcase,
  .page-slot-games__why-choose,
  .page-slot-games__how-to-play,
  .page-slot-games__tips-strategies,
  .page-slot-games__faq-section,
  .page-slot-games__conclusion-section {
    padding: 40px 0;
  }

  .page-slot-games__container {
    padding: 0 15px;
  }

  .page-slot-games__text-block {
    font-size: 0.95rem;
  }

  .page-slot-games__game-grid,
  .page-slot-games__features-grid {
    grid-template-columns: 1fr;
  }

  .page-slot-games__game-image {
    height: 180px;
  }

  .page-slot-games__feature-icon {
    width: 60px;
    height: 60px;
  }

  .page-slot-games__step-item,
  .page-slot-games__tip-item {
    padding: 20px;
  }

  .page-slot-games__step-title,
  .page-slot-games__tip-title {
    font-size: 1.15rem;
  }

  .page-slot-games__faq-item summary {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .page-slot-games__faq-answer {
    padding: 15px 20px;
    font-size: 0.95rem;
  }

  /* 移动端图片强制适配 */
  .page-slot-games img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-slot-games__section,
  .page-slot-games__card,
  .page-slot-games__container,
  .page-slot-games__hero-image-wrapper,
  .page-slot-games__game-card,
  .page-slot-games__feature-item,
  .page-slot-games__step-item,
  .page-slot-games__tip-item,
  .page-slot-games__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-slot-games__hero-section {
    padding-top: 10px !important;
    padding-left: 0;
    padding-right: 0;
  }

  .page-slot-games__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-slot-games__cta-buttons a {
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .page-slot-games__hero-content {
    margin-top: -40px;
    padding: 20px 10px;
  }
  .page-slot-games__main-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }
  .page-slot-games__hero-description {
    font-size: 0.9rem;
  }
  .page-slot-games__section-title {
    font-size: clamp(1.4rem, 6vw, 2rem);
  }
  .page-slot-games__game-image {
    height: 150px;
  }
  .page-slot-games__faq-item summary {
    font-size: 0.9rem;
  }
}