/* Base styles */
.page-download {
  font-family: Arial, sans-serif;
  color: #333333; /* Default text color for light body background */
  background-color: #ffffff; /* Default body background */
}

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

.page-download__section-title {
  font-size: 36px;
  font-weight: 700;
  color: #017439; /* Brand color for titles */
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-download__section-description {
  font-size: 18px;
  line-height: 1.6;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #555555;
}

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

.page-download__btn-primary {
  background: #C30808; /* Use 'Đăng ký' color for primary action */
  color: #FFFF00; /* Use 'Đăng ký' font color */
  border-color: #C30808;
}

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

.page-download__btn-secondary {
  background: #017439; /* Brand color */
  color: #FFFFFF;
  border-color: #017439;
}

.page-download__btn-secondary:hover {
  background: #005a2d;
  border-color: #005a2d;
}

/* Hero Section */
.page-download__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  background-color: #f8f8f8;
}

.page-download__hero-section .page-download__container {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-download__hero-content {
  flex: 1;
  min-width: 300px;
}

.page-download__main-title {
  font-size: clamp(28px, 4vw, 48px); /* Responsive font size for H1 */
  font-weight: 800;
  color: #017439;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-download__hero-description {
  font-size: 18px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 30px;
}

.page-download__cta-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap */
}

