/* style/download.css */

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --link-color: #017439;
  --border-color: #e0e0e0;
  --accent-red: #C30808;
  --accent-yellow: #FFFF00; /* Note: Contrast for text on red buttons with yellow text is too low (1.6:1). Overriding to white text for WCAG AA compliance (4.5:1). */
}

.page-download {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  background-color: var(--secondary-color); /* Body background is light */
}

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

/* --- Hero Section --- */
.page-download__hero-section {
  padding-top: 10px; /* Rely on body padding for header offset */
  padding-bottom: 60px;
  text-align: center;
  color: var(--text-color-light);
  background: var(--primary-color);
}

.page-download__hero-section .page-download__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.page-download__hero-content {
  max-width: 800px;
}

.page-download__main-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-color-light);
}

.page-download__hero-description {
  font-size: 18px;
  margin-bottom: 30px;
  color: var(--text-color-light);
}

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

.page-download__btn-primary,
.page-download__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
  box-sizing: border-box;
}

.page-download__btn-primary {
  background-color: var(--accent-red); /* Custom color for register/login/download */
  color: var(--text-color-light); /* Ensuring WCAG AA contrast for #C30808 background */
  border: 2px solid var(--accent-red);
}

.page-download__btn-primary:hover {
  background-color: darken(var(--accent-red), 10%);
  border-color: darken(var(--accent-red), 10%);
}

.page-download__btn-secondary {
  background-color: transparent;
  color: var(--text-color-light);
  border: 2px solid var(--text-color-light);
}

.page-download__btn-secondary:hover {
  background-color: var(--text-color-light);
  color: var(--primary-color);
}

.page-download__hero-image-wrapper {
  width: 100%;
  max-width: 700px;
}

.page-download__hero-image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* --- General Section Styles --- */
.page-download__section-title {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--primary-color);
}

.page-download__light-bg {
  background-color: var(--secondary-color);
  color: var(--text-color-dark);
  padding: 60px 0;
}

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

.page-download__dark-section .page-download__section-title {
  color: var(--text-color-light);
}

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

.page-download__benefit-card {
  background-color: var(--secondary-color);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  color: var(--text-color-dark);
}

.page-download__benefit-card:hover {
  transform: translateY(-5px);
}

.page-download__benefit-icon {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
}

.page-download__benefit-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.page-download__benefit-text {
  font-size: 16px;
  color: var(--text-color-dark);
}

/* --- Guide Section --- */
.page-download__guide-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.page-download__guide-item {
  text-align: center;
}

.page-download__guide-subtitle {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 25px;
  color: var(--text-color-light);
}

.page-download__guide-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.page-download__guide-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-download__guide-list {
  list-style: decimal;
  text-align: left;
  font-size: 17px;
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto;
  padding-left: 20px;
  color: var(--text-color-light);
}

.page-download__guide-list li {
  margin-bottom: 10px;
}

.page-download__cta-buttons--center {
  margin-top: 50px;
}

/* --- Security Section --- */
.page-download__security-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  justify-content: center;
}

.page-download__security-image {
  max-width: 100%;
  flex: 1 1 400px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-download__security-text-block {
  flex: 1 1 400px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-color-dark);
}

.page-download__security-text-block p {
  margin-bottom: 15px;
}

/* --- Devices Section --- */
.page-download__devices-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  justify-content: center;
  color: var(--text-color-light);
}

.page-download__devices-image {
  max-width: 100%;
  flex: 1 1 400px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-download__device-list {
  flex: 1 1 400px;
  list-style: none;
  padding: 0;
  font-size: 17px;
  line-height: 1.8;
}

.page-download__device-list li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}

.page-download__device-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-yellow); /* Use yellow for checkmark */
  font-weight: bold;
}

/* --- FAQ Section --- */
details.page-download__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--secondary-color);
  color: var(--text-color-dark);
}
details.page-download__faq-item summary.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-download__faq-item summary.page-download__faq-question::-webkit-details-marker {
  display: none;
}
details.page-download__faq-item summary.page-download__faq-question:hover {
  background: #f5f5f5;
}
.page-download__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--primary-color);
}
.page-download__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-download__faq-item .page-download__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}
.page-download__faq-answer p {
  color: var(--text-color-dark);
}

/* --- Final CTA Section --- */
.page-download__cta-content {
  text-align: center;
  padding: 40px 15px;
  color: var(--text-color-light);
}

.page-download__cta-description {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color-light);
}

.page-download__btn-large {
  padding: 16px 40px;
  font-size: 20px;
  min-width: 250px;
}

