/* 智能文字颜色选择器 - BEM */
.page-support__dark-bg {
  color: #ffffff; /* Deep background with light text */
  background: #017439; /* Brand color, ensure contrast */
}

.page-support__light-bg {
  color: #333333; /* Light background with dark text */
  background: #ffffff;
}

.page-support__medium-bg {
  color: #000000; /* Default dark text for medium brightness */
  background: #FFFFFF;
}

/* 正文内容区域 - 最高优先级 */
.page-support__content-area,
.page-support__text-block {
  color: #333333; /* Ensure readability on most backgrounds */
  background: #ffffff; /* Default white background */
}

/* 页面内容区域内的段落和列表项 */
.page-support p,
.page-support li {
  color: #333333; /* Ensure readability on most backgrounds */
}

/* 卡片和容器 - 智能背景选择 */
.page-support__card {
  background: #ffffff; /* Prioritize white background for readability */
  color: #333333;
  border: 1px solid #e0e0e0; /* Add border for enhanced readability */
}

/* 深色区域特殊处理 */
.page-support__dark-section {
  background: #017439;
  color: #ffffff; /* Force white text */
}

/* 按钮文字对比度保障 */
.page-support__btn-primary {
  background: #017439;
  color: #ffffff; /* Button text always white */
  border: 2px solid transparent;
}

.page-support__btn-secondary {
  background: #ffffff;
  color: #017439; /* Use brand color for contrast */
  border: 2px solid #017439;
}

/* 对比度紧急修复类 */
.page-support__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

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

/* --- General Layout --- */
.page-support {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333;
  background-color: #f8f8f8;
  padding-top: 10px; /* Small top padding for internal content */
}

.page-support__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-support__section-title {
  font-size: 32px;
  font-weight: 700;
  color: #017439;
  text-align: center;
  margin-bottom: 20px;
}

.page-support__section-title--light {
  color: #ffffff;
}

.page-support__section-intro {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #555555;
}

.page-support__section-intro--light {
  color: #f0f0f0;
}

/* --- Hero Section --- */
.page-support__hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-bottom: 50px;
  background-color: #017439;
}

.page-support__hero-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 15px;
}

.page-support__hero-image {
  width: 100%;
  max-width: 1000px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 30px;
}

.page-support__hero-text-block {
  text-align: center;
  color: #ffffff;
  max-width: 800px;
}

.page-support__hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 15px;
  color: #FFFF00; /* High contrast for H1 */
}

.page-support__hero-description {
  font-size: 1.15rem;
  margin-bottom: 30px;
  line-height: 1.6;
}

.page-support__hero-cta {
  display: inline-block;
  padding: 15px 30px;
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.page-support__hero-cta:hover {
  background-color: #a00606;
  transform: translateY(-2px);
}

/* --- Topics Section --- */
.page-support__topics-section {
  padding: 60px 0;
  background-color: #f8f8f8;
}

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

.page-support__topic-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  padding-bottom: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.page-support__topic-title {
  font-size: 22px;
  font-weight: 700;
  color: #017439;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-support__topic-description {
  font-size: 15px;
  color: #555555;
  margin-bottom: 20px;
  padding: 0 15px;
  flex-grow: 1;
}

.page-support__btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  background-color: #ffffff;
  color: #017439;
  border: 2px solid #017439;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-support__btn-secondary:hover {
  background-color: #017439;
  color: #ffffff;
}

/* --- FAQ Section --- */
.page-support__faq-section {
  padding: 60px 0;
  background-color: #017439;
}

.page-support__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

details.page-support__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}
details.page-support__faq-item summary.page-support__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-support__faq-item summary.page-support__faq-question::-webkit-details-marker {
  display: none;
}
details.page-support__faq-item summary.page-support__faq-question:hover {
  background: rgba(255, 255, 255, 0.2);
}
.page-support__faq-qtext {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #ffffff;
}
.page-support__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-support__faq-item .page-support__faq-answer {
  padding: 0 20px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 0 5px 5px;
  color: #f0f0f0;
}
.page-support__faq-answer p {
  margin: 0;
  color: #f0f0f0;
}

/* --- Contact CTA Section --- */
.page-support__contact-cta-section {
  padding: 60px 0;
  background-color: #f8f8f8;
  text-align: center;
}

