/* style/lottery.css */
:root {
  --page-lottery-primary-color: #11A84E;
  --page-lottery-secondary-color: #22C768;
  --page-lottery-bg-color: #08160F;
  --page-lottery-card-bg: #11271B;
  --page-lottery-text-main: #F2FFF6;
  --page-lottery-text-secondary: #A7D9B8;
  --page-lottery-border-color: #2E7A4E;
  --page-lottery-btn-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --page-lottery-glow-color: #57E38D;
  --page-lottery-gold-color: #F2C14E;
  --page-lottery-divider-color: #1E3A2A;
  --page-lottery-deep-green: #0A4B2C;
}

/* body 已 padding-top: var(--header-offset)；页面禁止再写该变量 */
.page-lottery {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--page-lottery-text-main); /* Default text color for the page */
  background-color: var(--page-lottery-bg-color); /* Default background for the page, derived from custom colors */
}

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

.page-lottery__section {
  padding: 60px 0;
  text-align: center;
}

.page-lottery__dark-bg {
  background-color: var(--page-lottery-bg-color);
  color: var(--page-lottery-text-main);
}

.page-lottery__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px 0; /* Small padding-top as body handles header offset */
  overflow: hidden;
  background-color: var(--page-lottery-deep-green);
}

.page-lottery__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.page-lottery__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 40px 20px;
  text-align: center;
  color: var(--page-lottery-text-main);
}

.page-lottery__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--page-lottery-gold-color);
  margin-bottom: 20px;
  max-width: 100%;
  /* Using clamp for responsive font size, avoiding fixed large values */
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

.page-lottery__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--page-lottery-text-secondary);
}

.page-lottery__section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 30px;
  font-weight: bold;
  color: var(--page-lottery-text-main);
}

.page-lottery__text-main {
  color: var(--page-lottery-text-main);
}

.page-lottery__text-secondary {
  color: var(--page-lottery-text-secondary);
}

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

.page-lottery__btn-primary,
.page-lottery__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-lottery__btn-primary {
  background: var(--page-lottery-btn-gradient);
  color: #ffffff; /* White text for primary button */
  border: none;
}

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

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

.page-lottery__btn-secondary:hover {
  background-color: var(--page-lottery-primary-color);
  color: #ffffff;
}

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

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

.page-lottery__card {
  background-color: var(--page-lottery-card-bg);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--page-lottery-border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
}

.page-lottery__card-image {
  width: 100%;
  max-width: 400px; /* Ensure card images are large enough */
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  display: block;
}

.page-lottery__card-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--page-lottery-text-main);
}

.page-lottery__card-text {
  font-size: 0.95em;
  margin-bottom: 20px;
  flex-grow: 1;
  color: var(--page-lottery-text-secondary);
}

.page-lottery__card-button {
  width: 100%;
  text-align: center;
}

.page-lottery__benefit-item {
  background-color: var(--page-lottery-card-bg);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--page-lottery-border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
}

.page-lottery__benefit-image {
  width: 100%;
  max-width: 400px; /* Ensure benefit images are large enough */
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  display: block;
}

.page-lottery__benefit-title {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--page-lottery-text-main);
}

.page-lottery__benefit-text {
  font-size: 0.95em;
  color: var(--page-lottery-text-secondary);
}

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

.page-lottery__guide-list,
.page-lottery__tips-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  text-align: left;
}

.page-lottery__list-item {
  background-color: var(--page-lottery-card-bg);
  border: 1px solid var(--page-lottery-border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 20px;
  font-size: 1.05em;
  color: var(--page-lottery-text-secondary);
}

.page-lottery__list-item b {
  color: var(--page-lottery-text-main);
}

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

.page-lottery__faq-item {
  background-color: var(--page-lottery-card-bg);
  border: 1px solid var(--page-lottery-border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-lottery__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  color: var(--page-lottery-text-main);
  position: relative;
  list-style: none;
}

.page-lottery__faq-question::-webkit-details-marker {
  display: none;
}

.page-lottery__faq-qtext {
  flex-grow: 1;
}

.page-lottery__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--page-lottery-primary-color);
  transition: transform 0.3s ease;
}

.page-lottery__faq-item[open] .page-lottery__faq-toggle {
  transform: rotate(45deg);
}

.page-lottery__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1em;
  line-height: 1.6;
  color: var(--page-lottery-text-secondary);
}

.page-lottery__cta-final {
  background-color: var(--page-lottery-deep-green);
  padding: 80px 0;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .page-lottery__hero-content {
    padding: 30px 15px;
  }

  .page-lottery__main-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .page-lottery__section-title {
    font-size: clamp(1.6rem, 5vw, 2.5rem);
  }

  .page-lottery__grid-3-col,
  .page-lottery__grid-2-col {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .page-lottery__section {
    padding: 40px 0;
  }

  .page-lottery__hero-section {
    padding-bottom: 40px;
  }

  .page-lottery__hero-image {
    max-height: 400px;
  }

  .page-lottery__main-title {
    font-size: clamp(1.8rem, 7vw, 2.8rem);
    margin-bottom: 15px;
  }

  .page-lottery__description {
    font-size: 1em;
    margin-bottom: 25px;
  }

  .page-lottery__section-title {
    font-size: clamp(1.4rem, 6vw, 2.2rem);
  }

  .page-lottery__btn-primary,
  .page-lottery__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 0.95em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-lottery__cta-buttons {
    flex-direction: column !important;
    gap: 10px;
    padding: 0 15px;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-lottery__container {
    padding: 0 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Mobile image responsiveness */
  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-lottery__card-image,
  .page-lottery__benefit-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-lottery__section,
  .page-lottery__card,
  .page-lottery__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-lottery__hero-section {
    padding-top: 10px !important; /* body 已承担 --header-offset，此处禁止 var(--header-offset) */
  }
}

@media (max-width: 480px) {
  .page-lottery__hero-content {
    padding: 20px 10px;
  }

  .page-lottery__main-title {
    font-size: clamp(1.6rem, 8vw, 2.5rem);
  }

  .page-lottery__description {
    font-size: 0.9em;
  }

  .page-lottery__section-title {
    font-size: clamp(1.2rem, 7vw, 2rem);
  }

  .page-lottery__faq-question {
    font-size: 1em;
    padding: 15px;
  }

  .page-lottery__faq-answer {
    padding: 0 15px 15px 15px;
  }
}