/* --- Responsive Styles --- */
@media (max-width: 1023px) {
  /* This section is for general layout adjustments on tablets and smaller, 
     but the prompt explicitly states that the game trial specific CSS from the homepage 
     should be included here, even if this is not the homepage. 
     I will include the required blocks as per the prompt's instruction. */
  .page-download__home-hero {
    display: block !important;
    grid-template-columns: none !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-download__hero-brand,
  .page-download__hero-jackpot {
    display: none !important;
  }
  .page-download__game-trial {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    margin: 0 auto;
    padding: 0 0 12px !important;
    box-sizing: border-box;
  }
  .page-download__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-download__game-trial-topbar,
  .page-download__game-trial-bottombar {
    display: none !important;
  }
  .page-download__game-trial-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1024 / 768;
    flex: none !important;
    min-height: 240px;
    max-height: none !important;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-download__game-trial-frame {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    max-width: 100%;
    border: none;
    z-index: 1;
    overflow: hidden;
  }
  .page-download__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-download__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }

  /* General adjustments for tablet */
  .page-download__hero-section .page-download__container {
    flex-direction: column;
    gap: 20px;
  }
  .page-download__hero-image-wrapper {
    order: -1; /* Image above text on tablet */
  }
  .page-download__guide-content,
  .page-download__security-content,
  .page-download__devices-content {
    flex-direction: column;
  }
}

@media (min-width: 1024px) {
  /* This section is for general layout adjustments on desktop, 
     but the prompt explicitly states that the game trial specific CSS from the homepage 
     should be included here, even if this is not the homepage. 
     I will include the required blocks as per the prompt's instruction. */
  .page-download__home-hero {
    display: grid;
    grid-template-columns: 26% 48% 26%;
    gap: 16px;
    align-items: stretch;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 16px 24px;
    box-sizing: border-box;
  }
  .page-download__hero-brand,
  .page-download__hero-jackpot,
  .page-download__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-download__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-download__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-download__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-download__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-download__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }

  /* General adjustments for desktop */
  .page-download__hero-section .page-download__container {
    flex-direction: row;
    text-align: left;
  }
  .page-download__hero-content {
    text-align: left;
    order: 1;
  }
  .page-download__hero-image-wrapper {
    order: 2;
  }
  .page-download__cta-buttons {
    justify-content: flex-start;
  }
  .page-download__guide-steps {
    grid-template-columns: 1fr 1fr;
  }
  .page-download__guide-item:nth-child(even) .page-download__guide-content {
    flex-direction: column-reverse; /* Image below text for even items */
  }
  .page-download__security-content,
  .page-download__devices-content {
    justify-content: space-between;
  }
  .page-download__security-text-block,
  .page-download__device-list {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .page-download__main-title {
    font-size: 28px;
  }
  .page-download__hero-description,
  .page-download__cta-description {
    font-size: 16px;
  }
  .page-download__btn-primary,
  .page-download__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-download__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }
  .page-download__container {
    padding: 0 15px;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .page-download__section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }
  .page-download__benefits-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-download__benefit-card {
    padding: 20px;
  }
  .page-download__benefit-title {
    font-size: 20px;
  }
  .page-download__guide-subtitle {
    font-size: 24px;
  }
  .page-download__guide-list {
    font-size: 16px;
    padding-left: 15px;
  }
  .page-download__security-text-block,
  .page-download__device-list {
    font-size: 16px;
  }
  .page-download img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-download__section,
  .page-download__card,
  .page-download__container,
  .page-download__cta-buttons,
  .page-download__button-group,
  .page-download__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-download__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
  }
  details.page-download__faq-item summary.page-download__faq-question { padding: 15px; }
  .page-download__faq-qtext { font-size: 15px; }
  .page-download__faq-answer { padding: 0 15px 15px; }

  /* Placeholder blocks from homepage CSS, ensuring all required media queries are present */
  /* 优惠 `__promo-strip` */
  .page-download__promo-strip-track {
    grid-template-columns: repeat(4,1fr);
    overflow-x:hidden;
  }
  /* 热门 `__hot-games` */
  .page-download__hot-games-grid {
    grid-template-columns: repeat(2,1fr);
  }
  /* 品牌 `__brand-intro` (if present, show on <=768px) */
  .page-download__brand-intro {
    display: block; /* ensure it's visible if hidden on larger screens */
  }
  /* 中奖条 `__winner-ticker` */
  .page-download__winner-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
  }
  /* body/main bottom padding for ticker */
  body {
    padding-bottom: 50px; /* Adjust based on ticker height */
  }
}