/* style/lottery.css */

:root {
  --primary-color: #E0B400; /*帝王金*/
  --secondary-color: #1A1A2E; /*太空蓝*/
  --accent-color: #00BFFF; /*电光蓝*/
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark-1: #1A1A2E;
  --bg-dark-2: #2A2A3E;
  --bg-light-1: #f8f8f8;
  --bg-light-2: #ffffff;
}

/* 页面基础样式 */
.page-lottery {
  font-family: 'Arial', sans-serif;
  color: var(--text-light); /* Assuming body background is dark */
  line-height: 1.6;
  padding-top: 100px; /* Adjust for fixed header on desktop */
}

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

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

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

.page-lottery__section-title {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: inherit; /* Inherit color from parent section */
}

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

/* Hero Section */
.page-lottery__hero-section {
  padding: 80px 0;
  text-align: center;
  background: var(--bg-dark-1);
  color: var(--text-light);
}

.page-lottery__main-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--primary-color);
}

.page-lottery__hero-description {
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-lottery__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

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

.page-lottery__btn-primary:hover {
  background: var(--accent-color);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-lottery__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* About Xổ Số Section */
.page-lottery__about-xoso-section {
  padding: 60px 0;
  background: var(--bg-light-1);
  color: var(--text-dark);
}

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

.page-lottery__text-block {
  flex: 1;
}

.page-lottery__text-block p {
  margin-bottom: 15px;
  font-size: 17px;
}

.page-lottery__image-wrapper {
  flex: 1;
  text-align: center;
}

.page-lottery__image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 auto;
}

/* Game Types Section */
.page-lottery__game-types-section {
  padding: 60px 0;
  background: var(--bg-dark-2);
  color: var(--text-light);
}

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

.page-lottery__card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 25px;
  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;
  color: var(--text-light);
}

.page-lottery__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-lottery__card-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

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

.page-lottery__card-description {
  font-size: 16px;
  margin-bottom: 20px;
  flex-grow: 1;
}

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

/* How To Play Section */
.page-lottery__how-to-play-section {
  padding: 60px 0;
  background: var(--bg-light-2);
  color: var(--text-dark);
}

.page-lottery__steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step-counter;
}

.page-lottery__step-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
  background: #ffffff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.page-lottery__step-number {
  counter-increment: step-counter;
  width: 45px;
  height: 45px;
  min-width: 45px;
  min-height: 45px;
  background: var(--primary-color);
  color: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  margin-right: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.page-lottery__step-content h3 {
  font-size: 22px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.page-lottery__step-content p {
  font-size: 16px;
  margin: 0;
}

.page-lottery__cta-buttons--center {
  margin-top: 40px;
}

/* Why Choose Section */
.page-lottery__why-choose-section {
  padding: 60px 0;
  background: var(--bg-dark-1);
  color: var(--text-light);
}

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

.page-lottery__feature-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-lottery__feature-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: none; /* Ensure no CSS filter changes color */
}

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

.page-lottery__feature-item p {
  font-size: 16px;
}

/* Tips Section */
.page-lottery__tips-section {
  padding: 60px 0;
  background: var(--bg-light-1);
  color: var(--text-dark);
}

.page-lottery__tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

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

.page-lottery__tip-icon {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 15px;
  filter: none; /* Ensure no CSS filter changes color */
}

.page-lottery__tip-item h4 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.page-lottery__tip-item p {
  font-size: 16px;
}

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

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

.page-lottery__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-dark-1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-lottery__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--bg-dark-1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-lottery__faq-question:hover {
  background: var(--bg-dark-2);
  border-color: var(--primary-color);
}

.page-lottery__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-light);
  pointer-events: none;
}

.page-lottery__faq-toggle {
  font-size: 28px;
  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: 30px;
  height: 30px;
}

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

.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 25px;
  opacity: 0;
  color: var(--text-light);
}

.page-lottery__faq-item.active .page-lottery__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to accommodate content */
  padding: 20px 25px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 0 8px 8px;
}

.page-lottery__faq-answer p {
  font-size: 16px;
  margin: 0;
}

/* Final CTA Section */
.page-lottery__final-cta-section {
  padding: 80px 0;
  text-align: center;
  background: var(--bg-light-1);
  color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-lottery__main-title {
    font-size: 42px;
  }
  .page-lottery__section-title {
    font-size: 32px;
  }
  .page-lottery__hero-description, .page-lottery__section-subtitle {
    font-size: 18px;
  }
  .page-lottery__content-grid {
    flex-direction: column;
  }
  .page-lottery__image-wrapper {
    margin-top: 30px;
  }
  .page-lottery__card-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-lottery {
    padding-top: 80px !important; /* Adjust for fixed header on mobile */
    font-size: 16px;
    line-height: 1.6;
  }
  .page-lottery__container {
    padding: 0 15px;
  }
  .page-lottery__hero-section, .page-lottery__about-xoso-section,
  .page-lottery__game-types-section, .page-lottery__how-to-play-section,
  .page-lottery__why-choose-section, .page-lottery__tips-section,
  .page-lottery__faq-section, .page-lottery__final-cta-section {
    padding: 40px 0;
  }
  .page-lottery__main-title {
    font-size: 32px;
  }
  .page-lottery__section-title {
    font-size: 28px;
  }
  .page-lottery__hero-description, .page-lottery__section-subtitle {
    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;
  }
  .page-lottery__step-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
  }
  .page-lottery__step-number {
    margin-right: 0;
    margin-bottom: 15px;
  }
  .page-lottery__step-content h3 {
    font-size: 20px;
  }
  .page-lottery__features-grid, .page-lottery__tips-list {
    grid-template-columns: 1fr;
  }
  .page-lottery__feature-icon, .page-lottery__tip-icon {
    width: 60px;
    height: 60px;
  }
  .page-lottery__faq-question {
    padding: 15px 20px;
  }
  .page-lottery__faq-question h3 {
    font-size: 16px;
  }
  .page-lottery__faq-toggle {
    font-size: 24px;
    width: 24px;
    height: 24px;
  }
  .page-lottery__faq-answer {
    padding: 0 20px;
  }
  .page-lottery__faq-item.active .page-lottery__faq-answer {
    padding: 15px 20px !important;
  }
  /* Ensure all images are responsive and do not overflow */
  .page-lottery img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-lottery__section,
  .page-lottery__card,
  .page-lottery__container,
  .page-lottery__image-wrapper,
  .page-lottery__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-lottery__hero-section, .page-lottery__about-xoso-section,
  .page-lottery__game-types-section, .page-lottery__how-to-play-section,
  .page-lottery__why-choose-section, .page-lottery__tips-section,
  .page-lottery__faq-section, .page-lottery__final-cta-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}