:root {
  --primary-color: #1A237E;
  --secondary-color: #FFD700;
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #121212;
  --background-light: #f8f9fa;
  --border-color: #e0e0e0;
}

/* Reset & Base Styles */
.page-lottery {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Dark body background #121212, so use light text */
  background-color: var(--background-dark);
  padding-top: 120px; /* Adjust for fixed header */
}

.page-lottery a {
  text-decoration: none;
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

.page-lottery a:hover {
  color: var(--text-light);
}

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

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

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

.page-lottery__dark-section {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 80px 0;
}

.page-lottery__hero-section {
  padding-top: 120px; /* Ensure content is below fixed header */
  padding-bottom: 80px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #0D144F 100%);
  text-align: center;
}

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

.page-lottery__hero-description {
  font-size: 20px;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: var(--text-light);
}

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

.page-lottery__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-lottery__cta-button--primary {
  background: var(--secondary-color);
  color: var(--primary-color);
}

.page-lottery__cta-button--primary:hover {
  background: #FFC107;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-lottery__cta-button--secondary {
  background: var(--primary-color);
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.page-lottery__cta-button--secondary:hover {
  background: #0D144F;
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-lottery__intro-section {
  padding: 80px 0;
  background-color: var(--background-dark);
  color: var(--text-light);
}

.page-lottery__content-grid {
  display: flex;
  gap: 40px;
  align-items: center;
}

.page-lottery__content-text {
  flex: 1;
}

.page-lottery__content-text p {
  margin-bottom: 20px;
  font-size: 17px;
  color: var(--text-light);
}

.page-lottery__content-image {
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-lottery__content-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-lottery__btn-primary {
  display: inline-block;
  padding: 12px 30px;
  background: var(--secondary-color);
  color: var(--primary-color);
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin-top: 20px;
}

.page-lottery__btn-primary:hover {
  background: #FFC107;
  transform: translateY(-2px);
}

.page-lottery__games-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #0D144F 0%, var(--primary-color) 100%);
}

.page-lottery__games-section .page-lottery__section-title, 
.page-lottery__games-section .page-lottery__section-subtitle {
  color: var(--secondary-color);
}

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

.page-lottery__game-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding-bottom: 25px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.page-lottery__game-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  margin-bottom: 20px;
}

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

.page-lottery__card-link {
  color: var(--secondary-color);
  text-decoration: none;
}

.page-lottery__card-link:hover {
  color: var(--text-light);
}

.page-lottery__card-description {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 20px;
  padding: 0 15px;
}

.page-lottery__btn-small {
  display: inline-block;
  padding: 10px 25px;
  background: var(--secondary-color);
  color: var(--primary-color);
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

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

.page-lottery__guide-section {
  padding: 80px 0;
  background-color: var(--background-dark);
  color: var(--text-light);
}

.page-lottery__guide-section .page-lottery__section-title, 
.page-lottery__guide-section .page-lottery__section-subtitle {
  color: var(--secondary-color);
}

.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: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-lottery__step-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-lottery__step-item img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 25px auto;
  display: block;
}

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

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

.page-lottery__why-choose-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, #0D144F 100%);
}

.page-lottery__why-choose-section .page-lottery__section-title, 
.page-lottery__why-choose-section .page-lottery__section-subtitle {
  color: var(--secondary-color);
}

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

.page-lottery__feature-item {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-lottery__feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-lottery__feature-item img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0 auto 20px auto;
  display: block;
}

.page-lottery__feature-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.page-lottery__feature-description {
  font-size: 16px;
  color: var(--text-light);
}

.page-lottery__faq-section {
  padding: 80px 0;
  background-color: var(--background-dark);
  color: var(--text-light);
}

.page-lottery__faq-section .page-lottery__section-title {
  color: var(--secondary-color);
}

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

/* FAQ容器样式 */
.page-lottery__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 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 20px;
  opacity: 0;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
}

/* FAQ展开状态 - 🚨 Sử dụng !important và đủ lớn max-height để đảm bảo có thể mở rộng */
.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 !important;
  opacity: 1;
}

/* Vấn đề phong cách */
.page-lottery__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background-color: var(--primary-color);
  border: 1px solid #0D144F;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-light);
}

.page-lottery__faq-question:hover {
  background-color: #0D144F;
  border-color: #080c36;
}

