/* style/lottery.css */

:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-color-dark-bg: #ffffff;
  --text-color-light-bg: #333333;
  --bg-dark: #121212;
  --bg-light: #f9f9f9;
  --card-bg-dark-mode: rgba(255, 255, 255, 0.08);
  --border-color: #333333;
}

.page-lottery {
  font-family: 'Arial', sans-serif;
  color: var(--text-color-dark-bg); /* Default text color for dark body background */
  background-color: var(--bg-dark); /* Ensure consistency with body background */
}

/* 🚨 桌面端视频区域样式（必须严格遵守） */
.page-lottery__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  /* 🚨 必须添加桌面端padding-top，确保内容不被固定导航栏遮挡 */
  padding-top: 10px; /* 桌面端：根据导航栏实际高度调整 */
}

.page-lottery__video-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 🚨 视频点击链接样式（必须严格遵守） */
.page-lottery__video-link {
  display: block;
  text-decoration: none;
  position: relative;
  width: 100%;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-lottery__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 宽高比 - 🚨 PageSpeed优化：固定宽高比避免布局偏移（CLS） */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-lottery__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none; /* 防止视频控件阻止点击事件 */
}

/* 🚨 视频点击提示遮罩层样式（可选，增强用户体验） */
.page-lottery__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.3);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

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

.page-lottery__video-click-hint {
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  background: var(--primary-color);
  border-radius: 5px;
  white-space: nowrap;
}

/* 🚨 Play Now按钮样式（必须严格遵守，位于视频下方中间位置） */
.page-lottery__video-cta {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}

.page-lottery__play-now-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--text-color-dark-bg);
  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.15);
  border: none;
  cursor: pointer;
}

.page-lottery__play-now-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

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

/* General Section and Container Styles */
.page-lottery__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-lottery__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--primary-color);
  text-transform: uppercase;
}

