:root {
  --color-primary: #C61F1F;
  --color-secondary: #E53030;
  --color-button-gradient: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
  --color-card-bg: #2A1212;
  --color-background-main: #140C0C; /* Overall page background */
  --color-text-main: #FFF1E8;
  --color-border: #6A1E1E;
  --color-gold: #F3C54D;
  --color-deep-red: #7E0D0D;

  /* Text colors for light/dark backgrounds */
  --color-text-on-dark: #FFF1E8; /* From Text Main */
  --color-text-on-light: #333333; /* Default for light backgrounds */
  --color-light-background: #ffffff;
  --color-medium-light-background: #f9f9f9;
}

.page-download {
  font-family: 'Arial', sans-serif;
  color: var(--color-text-on-dark); /* Default text color for the overall page, assuming dark body background from shared.css */
  background-color: var(--color-background-main); /* Specific background for main content area */
  line-height: 1.6;
  font-size: 16px;
}

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

.page-download__section-title {
  font-size: 38px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--color-gold); /* Using gold for main titles */
}

.page-download__section-title--light {
  color: var(--color-text-on-dark); /* White for titles on dark sections */
}

.page-download__section-description {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--color-text-on-dark);
}

.page-download__section-description--light {
  color: var(--color-text-on-dark);
}

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

.page-download__btn-primary {
  background: var(--color-button-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 176, 74, 0.4);
}

.page-download__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 176, 74, 0.6);
}

.page-download__btn-secondary {
  background: transparent;
  color: var(--color-gold);
  border: 2px solid var(--color-gold);
  box-shadow: 0 4px 15px rgba(243, 197, 77, 0.2);
}

.page-download__btn-secondary:hover {
  background: rgba(243, 197, 77, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(243, 197, 77, 0.4);
}

.page-download__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  width: 100%; /* Ensure container takes full width */
  max-width: 100%; /* Ensure container takes full width */
  overflow: hidden; /* Prevent overflow */
  box-sizing: border-box;
}

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

/* Hero Section */
.page-download__hero-section {
  padding-top: 10px; /* Small top padding, assuming body has padding-top from shared.css */
  background: var(--color-deep-red); /* Using Deep Red for hero background */
  padding-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.page-download__hero-content-wrapper {
  display: flex;
  flex-direction: column; /* Image above text for desktop too, then text for h1/desc/cta */
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-download__hero-image {
  width: 100%;
  max-width: 1000px; /* Max width for the image */
  margin-bottom: 30px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

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

.page-download__hero-text-content {
  text-align: center;
  max-width: 900px;
}

.page-download__main-title {
  font-size: clamp(32px, 4vw, 56px); /* Use clamp for H1 font size */
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--color-gold);
}

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

/* Why Download Section */
.page-download__why-download-section {
  padding: 80px 0;
  background-color: var(--color-background-main);
}

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

.page-download__feature-card {
  background: var(--color-card-bg);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--color-text-on-dark);
  border: 1px solid var(--color-border);
}

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

.page-download__feature-card img {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
  display: block; /* Ensure block for max-width 100% */
}

.page-download__feature-card .page-download__card-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--color-gold);
}

.page-download__feature-card p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-on-dark);
}

/* How To Download Section */
.page-download__how-to-download-section {
  padding: 80px 0;
  background-color: var(--color-background-main);
}

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

.page-download__step-card {
  background: var(--color-light-background); /* White background for steps */
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  color: var(--color-text-on-light);
  border: 1px solid #e0e0e0;
}

.page-download__step-card .page-download__card-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--color-primary); /* Primary color for step titles */
}

.page-download__step-card p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--color-text-on-light);
}

.page-download__step-card img {
  width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}

/* Game Showcase Section */
.page-download__game-showcase-section {
  padding: 80px 0;
  background-color: var(--color-background-main);
}

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

.page-download__game-card {
  background: var(--color-card-bg);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--color-text-on-dark);
  border: 1px solid var(--color-border);
}

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

.page-download__game-card img {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
  display: block;
}

.page-download__game-card .page-download__card-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}

.page-download__game-card .page-download__card-title a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-download__game-card .page-download__card-title a:hover {
  color: var(--color-gold); /* Keep gold on hover */
  text-decoration: underline;
}

.page-download__game-card p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-on-dark);
}

/* Promotions Section */
.page-download__promotions-section {
  padding: 80px 0;
  background-color: var(--color-background-main);
}

.page-download__promotions-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 50px;
}

