/* Base Styles for page-download */
.page-download {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: #f5f5f5;
}

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

.page-download__section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #017439;
}

.page-download__text-block p {
  margin-bottom: 15px;
  font-size: 17px;
  line-height: 1.7;
  text-align: justify;
}

.page-download__text-block ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 15px;
  font-size: 17px;
}

.page-download__text-block li {
  margin-bottom: 8px;
}

/* Hero Section */
.page-download__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, relies on body padding-top from shared */
  padding-bottom: 40px;
  background: linear-gradient(135deg, #017439, #005f2f);
  color: #ffffff;
  text-align: center;
}

.page-download__hero-image-wrapper {
  width: 100%;
  max-width: 1200px;
  margin-bottom: 30px;
}

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

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

.page-download__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #FFFF00; /* Use custom color for prominent title */
}

.page-download__subtitle {
  font-size: 1.25rem;
  margin-bottom: 30px;
  line-height: 1.5;
  color: #f0f0f0;
}

.page-download__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-download__btn-primary,
.page-download__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box;
  max-width: 100%;
}

.page-download__btn-primary {
  background-color: #C30808; /* Custom color for Register/Login/Download */
  color: #FFFF00; /* Custom color for Register/Login font */
  border: 2px solid #C30808;
}

.page-download__btn-primary:hover {
  background-color: #e00b0b;
  border-color: #e00b0b;
}

.page-download__btn-secondary {
  background-color: transparent;
  color: #FFFF00; /* Custom color for Register/Login font */
  border: 2px solid #FFFF00;
}

.page-download__btn-secondary:hover {
  background-color: #FFFF00;
  color: #C30808;
}

/* Intro Section */
.page-download__intro-section {
  padding: 60px 0;
  background-color: #ffffff;
  color: #333333;
}

/* Why Download Section */
.page-download__dark-bg {
  background-color: #017439;
  color: #ffffff;
  padding: 60px 0;
}

.page-download__dark-bg .page-download__section-title {
  color: #ffffff;
}

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

.page-download__feature-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
}

.page-download__feature-icon {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-bottom: 20px;
  object-fit: contain;
  border-radius: 8px;
  min-width: 200px;
  min-height: 200px;
}

.page-download__card-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #FFFF00;
}

.page-download__feature-card p {
  font-size: 16px;
  line-height: 1.6;
  color: #f0f0f0;
}

/* How to Download Section */
.page-download__how-to-download-section {
  padding: 60px 0;
  background-color: #f9f9f9;
  color: #333333;
}

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

.page-download__step-item {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
}

.page-download__step-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  margin-bottom: 25px;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-download__step-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #017439;
}

.page-download__step-item ol {
  text-align: left;
  margin: 0 0 25px 20px;
  padding: 0;
  font-size: 16px;
  line-height: 1.7;
  color: #555555;
}

.page-download__step-item ol li {
  margin-bottom: 10px;
}

.page-download__btn-small {
  padding: 10px 20px;
  font-size: 16px;
}

/* Featured Games Section */
.page-download__featured-games-section {
  padding: 60px 0;
  background-color: #017439;
  color: #ffffff;
}

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

.page-download__game-card {
  background-color: 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);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
}

.page-download__game-image {
  width: 100%;
  max-width: 300px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-download__game-card .page-download__card-title {
  color: #FFFF00;
  font-size: 20px;
  margin-bottom: 10px;
}

.page-download__game-card p {
  font-size: 15px;
  line-height: 1.6;
  color: #f0f0f0;
  flex-grow: 1;
  margin-bottom: 20px;
}

.page-download__btn-link {
  color: #FFFF00;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 15px;
  border: 1px solid #FFFF00;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.page-download__btn-link:hover {
  background-color: #FFFF00;
  color: #017439;
}

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

/* Promotions Section */
.page-download__promotions-section {
  padding: 60px 0;
  background-color: #ffffff;
  color: #333333;
}

.page-download__promotions-section ul {
  list-style-type: disc;
  margin-left: 25px;
  margin-bottom: 25px;
  font-size: 17px;
  color: #555555;
}

.page-download__promotions-section ul li {
  margin-bottom: 10px;
}

.page-download__promotions-section strong {
  color: #017439;
}

/* FAQ Section */
.page-download__faq-section {
  padding: 60px 0;
  background-color: #f9f9f9;
  color: #333333;
}

details.page-download__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
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: #017439;
}
.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;
  color: #555555;
}

/* Conclusion Section */
.page-download__conclusion-section {
  padding: 60px 0 80px;
  background-color: #017439;
  color: #ffffff;
  text-align: center;
}

