/* 智能文字颜色选择器 */
.page-sports__light-bg {
  color: #333333; /* 浅色背景配深色文字 */
  background: #ffffff;
}
.page-sports__dark-bg {
  color: #ffffff; /* 深色背景配浅色文字 */
  background: #2F6BFF; /* Sử dụng màu thương hiệu nhưng đảm bảo độ tương phản */
}
.page-sports__medium-bg {
  color: #000000; /* Mặc định sử dụng chữ đậm */
  background: #6FA3FF;
}

/* 正文内容区域 - 最高优先级 */
.page-sports__content-area,
.page-sports__text-block,
.page-sports p,
.page-sports li {
  color: #1F2D3D; /* Đảm bảo dễ đọc trên hầu hết các nền */
}

/* 卡片和容器 - 智能背景选择 */
.page-sports__card {
  background: #FFFFFF; /* Ưu tiên sử dụng nền trắng để đảm bảo dễ đọc */
  color: #1F2D3D;
  border: 1px solid #D6E2FF; /* Thêm đường viền để tăng cường khả năng đọc */
}

/* 深色区域特殊处理 */
.page-sports__dark-section {
  background: #2F6BFF;
  color: #ffffff; /* Buộc màu chữ trắng */
}

/* 按钮文字对比度保障 */
.page-sports__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff; /* Màu chữ nút luôn là trắng */
  border: 2px solid transparent;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  cursor: pointer;
}

.page-sports__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-sports__btn-secondary {
  background: #ffffff;
  color: #2F6BFF; /* Sử dụng màu thương hiệu đảm bảo độ tương phản */
  border: 2px solid #2F6BFF;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  cursor: pointer;
}

.page-sports__btn-secondary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

/* --- General Styles --- */
.page-sports {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #1F2D3D; /* Default text color for the page */
  background-color: #F4F7FB; /* Body background color */
}

.page-sports__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-sports__section {
  padding: 40px 0;
}

.page-sports__section-title {
  font-size: 36px;
  font-weight: 700;
  color: #1F2D3D;
  text-align: center;
  margin-bottom: 20px;
}

.page-sports__section-description {
  font-size: 18px;
  color: #333333;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
}

.page-sports img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Hero Section --- */
.page-sports__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  margin-bottom: 30px;
}

.page-sports__hero-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-sports__main-title {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  color: #1F2D3D;
  margin-bottom: 15px;
}

.page-sports__hero-description {
  font-size: 16px;
  color: #333333;
  margin-bottom: 20px;
}