.page-download__promotion-item {
  flex: 1 1 calc(50% - 30px);
  max-width: calc(50% - 30px);
  background: var(--color-card-bg);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--color-text-on-dark);
  border: 1px solid var(--color-border);
}

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

.page-download__promotion-item img {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
  display: block;
}

.page-download__promotion-item .page-download__card-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}

.page-download__promotion-item .page-download__card-title a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-download__promotion-item .page-download__card-title a:hover {
  color: var(--color-gold);
  text-decoration: underline;
}

.page-download__promotion-item p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-on-dark);
}


/* FAQ Section */
.page-download__faq-section {
  padding: 80px 0;
  background-color: var(--color-background-main);
}

.page-download__faq-list {
  margin-top: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

details.page-download__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: var(--color-card-bg);
  color: var(--color-text-on-dark);
}
details.page-download__faq-item summary.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  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: var(--color-deep-red);
}
.page-download__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--color-gold); /* FAQ question text color */
}
.page-download__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-gold);
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}
details.page-download__faq-item .page-download__faq-answer {
  padding: 0 25px 25px;
  background: var(--color-card-bg); /* Answer background same as card */
  border-radius: 0 0 8px 8px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-on-dark);
}

/* Final CTA Section */
.page-download__final-cta-section {
  padding: 80px 0;
  background: var(--color-deep-red); /* Using Deep Red for this section */
  text-align: center;
}

.page-download__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
  .page-download__main-title {
    font-size: clamp(30px, 5vw, 48px);
  }
  .page-download__section-title {
    font-size: 32px;
  }
  .page-download__hero-description,
  .page-download__section-description {
    font-size: 17px;
  }
  .page-download__btn-primary,
  .page-download__btn-secondary {
    padding: 12px 25px;
    font-size: 16px;
  }
  .page-download__features-grid,
  .page-download__download-steps-grid,
  .page-download__game-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  .page-download__promotion-item {
    flex: 1 1 calc(100% - 30px);
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .page-download {
    font-size: 15px;
    line-height: 1.5;
  }
  .page-download__container {
    padding: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* HERO 主图区域 */
  .page-download__hero-section {
    padding-top: 10px; /* Still 10px as body padding-top is assumed */
    padding-bottom: 40px;
  }
  .page-download__hero-content-wrapper {
    padding: 0 15px;
  }
  .page-download__hero-image {
    margin-bottom: 20px;
  }
  .page-download__hero-image img {
    object-fit: contain !important; /* Mobile: contain, not cover */
    aspect-ratio: unset !important; /* Allow natural aspect ratio */
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-download__main-title {
    font-size: clamp(28px, 8vw, 40px);
    margin-bottom: 15px;
  }
  .page-download__hero-description {
    font-size: 16px;
    margin-bottom: 25px;
  }

  /* 按钮与按钮容器 */
  .page-download__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    margin-top: 20px;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .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__section-title {
    font-size: 28px;
    margin-bottom: 15px;
  }
  .page-download__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  /* 通用图片与容器 */
  .page-download img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-download__why-download-section,
  .page-download__how-to-download-section,
  .page-download__game-showcase-section,
  .page-download__promotions-section,
  .page-download__faq-section,
  .page-download__final-cta-section {
    padding: 40px 0;
  }
  .page-download__features-grid,
  .page-download__download-steps-grid,
  .page-download__game-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 25px;
    margin-top: 30px;
  }
  .page-download__feature-card,
  .page-download__step-card,
  .page-download__game-card {
    padding: 25px;
  }
  .page-download__feature-card img,
  .page-download__step-card img,
  .page-download__game-card img {
    max-height: 200px; /* Adjust max height for mobile cards */
  }

  /* 产品展示图区域 (mobile only for specific rules, here general grid) */
  .page-download__game-grid {
    overflow-x: hidden; /* Ensure no horizontal scroll for game grid */
  }

  .page-download__promotions-list {
    flex-direction: column;
    gap: 25px;
    margin-top: 30px;
  }
  .page-download__promotion-item {
    flex: 1 1 100%;
    max-width: 100%;
  }

  /* FAQ */
  details.page-download__faq-item summary.page-download__faq-question {
    padding: 15px 20px;
  }
  .page-download__faq-qtext {
    font-size: 16px;
  }
  .page-download__faq-toggle {
    font-size: 24px;
    width: 24px;
  }
  details.page-download__faq-item .page-download__faq-answer {
    padding: 0 20px 20px;
  }
}