.page-download__conclusion-section .page-download__section-title {
  color: #ffffff;
}

.page-download__conclusion-section p {
  max-width: 800px;
  margin: 0 auto 30px;
  font-size: 18px;
  line-height: 1.7;
  color: #f0f0f0;
}

/* Universal Image Adaption */
.page-download img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-download__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }
  .page-download__subtitle {
    font-size: 1.15rem;
  }
  .page-download__section-title {
    font-size: 28px;
  }
  .page-download__grid-features,
  .page-download__download-steps,
  .page-download__games-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
  }
  .page-download__feature-card,
  .page-download__step-item,
  .page-download__game-card {
    padding: 25px;
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-download__hero-section {
    padding-top: 10px; /* Small top padding for mobile */
    padding-bottom: 30px;
  }
  .page-download__hero-image-wrapper {
    margin-bottom: 20px;
  }
  .page-download__hero-image {
    object-fit: contain !important; /* Mobile: prevent cropping */
    aspect-ratio: unset !important; /* Mobile: unset aspect ratio */
    border-radius: 0;
    box-shadow: none;
  }
  .page-download__hero-content {
    padding: 0 15px;
  }
  .page-download__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    margin-bottom: 15px;
  }
  .page-download__subtitle {
    font-size: 1rem;
    margin-bottom: 25px;
  }
  .page-download__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%; /* Button container width */
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
  }
  .page-download__btn-primary,
  .page-download__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 16px;
    padding: 12px 20px;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  /* General Sections & Content Containers */
  .page-download__container,
  .page-download__section,
  .page-download__card,
  .page-download__hero-section,
  .page-download__intro-section,
  .page-download__why-download-section,
  .page-download__how-to-download-section,
  .page-download__featured-games-section,
  .page-download__promotions-section,
  .page-download__faq-section,
  .page-download__conclusion-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-download__section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }
  .page-download__text-block p,
  .page-download__text-block ul,
  .page-download__text-block li {
    font-size: 16px;
  }

  /* Why Download Section */
  .page-download__dark-bg {
    padding: 40px 0;
  }
  .page-download__grid-features {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-download__feature-card {
    padding: 20px;
  }
  .page-download__feature-icon {
    max-width: 150px;
  }
  .page-download__card-title {
    font-size: 20px;
  }

  /* How to Download Section */
  .page-download__how-to-download-section {
    padding: 40px 0;
  }
  .page-download__download-steps {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .page-download__step-item {
    padding: 20px;
  }
  .page-download__step-title {
    font-size: 22px;
  }
  .page-download__step-item ol {
    font-size: 15px;
  }
  .page-download__btn-small {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 15px;
    padding: 10px 15px;
  }

  /* Featured Games Section */
  .page-download__featured-games-section {
    padding: 40px 0;
  }
  .page-download__games-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-download__game-card {
    padding: 20px;
  }
  .page-download__game-image {
    max-width: 250px;
  }
  .page-download__game-card .page-download__card-title {
    font-size: 18px;
  }
  .page-download__game-card p {
    font-size: 14px;
  }
  .page-download__btn-link {
    font-size: 14px;
    padding: 6px 12px;
  }
  .page-download__cta-center {
    margin-top: 30px;
  }

  /* Promotions Section */
  .page-download__promotions-section {
    padding: 40px 0;
  }
  .page-download__promotions-section ul {
    font-size: 16px;
  }

  /* FAQ Section */
  .page-download__faq-section {
    padding: 40px 0;
  }
  details.page-download__faq-item summary.page-download__faq-question { padding: 15px; }
  .page-download__faq-qtext { font-size: 15px; }
  .page-download__faq-toggle { font-size: 20px; width: 24px; height: 24px; margin-left: 10px; }
  details.page-download__faq-item .page-download__faq-answer { padding: 0 15px 15px; }

  /* Conclusion Section */
  .page-download__conclusion-section {
    padding: 40px 0 60px;
  }
  .page-download__conclusion-section p {
    font-size: 16px;
  }

  /* Universal Image Adaption for mobile */
  .page-download img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}

/* Ensure min image size in content area */
.page-download img:not(.page-download__hero-image) {
  min-width: 200px;
  min-height: 200px;
}

/* Body background color handling based on shared.css default */
/* Assuming --accent-color is a light color by default, so main content uses dark text */
.page-download__light-bg {
  background-color: #ffffff;
  color: #333333;
}
.page-download__dark-bg {
  background-color: #017439;
  color: #ffffff;
}