/* Mandatory homepage-related CSS as per prompt, even for inner page */
@media (max-width: 1023px) {
  .page-affiliate-program__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-affiliate-program__hero-brand,
  .page-affiliate-program__hero-jackpot {
    display: none !important;
  }
  .page-affiliate-program__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-affiliate-program__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-affiliate-program__game-trial-topbar,
  .page-affiliate-program__game-trial-bottombar {
    display: none !important;
  }
  .page-affiliate-program__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-affiliate-program__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-affiliate-program__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-affiliate-program__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

@media (min-width: 1024px) {
  .page-affiliate-program__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-affiliate-program__hero-brand,
  .page-affiliate-program__hero-jackpot,
  .page-affiliate-program__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-affiliate-program__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-affiliate-program__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-affiliate-program__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-affiliate-program__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-affiliate-program__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
}

/* Mandatory elements for homepage that are needed for the CSS field, even if not directly used by affiliate-program.html's content */
.page-affiliate-program__game-trial-overlay {z-index:5;pointer-events:auto;}.page-affiliate-program__game-trial-overlay.is-hidden{display:none!important;pointer-events:none!important;}.page-affiliate-program__game-trial-start{z-index:6;pointer-events:auto;touch-action:manipulation;}.page-affiliate-program__game-trial-shell{border:1px solid rgba(212,175,55,.45);border-radius:10px;overflow:hidden;}.page-affiliate-program__reward-modal{position:fixed;inset:0;z-index:10000;}.page-affiliate-program__reward-modal-close{position:absolute;top:10px;right:10px;background:transparent;border:none;font-size:24px;color:#fff;cursor:pointer;}.page-affiliate-program--reward-open{overflow:hidden;}

/* Page-specific styles for affiliate-program.html */
.page-affiliate-program {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #FFF6D6; /* Text Main */
    background: #0A0A0A; /* Background */
}

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

.page-affiliate-program__hero-section {
    position: relative;
    padding: 60px 0;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(242, 193, 78, 0.1) 0%, rgba(10, 10, 10, 0.8) 100%);
}

.page-affiliate-program__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.page-affiliate-program__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.page-affiliate-program__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(10, 10, 10, 0.7);
    border-radius: 10px;
}

.page-affiliate-program__main-title {
    font-size: clamp(28px, 4vw, 48px);
    color: #F2C14E; /* Main color */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-affiliate-program__description {
    font-size: 18px;
    margin-bottom: 30px;
    color: #FFF6D6;
}

.page-affiliate-program__btn-primary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
    color: #0A0A0A; /* Dark text for light button */
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
}

.page-affiliate-program__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(242, 193, 78, 0.6);
}

.page-affiliate-program__section-title {
    font-size: clamp(24px, 3vw, 40px);
    color: #F2C14E;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

.page-affiliate-program__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #FFD36B;
    border-radius: 2px;
}

.page-affiliate-program__benefits-section {
    padding: 80px 0;
    background: #0A0A0A; /* Background */
}

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

.page-affiliate-program__benefit-card {
    background: #111111; /* Card BG */
    border: 1px solid #3A2A12; /* Border */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

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

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

.page-affiliate-program__card-title {
    font-size: 24px;
    color: #FFD36B; /* Auxiliary color */
    margin-bottom: 15px;
}

.page-affiliate-program__card-text {
    font-size: 16px;
    color: #FFF6D6; /* Text Main */
}

.page-affiliate-program__how-it-works-section {
    padding: 80px 0;
    background: #0A0A0A; /* Background */
}

.page-affiliate-program__steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.page-affiliate-program__step-card {
    background: #111111; /* Card BG */
    border: 1px solid #3A2A12; /* Border */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    padding-top: 60px;
}

.page-affiliate-program__step-number {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #F2C14E; /* Main color */
    color: #0A0A0A;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    border: 3px solid #FFD36B;
    box-shadow: 0 0 15px rgba(242, 193, 78, 0.6);
}

.page-affiliate-program__cta-wrapper {
    text-align: center;
    margin-top: 40px;
}

.page-affiliate-program__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    background: #111111; /* Card BG */
    color: #F2C14E; /* Main color */
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 2px solid #F2C14E;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-affiliate-program__btn-secondary:hover {
    background: #F2C14E;
    color: #0A0A0A;
    border-color: #FFD36B;
}