.page-sports__trust-icons {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.page-sports__trust-icons img {
  
  
  object-fit: contain;
}

.page-sports__cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.page-sports__hero-jackpot {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.page-sports__jackpot-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #ffffff;
}

.page-sports__jackpot-amount {
  font-size: 32px;
  font-weight: 900;
  color: #FFD700; /* Gold color for emphasis */
  margin-bottom: 10px;
}

.page-sports__jackpot-text {
  font-size: 14px;
  color: #e0e0e0;
  margin-bottom: 20px;
}

.page-sports__hero-jackpot-claim {
  background: linear-gradient(180deg, #FF6B6B 0%, #C62828 100%) !important; /* Specific color for jackpot claim */
  border: none;
}

/* --- Game Trial --- */
.page-sports__game-trial {
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.page-sports__game-trial-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #A5C4FF; /* Border for game shell */
  border-radius: 10px;
  overflow: hidden;
}

.page-sports__game-trial-topbar {
  background: #1F2D3D;
  color: #ffffff;
  padding: 10px 15px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  flex-shrink: 0;
}

.page-sports__game-trial-viewport {
  flex: 1;
  min-height: 0;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-sports__game-trial-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: none;
}

.page-sports__game-trial-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  cursor: pointer;
  z-index: 5;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-sports__game-trial-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.page-sports__game-trial-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  display: none !important;
  pointer-events: none !important;
}

.page-sports__game-trial-start {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  padding: 15px 30px;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  z-index: 6;
  pointer-events: auto;
  touch-action: manipulation;
  transition: all 0.3s ease;
}

.page-sports__game-trial-start:hover {
  opacity: 0.9;
  transform: translate(-50%, -50%) scale(1.05);
}

.page-sports__game-trial-bottombar {
  background: #1F2D3D;
  color: #e0e0e0;
  padding: 8px 15px;
  font-size: 13px;
  text-align: center;
  flex-shrink: 0;
}

/* --- Promo Strip --- */
.page-sports__promo-strip {
  padding: 20px 0;
}

.page-sports__promo-strip-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-sports__promo-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.page-sports__promo-card img {
  
  
  object-fit: contain;
  flex-shrink: 0;
}

.page-sports__promo-title {
  font-size: 18px;
  font-weight: 700;
  color: #1F2D3D;
  margin: 0;
}

.page-sports__promo-description {
  font-size: 14px;
  color: #333333;
  margin: 0;
}

/* --- Why Choose Section --- */
.page-sports__why-choose .page-sports__section-title {
  color: #1F2D3D;
}

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

.page-sports__feature-item {
  background: #ffffff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
}

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

.page-sports__feature-title {
  font-size: 22px;
  font-weight: 700;
  color: #2F6BFF;
  margin-bottom: 15px;
}

.page-sports__feature-text {
  font-size: 15px;
  color: #333333;
}

/* --- Popular Events Section --- */
.page-sports__popular-events {
  background-color: #2F6BFF;
  color: #ffffff;
}

.page-sports__popular-events .page-sports__section-title,
.page-sports__popular-events .page-sports__section-description {
  color: #ffffff;
}

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

.page-sports__event-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-sports__event-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.page-sports__event-content {
  padding: 20px;
  text-align: center;
}

.page-sports__event-title {
  font-size: 20px;
  font-weight: 700;
  color: #1F2D3D;
  margin-bottom: 10px;
}

.page-sports__event-date {
  font-size: 14px;
  color: #666666;
  margin-bottom: 15px;
}

.page-sports__event-description {
  font-size: 15px;
  color: #333333;
  margin-bottom: 20px;
}

/* --- Betting Guide Section --- */
.page-sports__guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.page-sports__guide-item {
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.page-sports__guide-title {
  font-size: 20px;
  font-weight: 700;
  color: #2F6BFF;
  margin-bottom: 15px;
}

.page-sports__guide-text {
  font-size: 15px;
  color: #333333;
  margin-bottom: 20px;
}

/* --- Hot Games Section (Popular Sports) --- */
.page-sports__hot-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-sports__hot-games-item {
  background: #ffffff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.page-sports__hot-games-item img {
  width: 100%;
  
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.page-sports__hot-games-name {
  font-size: 18px;
  font-weight: 700;
  color: #1F2D3D;
  margin-bottom: 5px;
}

.page-sports__hot-games-rtp {
  font-size: 13px;
  color: #666666;
  margin-bottom: 15px;
}

/* --- FAQ Section --- */
details.page-sports__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #D6E2FF;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
details.page-sports__faq-item summary.page-sports__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-sports__faq-item summary.page-sports__faq-question::-webkit-details-marker {
  display: none;
}
details.page-sports__faq-item summary.page-sports__faq-question:hover {
  background: #f5f5f5;
}
.page-sports__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #1F2D3D;
}
.page-sports__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #6FA3FF;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-sports__faq-item .page-sports__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
  color: #333333;
}

/* --- Winner Ticker --- */
.page-sports__winner-ticker {
  background: linear-gradient(90deg, #2F6BFF, #6FA3FF);
  color: #ffffff;
  padding: 10px 0;
  text-align: center;
  font-size: 15px;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  z-index: 10;
}

.page-sports__winner-ticker-content {
  display: inline-block;
  padding-left: 100%; /* Start off-screen */
  animation: ticker-scroll 30s linear infinite;
}

.page-sports__winner-ticker-content p {
  display: inline-block;
  margin: 0 20px;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* --- Reward Modal --- */
.page-sports__reward-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-sports__reward-modal[hidden] {
  display: none;
}

.page-sports--reward-open .page-sports__reward-modal {
  opacity: 1;
  visibility: visible;
}

.page-sports__reward-modal-content {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.page-sports__reward-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 5px;
}

.page-sports__reward-modal-title {
  font-size: 24px;
  color: #2F6BFF;
  margin-bottom: 15px;
}

.page-sports__reward-modal-text {
  font-size: 16px;
  color: #333333;
  margin-bottom: 25px;
}

/* --- Responsive Styles --- */
/* 移动端图片适配 */
.page-sports img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 移动端按钮适配 */
.page-sports__cta-button,
.page-sports__btn-primary,
.page-sports__btn-secondary,
.page-sports a[class*="button"],
.page-sports a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-sports__cta-buttons,
.page-sports__button-group,
.page-sports__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* 1023px (Tablet/Smaller Desktop) for Homepage Trial Reset */
@media (max-width: 1023px) {
  .page-sports__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-sports__hero-brand,
  .page-sports__hero-jackpot {
    display: none !important;
  }
  .page-sports__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-sports__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-sports__game-trial-topbar,
  .page-sports__game-trial-bottombar {
    display: none !important;
  }
  .page-sports__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-sports__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-sports__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-sports__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
  .page-sports__promo-strip-track {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .page-sports__promo-card {
    flex-direction: column;
    text-align: center;
  }
  .page-sports__promo-card img {
    margin-bottom: 10px;
  }
  .page-sports__hot-games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 1024px (Desktop) for Homepage Three-Column Layout */
@media (min-width: 1024px) {
  .page-sports__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-sports__hero-brand,
  .page-sports__hero-jackpot,
  .page-sports__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-sports__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-sports__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-sports__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-sports__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-sports__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
  .page-sports__promo-strip-track {
    grid-template-columns: repeat(4, 1fr);
  }
  .page-sports__hot-games-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .page-sports__hot-games-name,
  .page-sports__hot-games-rtp {
    display: block; /* Ensure visibility on desktop */
  }
}

/* 768px (Mobile) */
@media (max-width: 768px) {
  .page-sports {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-sports__container {
    padding: 0 15px;
  }
  .page-sports__section-title {
    font-size: 28px;
  }
  .page-sports__section-description {
    font-size: 16px;
    margin-bottom: 20px;
  }
  .page-sports__main-title {
    font-size: 32px;
  }
  .page-sports__hero-description {
    font-size: 15px;
  }
  .page-sports__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .page-sports__cta-button,
  .page-sports__btn-primary,
  .page-sports__btn-secondary,
  .page-sports a[class*="button"],
  .page-sports 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-sports__cta-buttons,
  .page-sports__button-group,
  .page-sports__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-sports__promo-strip-track {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }
  .page-sports__promo-card {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }
  .page-sports__feature-grid,
  .page-sports__event-grid,
  .page-sports__guide-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-sports__hot-games-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 15px;
  }
  .page-sports__hot-games-item {
    padding: 10px;
  }
  .page-sports__hot-games-name,
  .page-sports__hot-games-rtp {
    font-size: 16px;
  }
  .page-sports__faq-item summary.page-sports__faq-question {
    padding: 15px;
  }
  .page-sports__faq-qtext {
    font-size: 15px;
  }
  .page-sports__faq-toggle {
    font-size: 20px;
  }
  details.page-sports__faq-item .page-sports__faq-answer {
    padding: 0 15px 15px;
  }
  .page-sports__winner-ticker {
    font-size: 13px;
  }
  .page-sports__reward-modal-content {
    padding: 20px;
  }
  /* 通用图片与容器 */
  .page-sports img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-sports__section,
  .page-sports__card,
  .page-sports__container,
  .page-sports__feature-item,
  .page-sports__event-card,
  .page-sports__guide-item,
  .page-sports__hot-games-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-sports__cta-buttons {
    flex-direction: column;
  }
}