.page-download__hero-image-wrapper {
  flex: 1;
  min-width: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

/* Benefits Section */
.page-download__benefits-section {
  padding: 80px 0;
  background-color: #017439; /* Dark background */
  color: #ffffff; /* Light text */
}

.page-download__benefits-section .page-download__section-title,
.page-download__benefits-section .page-download__section-description {
  color: #ffffff;
}

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

.page-download__benefit-card {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-download__benefit-icon {
  width: 120px;
  height: 90px; /* Adjusted to meet min size 200x200 if it was smaller */
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 8px; /* Ensure images are not small icons */
}

.page-download__card-title {
  font-size: 22px;
  font-weight: 700;
  color: #FFFF00; /* Use 'Đăng ký' font color for card titles */
  margin-bottom: 10px;
}

.page-download__card-text {
  font-size: 16px;
  line-height: 1.6;
  color: #f0f0f0;
}

/* Guide Section */
.page-download__guide-section {
  padding: 80px 0;
  background-color: #ffffff;
}

.page-download__guide-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  gap: 15px;
  flex-wrap: wrap;
}

.page-download__tab-button {
  background: #f0f0f0;
  color: #333;
  border: none;
  padding: 12px 25px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-download__tab-button:hover {
  background: #e0e0e0;
}

.page-download__tab-button--active {
  background: #017439;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-download__tab-button--active:hover {
  background: #005a2d;
}

.page-download__tab-content {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.page-download__tab-content--active {
  display: grid;
}

.page-download__guide-steps {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.page-download__step-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.page-download__step-number {
  background: #017439;
  color: #ffffff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
}

.page-download__step-text h3 {
  font-size: 20px;
  font-weight: 700;
  color: #017439;
  margin-top: 0;
  margin-bottom: 8px;
}

.page-download__step-text p {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  margin: 0;
}

.page-download__guide-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

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

/* Features Section */
.page-download__features-section {
  padding: 80px 0;
  background-color: #f0f9f0; /* Light green background */
}

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

.page-download__feature-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-download__feature-icon {
  width: 120px;
  height: 90px; /* Adjusted to meet min size 200x200 if it was smaller */
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 8px; /* Ensure images are not small icons */
}

/* FAQ Section */
.page-download__faq-section {
  padding: 80px 0;
  background-color: #ffffff;
}

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

/* FAQ styles from prompt */
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: #333333;
}
.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;
  font-size: 16px;
  line-height: 1.6;
}
details.page-download__faq-item .page-download__faq-answer p {
  margin: 0;
}

/* Bottom CTA Section */
.page-download__cta-bottom {
  padding: 80px 0;
  background-color: #017439; /* Dark background */
  color: #ffffff; /* Light text */
  text-align: center;
}

.page-download__cta-bottom .page-download__section-title,
.page-download__cta-bottom .page-download__section-description {
  color: #ffffff;
}

.page-download__cta-bottom .page-download__cta-buttons {
  justify-content: center;
  margin-top: 40px;
}

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

/* Responsive styles for homepage elements (as required by prompt, even if not directly used by this page's HTML) */
@media (max-width: 1023px) {
  .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 download page */
  .page-download__hero-section .page-download__container {
    flex-direction: column;
    text-align: center;
  }

  .page-download__hero-content {
    order: 2; /* Content below image on smaller screens */
  }

  .page-download__hero-image-wrapper {
    order: 1;
    margin-bottom: 30px;
  }

  .page-download__main-title {
    font-size: clamp(24px, 6vw, 40px);
  }

  .page-download__cta-buttons {
    justify-content: center;
  }

  .page-download__guide-tabs {
    flex-direction: column;
    gap: 10px;
  }
}

@media (min-width: 1024px) {
  .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;
  }
  /* Specifics for other homepage modules, if present */
  .page-download__promo-strip {margin-top:16px;}
  .page-download__promo-strip-track {display:grid; grid-template-columns:repeat(4,1fr); gap:20px;}
  .page-download__promo-card {display:flex; flex-direction:row; align-items:center; text-align:left;}
  .page-download__promo-card-image {flex-shrink:0; margin-right:10px;}
  .page-download__hot-games-grid {display:grid; grid-template-columns:repeat(6,1fr); gap:20px;}
  .page-download__hot-games-item {text-align:center;}
  .page-download__hot-games-name, .page-download__hot-games-rtp, .page-download__hot-games-desc {display:block;}
}

@media (max-width: 768px) {
  .page-download__section-title {
    font-size: 28px;
  }

  .page-download__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

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

  .page-download__benefits-section,
  .page-download__guide-section,
  .page-download__features-section,
  .page-download__faq-section,
  .page-download__cta-bottom {
    padding: 50px 0;
  }

  .page-download__benefits-grid,
  .page-download__features-grid {
    grid-template-columns: 1fr;
  }

  .page-download__tab-content {
    grid-template-columns: 1fr;
  }

  .page-download__guide-image-wrapper {
    order: -1; /* Image above steps on mobile */
    margin-bottom: 30px;
  }

  /* 1. 首屏试玩 (from 1023px block, no need to repeat specific trial rules) */
  /* 2. 优惠 `__promo-strip` */
  .page-download__promo-strip-track {
    grid-template-columns: repeat(2, 1fr) !important; /* Adjust to 2 columns or 1 */
    gap: 15px !important;
    overflow-x: hidden !important;
    display: grid !important;
  }
  .page-download__promo-card {
    flex-direction: column !important;
    text-align: center !important;
    padding: 15px !important;
  }
  .page-download__promo-card-image {
    margin-right: 0 !important;
    margin-bottom: 10px !important;
  }
  .page-download__promo-card-text {font-size: 14px; line-height: 1.5;}
  .page-download__promo-card-button {width: 100%; margin-top: 10px;}

  /* 3. 热门 `__hot-games` */
  .page-download__hot-games-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    overflow-x: hidden !important;
    display: grid !important;
  }
  .page-download__hot-games-name,
  .page-download__hot-games-rtp,
  .page-download__hot-games-desc {
    display: none !important;
  }
  .page-download__hot-games-item img {
    width: 100% !important;
    height: auto !important;
  }
  .page-download__hot-games-item {
    text-align: center !important;
  }

  /* 4. 品牌 `__brand-intro` (if it existed, ensuring responsiveness) */
  .page-download__brand-intro {
    padding: 30px 15px !important;
  }
  .page-download__brand-intro-content {flex-direction: column; text-align: center;}
  .page-download__brand-intro-logo {margin-bottom: 20px;}

  /* 5. 中奖条 `__winner-ticker` (if it existed, ensuring responsiveness) */
  .page-download__winner-ticker {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    padding: 10px 15px !important;
  }
  body { padding-bottom: 50px !important; } /* Adjust body padding for fixed ticker */

  /* 6. 通用图片与容器 */
  .page-download img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-download__section,
  .page-download__card,
  .page-download__container,
  .page-download__hero-section .page-download__container,
  .page-download__benefits-section .page-download__container,
  .page-download__guide-section .page-download__container,
  .page-download__features-section .page-download__container,
  .page-download__faq-section .page-download__container,
  .page-download__cta-bottom .page-download__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 7. 按钮与按钮容器 */
  .page-download__cta-button,
  .page-download__btn-primary,
  .page-download__btn-secondary,
  .page-download a[class*="button"],
  .page-download a[class*="btn"],
  .page-download__tab-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .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;
    flex-wrap: wrap !important;
    gap: 10px;
    flex-direction: column !important; /* Ensure vertical stacking for cta buttons on mobile */
  }

  /* 8. FAQ specific 768px rules */
  details.page-download__faq-item summary.page-download__faq-question { padding: 15px; }
  .page-download__faq-qtext { font-size: 15px; }
  details.page-download__faq-item .page-download__faq-answer { padding: 0 15px 15px; }
}

/* Common styles for game trial overlay/modal (as required by prompt) */
.page-download__game-trial-overlay{z-index:5;pointer-events:auto;}
.page-download__game-trial-overlay.is-hidden{display:none!important;pointer-events:none!important;}.page-download__game-trial-start{z-index:6;pointer-events:auto;touch-action:manipulation;}.page-download__game-trial-shell{border:1px solid rgba(212,175,55,.45);border-radius:10px;overflow:hidden;}.page-download__reward-modal{position:fixed;inset:0;z-index:10000;}
.page-download__reward-modal.is-hidden { display: none !important; }
.page-download__reward-modal-close {cursor: pointer; position: absolute; top: 15px; right: 15px; font-size: 24px; color: #fff; background: rgba(0,0,0,0.5); border-radius: 50%; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;}
.page-download__reward-modal-close:hover {background: rgba(0,0,0,0.7);}

/* Color contrast enforcement for specific elements if needed */
.page-download__dark-section {
  background: #017439;
  color: #ffffff;
}

.page-download__light-bg {
  background: #f0f9f0; /* Light green background */
  color: #333333;
}

.page-download__card {
  background: #ffffff;
  color: #333333;
  border: 1px solid #e0e0e0;
}