.page-affiliate-program__faq-section {
    padding: 80px 0;
    background: #0A0A0A; /* Background */
}

.page-affiliate-program__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

details.page-affiliate-program__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #3A2A12; /* Border */
  overflow: hidden;
  background: #111111; /* Card BG */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
details.page-affiliate-program__faq-item summary.page-affiliate-program__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;
  color: #FFF6D6; /* Text Main */
}
details.page-affiliate-program__faq-item summary.page-affiliate-program__faq-question::-webkit-details-marker {
  display: none;
}
details.page-affiliate-program__faq-item summary.page-affiliate-program__faq-question:hover {
  background: #1a1a1a;
}
.page-affiliate-program__faq-qtext {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFF6D6;
}
.page-affiliate-program__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFD36B; /* Auxiliary color */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-affiliate-program__faq-item .page-affiliate-program__faq-answer {
  padding: 0 20px 20px;
  background: #0A0A0A; /* Background */
  border-radius: 0 0 5px 5px;
  color: #FFF6D6;
}
.page-affiliate-program__faq-answer p {
    margin: 0;
    font-size: 16px;
    color: #FFF6D6;
}

.page-affiliate-program__contact-cta {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(180deg, rgba(242, 193, 78, 0.1) 0%, rgba(10, 10, 10, 0.8) 100%);
}

/* Responsive styles */
@media (max-width: 1023px) {
    .page-affiliate-program__hero-section {
        padding: 40px 0;
    }
    .page-affiliate-program__hero-content {
        padding: 15px;
    }
    .page-affiliate-program__benefits-section,
    .page-affiliate-program__how-it-works-section,
    .page-affiliate-program__faq-section,
    .page-affiliate-program__contact-cta {
        padding: 60px 0;
    }
    .page-affiliate-program__section-title {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    /* General image and container responsiveness */
    .page-affiliate-program img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-affiliate-program__container,
    .page-affiliate-program__hero-content,
    .page-affiliate-program__benefits-section,
    .page-affiliate-program__how-it-works-section,
    .page-affiliate-program__faq-section,
    .page-affiliate-program__contact-cta {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-affiliate-program__benefits-grid,
    .page-affiliate-program__steps-grid {
        grid-template-columns: 1fr;
    }
    .page-affiliate-program__main-title {
        font-size: 28px;
    }
    .page-affiliate-program__description {
        font-size: 16px;
    }
    .page-affiliate-program__btn-primary,
    .page-affiliate-program__btn-secondary {
        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;
        font-size: 16px;
    }
    .page-affiliate-program__cta-wrapper {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    .page-affiliate-program__faq-item summary.page-affiliate-program__faq-question { padding: 15px; }
    .page-affiliate-program__faq-qtext { font-size: 15px; }
    .page-affiliate-program__faq-answer { padding: 0 15px 15px; }

    /* Empty mandatory blocks for homepage media queries, as per prompt. Not directly used by affiliate-program.html but required to be present. */
    /* 1. 首屏试玩: Handled by 1023px block above. */
    /* 2. 优惠 __promo-strip: Not applicable to this inner page content, but if it existed, its 768px would be here. */
    /* 3. 热门 __hot-games: Not applicable to this inner page content, but if it existed, its 768px would be here. */
    /* 4. 品牌 __brand-intro: Not applicable to this inner page content. */
    /* 5. 中奖条 __winner-ticker: Not applicable to this inner page content. */
}

/* Additional specific media queries for 768px for the affiliate page content */
@media (max-width: 768px) {
    .page-affiliate-program__hero-section {
        padding: 30px 0;
    }
    .page-affiliate-program__benefits-section,
    .page-affiliate-program__how-it-works-section,
    .page-affiliate-program__faq-section,
    .page-affiliate-program__contact-cta {
        padding: 40px 0;
    }
    .page-affiliate-program__benefit-card,
    .page-affiliate-program__step-card {
        padding: 25px;
        padding-top: 50px;
    }
    .page-affiliate-program__step-number {
        top: -20px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}