.page-support__contact-btn {
  display: inline-block;
  padding: 15px 30px;
  background-color: #017439;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-top: 30px;
}

.page-support__contact-btn:hover {
  background-color: #005a2e;
  transform: translateY(-2px);
}

.page-support__contact-image {
  width: 100%;
  max-width: 700px;
  height: auto;
  border-radius: 10px;
  margin-top: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --- Copyright --- */
.page-support__copyright {
  text-align: center;
  padding: 20px 15px;
  font-size: 14px;
  color: #777777;
  background-color: #eeeeee;
  margin-top: 40px;
}

/* --- Responsive Design --- */

/* Mandatory Homepage CSS sections (copied verbatim as per instructions) */
@media (max-width: 1023px) {
  .page-support__home-hero {
    display: block !important;
    grid-template-columns: none !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-support__hero-brand,
  .page-support__hero-jackpot {
    display: none !important;
  }
  .page-support__game-trial {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    margin: 0 auto;
    padding: 0 0 12px !important;
    box-sizing: border-box;
  }
  .page-support__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-support__game-trial-topbar,
  .page-support__game-trial-bottombar {
    display: none !important;
  }
  .page-support__game-trial-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1024 / 768;
    flex: none !important;
    min-height: 240px;
    max-height: none !important;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-support__game-trial-frame {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    max-width: 100%;
    border: none;
    z-index: 1;
    overflow: hidden;
  }
  .page-support__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-support__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

@media (min-width: 1024px) {
  .page-support__home-hero {
    display: grid;
    grid-template-columns: 26% 48% 26%;
    gap: 16px;
    align-items: stretch;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 16px 24px;
    box-sizing: border-box;
  }
  .page-support__hero-brand,
  .page-support__hero-jackpot,
  .page-support__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-support__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-support__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-support__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-support__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-support__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
}

/* Mobile specific styles */
@media (max-width: 768px) {
  .page-support {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-support__container {
    padding: 0 10px;
  }

  .page-support__section-title {
    font-size: 26px;
    margin-bottom: 15px;
  }

  .page-support__section-intro {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-support__hero-section {
    padding-bottom: 30px;
  }

  .page-support__hero-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    line-height: 1.3;
  }

  .page-support__hero-description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-support__hero-cta {
    padding: 12px 25px;
    font-size: 1rem;
  }

  .page-support__topics-section {
    padding: 40px 0;
  }

  .page-support__topics-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-support__topic-card {
    padding-bottom: 15px;
  }

  .page-support__topic-image {
    height: 180px;
  }

  .page-support__topic-title {
    font-size: 20px;
  }

  .page-support__topic-description {
    font-size: 14px;
  }

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

  .page-support__contact-cta-section {
    padding: 40px 0;
  }

  .page-support__contact-btn {
    padding: 12px 25px;
    font-size: 1rem;
  }

  .page-support__contact-image {
    margin-top: 30px;
  }

  /* Mobile image adaptation */
  .page-support img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-support__section,
  .page-support__card,
  .page-support__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Mobile button adaptation */
  .page-support__cta-button,
  .page-support__btn-primary,
  .page-support__btn-secondary,
  .page-support a[class*="button"],
  .page-support a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-support__cta-buttons,
  .page-support__button-group,
  .page-support__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-support__cta-buttons {
    display: flex;
    flex-direction: column;
  }
}

/* Additional game trial related CSS as per instructions */
.page-support__game-trial-overlay{z-index:5;pointer-events:auto;}.page-support__game-trial-overlay.is-hidden{display:none!important;pointer-events:none!important;}.page-support__game-trial-start{z-index:6;pointer-events:auto;touch-action:manipulation;}.page-support__game-trial-shell{border:1px solid rgba(212,175,55,.45);border-radius:10px;overflow:hidden;}.page-support__reward-modal{position:fixed;inset:0;z-index:10000;}.page-support__reward-modal.is-hidden{display:none!important;pointer-events:none!important;}.page-support__reward-modal-close{position:absolute;top:15px;right:15px;width:30px;height:30px;background:#C30808;color:#FFFF00;border:none;border-radius:50%;cursor:pointer;font-size:20px;line-height:1;text-align:center;}