/* style/lottery.css */
:root {
  --primary-color: #007bff;
  --secondary-color: #ffc107;
  --text-color-dark-bg: #ffffff;
  --text-color-light-bg: #333333;
  --background-dark: #1a1a1a;
  --background-light: #f4f4f4;
  --card-background-dark: rgba(255, 255, 255, 0.1);
  --card-background-light: #ffffff;
  --border-color: #e0e0e0;
}

.page-lottery {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark-bg); /* Body background is dark, so text is light */
  background-color: transparent; /* Use transparent to let body background shine through */
}

/* 🚨 桌面端视频区域样式（必须严格遵守） */
.page-lottery__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* 桌面端：根据导航栏实际高度调整 */
  background-color: var(--background-dark);
}

.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: rgba(0, 123, 255, 0.8);
  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: #ffffff;
  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: 20px;
  box-sizing: border-box;
}

.page-lottery__section-title {
  font-size: 36px;
  color: var(--text-color-dark-bg);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-lottery__section-description {
  font-size: 18px;
  color: var(--text-color-dark-bg);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* H1 Title Section */
.page-lottery__title-section {
  background-color: var(--background-dark);
  padding: 80px 20px;
  text-align: center;
  color: var(--text-color-dark-bg);
  padding-top: 120px; /* Adjust for fixed header */
}

.page-lottery__main-title {
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--primary-color); /* Using brand color for H1 */
}

.page-lottery__title-description {
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color-dark-bg);
}

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

.page-lottery__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background-color: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-lottery__cta-button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* About Section (Dark Background) */
.page-lottery__dark-section {
  background-color: var(--background-dark);
  padding: 60px 20px;
  color: var(--text-color-dark-bg);
}

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

.page-lottery__content-item {
  background: var(--card-background-dark);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

.page-lottery__item-image {
  max-width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: contain; /* Ensure image content is visible */
  margin-bottom: 20px;
  border-radius: 8px;
}

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

.page-lottery__content-item p {
  font-size: 16px;
  color: var(--text-color-dark-bg);
}

/* Guide Section */
.page-lottery__guide-section {
  background-color: var(--background-light);
  padding: 60px 20px;
  color: var(--text-color-light-bg);
}

.page-lottery__guide-section .page-lottery__section-title,
.page-lottery__guide-section .page-lottery__section-description {
  color: var(--text-color-light-bg);
}

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

.page-lottery__step-item {
  background: var(--card-background-light);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.page-lottery__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

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

.page-lottery__step-item p {
  font-size: 16px;
  color: var(--text-color-light-bg);
  margin-bottom: 20px;
}

.page-lottery__btn-small {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--secondary-color);
  color: var(--text-color-light-bg);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-lottery__btn-small:hover {
  background-color: #e0a800;
  transform: translateY(-2px);
}

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

.page-lottery__promo-item {
  background: var(--card-background-dark);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

.page-lottery__promo-image {
  max-width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover; /* Cover the area */
  margin-bottom: 20px;
  border-radius: 8px;
}

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

.page-lottery__promo-item p {
  font-size: 16px;
  color: var(--text-color-dark-bg);
  margin-bottom: 20px;
}

.page-lottery__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background-color: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-lottery__btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* Brand Section */
.page-lottery__brand-section {
  background-color: var(--background-light);
  padding: 60px 20px;
  color: var(--text-color-light-bg);
}

.page-lottery__brand-section .page-lottery__section-title {
  color: var(--text-color-light-bg);
}

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

.page-lottery__brand-item {
  background: var(--card-background-light);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

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

.page-lottery__brand-item p {
  font-size: 16px;
  color: var(--text-color-light-bg);
}

/* FAQ Section */
.page-lottery__faq-section {
  background-color: var(--background-dark);
  padding: 60px 20px;
  color: var(--text-color-dark-bg);
}

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

/* 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;
  color: var(--text-color-light-bg);
}

/* 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: var(--card-background-light);
  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: var(--card-background-dark);
  border: 1px solid rgba(255, 255, 255, 0.2);
  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: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.page-lottery__faq-question:active {
  background: rgba(255, 255, 255, 0.1);
}

/* 问题标题样式 */
.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-dark-bg);
}

/* 切换图标 */
.page-lottery__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  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(--secondary-color);
  transform: rotate(45deg); /* For '-' symbol */
}

/* Blog Section */
.page-lottery__blog-section {
  background-color: var(--background-dark);
  padding: 60px 20px;
  color: var(--text-color-dark-bg);
}

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

.page-lottery__blog-item {
  background: var(--card-background-dark);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-lottery__blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.page-lottery__blog-link {
  text-decoration: none;
  color: inherit;
  display: block;
  padding-bottom: 20px;
}

.page-lottery__blog-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  margin-bottom: 15px;
}

.page-lottery__blog-item-title {
  font-size: 20px;
  color: var(--primary-color);
  margin: 0 20px 10px;
  font-weight: bold;
}

.page-lottery__blog-item-excerpt {
  font-size: 15px;
  color: var(--text-color-dark-bg);
  margin: 0 20px 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.page-lottery__view-more-cta {
  text-align: center;
  margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-lottery__main-title {
    font-size: 42px;
  }
  .page-lottery__section-title {
    font-size: 32px;
  }
  .page-lottery__title-description {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .page-lottery__video-section {
    padding-top: 10px !important; /* Mobile: Adjust for fixed header */
    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; /* Ensure video content is visible */
  }
  
  .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__title-section {
    padding-top: 100px; /* Adjust for mobile fixed header */
    padding: 40px 15px;
  }
  .page-lottery__main-title {
    font-size: 32px;
  }
  .page-lottery__section-title {
    font-size: 28px;
  }
  .page-lottery__title-description {
    font-size: 16px;
  }
  .page-lottery__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }
  .page-lottery__cta-button {
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    padding: 12px 20px;
    font-size: 16px;
  }
  .page-lottery__container {
    padding: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-lottery__content-grid,
  .page-lottery__steps-grid,
  .page-lottery__promo-grid,
  .page-lottery__brand-content,
  .page-lottery__blog-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-lottery__content-item,
  .page-lottery__step-item,
  .page-lottery__promo-item,
  .page-lottery__brand-item,
  .page-lottery__blog-item {
    padding: 20px;
  }
  .page-lottery__item-image,
  .page-lottery__promo-image,
  .page-lottery__blog-image {
    height: 180px; /* Adjust height for mobile */
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-lottery__item-title,
  .page-lottery__step-title,
  .page-lottery__promo-title,
  .page-lottery__brand-subtitle,
  .page-lottery__blog-item-title {
    font-size: 20px;
  }
  .page-lottery p,
  .page-lottery li {
    font-size: 15px;
  }
  .page-lottery__btn-small,
  .page-lottery__btn-primary {
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    padding: 10px 15px;
    font-size: 15px;
  }
  .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__blog-item-title {
    margin: 0 15px 10px;
  }
  .page-lottery__blog-item-excerpt,
  .page-lottery__blog-item-date {
    margin: 0 15px 15px;
  }
}

@media (max-width: 480px) {
  .page-lottery__main-title {
    font-size: 28px;
  }
  .page-lottery__section-title {
    font-size: 24px;
  }
  .page-lottery__play-now-button {
    font-size: 14px !important;
    padding: 10px 25px !important;
  }
}