.page-lottery__section-subtitle {
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  margin-top: 60px;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.page-lottery__section-intro {
  font-size: 18px;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 50px;
  color: var(--text-color-dark-bg);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Title Section */
.page-lottery__title-section {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #330000 100%);
  padding: 80px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.page-lottery__title-container {
  max-width: 900px;
  margin: 0 auto;
  color: var(--text-color-dark-bg);
}

.page-lottery__main-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-lottery__title-description {
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 40px;
  color: #f0f0f0;
}

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

.page-lottery__cta-button {
  display: inline-block;
  padding: 15px 35px;
  background: var(--primary-color);
  color: var(--bg-dark);
  text-decoration: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  white-space: normal;
  word-wrap: break-word;
}

.page-lottery__cta-button:hover {
  background: var(--secondary-color);
  color: var(--text-color-dark-bg);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-lottery__cta-center {
  text-align: center;
  margin-top: 50px;
}

/* Content Section (dark background) */
.page-lottery__content-section.page-lottery__dark-bg {
  background-color: var(--bg-dark);
  color: var(--text-color-dark-bg);
  padding: 80px 0;
}

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

.page-lottery__game-card {
  background: var(--card-bg-dark-mode);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

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

.page-lottery__game-image {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-lottery__game-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-lottery__game-description {
  font-size: 16px;
  line-height: 1.6;
  color: #cccccc;
  margin-bottom: 25px;
  flex-grow: 1;
}

.page-lottery__game-button {
  display: inline-block;
  padding: 12px 25px;
  background: var(--primary-color);
  color: var(--bg-dark);
  text-decoration: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  white-space: normal;
  word-wrap: break-word;
}

.page-lottery__game-button:hover {
  background: var(--secondary-color);
  color: var(--text-color-dark-bg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-lottery__advantages-list {
  list-style: none;
  padding: 0;
  margin: 40px auto 0 auto;
  max-width: 900px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.page-lottery__advantages-list li {
  background: var(--card-bg-dark-mode);
  padding: 20px;
  border-radius: 8px;
  border-left: 5px solid var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-size: 17px;
  line-height: 1.6;
  color: #cccccc;
}

.page-lottery__advantages-list li p strong {
  color: var(--primary-color);
  font-size: 18px;
}

/* FAQ Section */
.page-lottery__faq-section.page-lottery__light-bg {
  background-color: var(--bg-light);
  color: var(--text-color-light-bg);
  padding: 80px 0;
}

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

/* FAQ容器样式 */
.page-lottery__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* FAQ默认状态 - 答案隐藏 */
.page-lottery__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 15px;
  opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-lottery__faq-item.active .page-lottery__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng!important để đảm bảo độ ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f0f0f0;
  border-radius: 0 0 5px 5px;
  color: var(--text-color-light-bg);
}

/* 问题样式 */
.page-lottery__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

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

.page-lottery__faq-question:active {
  background: #eeeeee;
}

/* 问题标题样式 */
.page-lottery__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: var(--text-color-light-bg);
}

/* 切换图标 */
.page-lottery__faq-toggle {
  font-size: 24px;
  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: 28px;
  height: 28px;
}

.page-lottery__faq-item.active .page-lottery__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg);
}

.page-lottery__faq-answer a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-lottery__faq-answer a:hover {
  text-decoration: underline;
}

/* Brand Section */
.page-lottery__brand-section.page-lottery__dark-bg {
  background-color: var(--bg-dark);
  color: var(--text-color-dark-bg);
  padding: 80px 0;
  border-top: 1px solid var(--border-color);
}

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

.page-lottery__brand-item {
  background: var(--card-bg-dark-mode);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.page-lottery__brand-item h3 {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-lottery__brand-item p {
  font-size: 16px;
  line-height: 1.6;
  color: #cccccc;
}

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

/* Blog Section */
.page-lottery__blog-section.page-lottery__light-bg {
  background-color: var(--bg-light);
  color: var(--text-color-light-bg);
  padding: 80px 0;
  border-top: 1px solid #e0e0e0;
}

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

.page-lottery__blog-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-lottery__blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-lottery__blog-link {
  text-decoration: none;
  color: var(--text-color-light-bg);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-lottery__blog-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.page-lottery__blog-item-title {
  font-size: 20px;
  font-weight: bold;
  margin: 20px 20px 10px 20px;
  color: var(--secondary-color);
  line-height: 1.4;
}

.page-lottery__blog-item-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #555555;
  margin: 0 20px 15px 20px;
  flex-grow: 1;
}

.page-lottery__blog-item-date {
  font-size: 14px;
  color: #888888;
  margin: 0 20px 20px 20px;
  display: block;
}

/* 🚨 移动端响应式设计（必须严格遵守） */
@media (max-width: 768px) {
  .page-lottery__video-section {
    /* 🚨 移动端必须重新设置padding-top，覆盖桌面端样式 */
    padding-top: 10px !important; /* 移动端：根据移动端导航栏实际高度调整 */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
    /* 🚨 移动端必须确保不超出容器 */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  .page-lottery__video-container {
    /* 🚨 移动端必须确保不超出容器 */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden !important;
  }
  
  /* 🚨 视频链接移动端适配（必须严格遵守） */
  .page-lottery__video-link {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-lottery__video-wrapper {
    /* 🚨 移动端必须确保不超出容器 */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 4px;
    overflow: hidden !important;
  }
  
  .page-lottery__video {
    /* 🚨 移动端必须确保视频不超出容器 */
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
    object-fit: contain; /* 移动端使用contain确保视频完整显示且不超出 */
  }
  
  /* 🚨 Play Now按钮移动端响应式适配（必须严格遵守） */
  .page-lottery__video-cta {
    margin-top: 20px;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .page-lottery__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-lottery__video-click-hint {
    font-size: 14px !important;
    padding: 8px 16px !important;
  }

  .page-lottery {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-lottery__container {
    padding: 30px 15px;
  }

  .page-lottery__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .page-lottery__section-subtitle {
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 20px;
  }

  .page-lottery__section-intro {
    font-size: 16px;
    margin-bottom: 40px;
  }

  .page-lottery__title-section {
    padding: 60px 15px;
  }

  .page-lottery__main-title {
    font-size: 36px;
  }

  .page-lottery__title-description {
    font-size: 18px;
  }

  .page-lottery__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-lottery__cta-button {
    width: 100%;
    padding: 12px 25px;
    font-size: 16px;
  }

  .page-lottery__content-section,
  .page-lottery__faq-section,
  .page-lottery__brand-section,
  .page-lottery__blog-section {
    padding: 50px 0;
  }

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

  .page-lottery__game-card {
    padding: 20px;
  }

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

  .page-lottery__game-description {
    font-size: 15px;
  }

  .page-lottery__game-button {
    width: 100%;
    font-size: 15px;
    padding: 10px 20px;
  }

  .page-lottery__advantages-list li {
    font-size: 15px;
    padding: 15px;
  }

  .page-lottery__advantages-list li p strong {
    font-size: 16px;
  }

  .page-lottery__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-lottery__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-lottery__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-lottery__faq-answer {
    padding: 0 15px;
  }
  
  .page-lottery__faq-item.active .page-lottery__faq-answer {
    padding: 15px !important;
  }

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

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

  .page-lottery__brand-item h3 {
    font-size: 20px;
  }

  .page-lottery__brand-item p {
    font-size: 15px;
  }

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

  .page-lottery__blog-item-title {
    font-size: 18px;
    margin: 15px;
  }

  .page-lottery__blog-item-excerpt {
    font-size: 14px;
    margin: 0 15px 10px 15px;
  }

  .page-lottery__blog-item-date {
    margin: 0 15px 15px 15px;
  }

  /* Responsive images, videos, and buttons */
  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-lottery video,
  .page-lottery__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-lottery__section,
  .page-lottery__card,
  .page-lottery__container,
  .page-lottery__game-card,
  .page-lottery__brand-item,
  .page-lottery__blog-item,
  .page-lottery__video-section,
  .page-lottery__video-container,
  .page-lottery__video-wrapper,
  .page-lottery__cta-buttons,
  .page-lottery__button-group,
  .page-lottery__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }

  .page-lottery__cta-button,
  .page-lottery__game-button,
  .page-lottery__play-now-button,
  .page-lottery a[class*="button"],
  .page-lottery a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-lottery__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
    flex-direction: column; /* For vertical stacking of CTA buttons on mobile */
  }
}