.page-lottery__faq-question:active {
  background-color: #080c36;
}

/* Tiêu đề câu hỏi */
.page-lottery__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp */
  color: var(--secondary-color);
}

/* Biểu tượng chuyển đổi */
.page-lottery__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn biểu tượng chặn sự kiện nhấp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  transform: rotate(0deg);
}

.page-lottery__faq-item.active .page-lottery__faq-toggle {
  color: var(--text-light);
  transform: rotate(180deg);
}

.page-lottery__conclusion-section {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(135deg, #0D144F 0%, var(--primary-color) 100%);
}

.page-lottery__conclusion-section .page-lottery__section-title, 
.page-lottery__conclusion-section .page-lottery__section-subtitle {
  color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-lottery__main-title {
    font-size: 42px;
  }
  .page-lottery__hero-description {
    font-size: 18px;
  }
  .page-lottery__section-title {
    font-size: 32px;
  }
  .page-lottery__section-subtitle {
    font-size: 16px;
  }
  .page-lottery__content-grid {
    flex-direction: column;
  }
  .page-lottery__content-image {
    margin-top: 30px;
  }
}

@media (max-width: 768px) {
  .page-lottery {
    padding-top: 100px !important; /* Mobile fixed header adjustment */
    font-size: 16px;
    line-height: 1.6;
  }
  .page-lottery__hero-section {
    padding-top: 100px !important; /* Mobile fixed header adjustment */
    padding-bottom: 60px;
  }
  .page-lottery__main-title {
    font-size: 32px;
  }
  .page-lottery__hero-description {
    font-size: 16px;
  }
  .page-lottery__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-lottery__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 25px;
    font-size: 16px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-lottery__container {
    padding: 0 15px;
  }
  .page-lottery__section-title {
    font-size: 28px;
  }
  .page-lottery__section-subtitle {
    font-size: 15px;
    margin-bottom: 30px;
  }
  .page-lottery__intro-section, .page-lottery__games-section, .page-lottery__guide-section, .page-lottery__why-choose-section, .page-lottery__faq-section, .page-lottery__conclusion-section {
    padding: 60px 0;
  }
  .page-lottery__content-text p {
    font-size: 15px;
  }
  .page-lottery__game-card img {
    height: 180px;
  }
  .page-lottery__card-title {
    font-size: 20px;
  }
  .page-lottery__card-description {
    font-size: 15px;
  }
  .page-lottery__btn-small {
    padding: 9px 20px;
    font-size: 14px;
  }
  .page-lottery__step-item img {
    width: 100px;
    height: 100px;
  }
  .page-lottery__step-title {
    font-size: 20px;
  }
  .page-lottery__step-description {
    font-size: 15px;
  }
  .page-lottery__feature-item img {
    width: 80px;
    height: 80px;
  }
  .page-lottery__feature-title {
    font-size: 20px;
  }
  .page-lottery__feature-description {
    font-size: 15px;
  }

  /* FAQ Mobile Styles */
  .page-lottery__faq-question {
    padding: 15px;
  }
  .page-lottery__faq-question h3 {
    font-size: 16px;
  }
  .page-lottery__faq-toggle {
    font-size: 24px;
    width: 25px;
    height: 25px;
  }
  .page-lottery__faq-item.active .page-lottery__faq-answer {
    padding: 15px !important;
  }

  /* Image and button general responsive rules */
  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-lottery__section, .page-lottery__card, .page-lottery__container, .page-lottery__content-image, .page-lottery__cta-buttons, .page-lottery__btn-primary, .page-lottery__btn-small {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden !important;
  }
  .page-lottery__cta-buttons, .page-lottery__game-cards, .page-lottery__steps-grid, .page-lottery__features-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .page-lottery__game-card, .page-lottery__step-item, .page-lottery__feature-item {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  .page-lottery__main-title {
    font-size: 28px;
  }
  .page-lottery__hero-description {
    font-size: 14px;
  }
  .page-lottery__section-title {
    font-size: 24px;
  }
  .page-lottery__cta-button {
    padding: 10px 20px;
    font-size: 15px;
  }
  .page-lottery__game-card img {
    height: 160px;
  }
  .page-lottery__card-title {
    font-size: 18px;
  }
  .page-lottery__step-title {
    font-size: 18px;
  }
  .page-lottery__feature-title {
    font-size: 18px;
  }
}