:root {
  --page-affiliate-primary-color: #11A84E; /* 主色调 */
  --page-affiliate-secondary-color: #22C768; /* 辅助色 */
  --page-affiliate-text-main: #F2FFF6; /* Text Main */
  --page-affiliate-text-secondary: #A7D9B8; /* Text Secondary */
  --page-affiliate-card-bg: #11271B; /* Card BG */
  --page-affiliate-background: #08160F; /* 背景 */
  --page-affiliate-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* 按钮渐变 */
  --page-affiliate-border-color: #2E7A4E; /* 边框 */
  --page-affiliate-glow-color: #57E38D; /* Glow */
  --page-affiliate-gold-color: #F2C14E; /* Gold */
  --page-affiliate-divider-color: #1E3A2A; /* Divider */
  --page-affiliate-deep-green: #0A4B2C; /* Deep Green */
}

.page-affiliate {
  background-color: var(--page-affiliate-background); /* Use specified background color */
  color: var(--page-affiliate-text-main); /* Default text color for dark background */
  font-family: Arial, sans-serif; /* A common, readable font */
  line-height: 1.6;
}

.page-affiliate__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* Small top padding, larger bottom for content separation */
  text-align: center;
  position: relative;
  overflow: hidden; /* Ensure no overflow from image */
}

.page-affiliate__hero-image-wrapper {
  width: 100%;
  max-height: 700px; /* Limit height for hero image */
  overflow: hidden;
  margin-bottom: 40px; /* Space between image and content */
}

.page-affiliate__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Ensure image covers the area */
}

.page-affiliate__hero-content {
  max-width: 900px;
  padding: 0 20px;
  margin: 0 auto;
}

.page-affiliate__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--page-affiliate-gold-color); /* Use gold for main title for accent */
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size for H1 */
}

.page-affiliate__description {
  font-size: 1.1rem;
  color: var(--page-affiliate-text-secondary);
  margin-bottom: 30px;
}

.page-affiliate__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-affiliate__btn-primary,
.page-affiliate__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
  min-width: 200px; /* Ensure buttons are not too small */
  text-align: center;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.page-affiliate__btn-primary {
  background: var(--page-affiliate-button-gradient);
  color: #ffffff; /* White text for contrast */
  border: none;
  box-shadow: 0 4px 15px rgba(0, 255, 100, 0.3); /* Greenish glow */
}

.page-affiliate__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 100, 0.4);
}

.page-affiliate__btn-secondary {
  background-color: transparent;
  color: var(--page-affiliate-text-main); /* Light text for dark background */
  border: 2px solid var(--page-affiliate-primary-color);
}

.page-affiliate__btn-secondary:hover {
  background-color: var(--page-affiliate-primary-color);
  color: #ffffff;
  transform: translateY(-2px);
}

/* General section styling */
.page-affiliate__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-affiliate__section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--page-affiliate-gold-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.3;
}

.page-affiliate__section-description {
  font-size: 1rem;
  color: var(--page-affiliate-text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* Why Join Section */
.page-affiliate__why-join-section {
  padding: 80px 0;
  background-color: var(--page-affiliate-background); /* Ensure consistent background */
}

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

.page-affiliate__feature-card {
  background-color: var(--page-affiliate-card-bg);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--page-affiliate-divider-color);
}

.page-affiliate__feature-icon {
  width: 100%;
  max-width: 250px; /* Limit icon size */
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px; /* Soften image corners */
  object-fit: cover;
}

.page-affiliate__card-title {
  font-size: 1.4rem;
  color: var(--page-affiliate-text-main);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-affiliate__card-text {
  font-size: 0.95rem;
  color: var(--page-affiliate-text-secondary);
  flex-grow: 1; /* Ensure text takes up available space */
}

/* How It Works Section */
.page-affiliate__how-it-works-section {
  padding: 80px 0;
  background-color: var(--page-affiliate-deep-green); /* Use a darker green from scheme */
  color: var(--page-affiliate-text-main);
}

.page-affiliate__how-it-works-section .page-affiliate__section-title {
  color: var(--page-affiliate-gold-color); /* Gold title for contrast */
}

.page-affiliate__how-it-works-section .page-affiliate__section-description {
  color: var(--page-affiliate-text-secondary);
}

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

.page-affiliate__step-card {
  background-color: var(--page-affiliate-card-bg);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  border: 1px solid var(--page-affiliate-divider-color);
}

.page-affiliate__step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--page-affiliate-primary-color);
  color: #ffffff;
  font-size: 2rem;
  font-weight: bold;
  margin: 0 auto 20px auto;
  box-shadow: 0 0 15px var(--page-affiliate-glow-color);
}

.page-affiliate__cta-buttons--center {
  margin-top: 60px;
}

/* Commission Section */
.page-affiliate__commission-section {
  padding: 80px 0;
  background-color: var(--page-affiliate-background);
}

.page-affiliate__commission-table-wrapper {
  overflow-x: auto; /* Allow horizontal scroll on small screens */
  margin-top: 40px;
  border: 1px solid var(--page-affiliate-divider-color);
  border-radius: 12px;
}

.page-affiliate__commission-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Ensure table is readable on smaller desktop */
}

.page-affiliate__commission-table th,
.page-affiliate__commission-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--page-affiliate-divider-color);
  color: var(--page-affiliate-text-main);
}

.page-affiliate__commission-table th {
  background-color: var(--page-affiliate-primary-color);
  color: #ffffff;
  font-weight: bold;
  text-transform: uppercase;
}

.page-affiliate__commission-table tbody tr:nth-child(even) {
  background-color: var(--page-affiliate-card-bg); /* Alternate row background */
}

.page-affiliate__commission-table tbody tr:hover {
  background-color: var(--page-affiliate-divider-color);
}

.page-affiliate__note {
  font-size: 0.9rem;
  color: var(--page-affiliate-text-secondary);
  text-align: center;
  margin-top: 30px;
}

/* FAQ Section */
.page-affiliate__faq-section {
  padding: 80px 0;
  background-color: var(--page-affiliate-deep-green);
  color: var(--page-affiliate-text-main);
}

.page-affiliate__faq-section .page-affiliate__section-title {
  color: var(--page-affiliate-gold-color);
}

.page-affiliate__faq-list {
  max-width: 800px;
  margin: 50px auto 0 auto;
}

.page-affiliate__faq-item {
  background-color: var(--page-affiliate-card-bg);
  border: 1px solid var(--page-affiliate-divider-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-affiliate__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--page-affiliate-text-main);
  cursor: pointer;
  background-color: var(--page-affiliate-card-bg);
  transition: background-color 0.3s ease;
  user-select: none;
}

.page-affiliate__faq-item[open] .page-affiliate__faq-question {
  background-color: var(--page-affiliate-divider-color); /* Slightly darker when open */
}

.page-affiliate__faq-question:hover {
  background-color: var(--page-affiliate-divider-color);
}

.page-affiliate__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--page-affiliate-primary-color);
  margin-left: 15px;
}

.page-affiliate__faq-item[open] .page-affiliate__faq-toggle {
  content: '−'; /* Change to minus sign when open */
}

.page-affiliate__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 0.95rem;
  color: var(--page-affiliate-text-secondary);
}

.page-affiliate__faq-answer p {
  margin: 0;
}

/* Contact CTA Section */
.page-affiliate__contact-cta-section {
  padding: 80px 0;
  background-color: var(--page-affiliate-background);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-affiliate__hero-image-wrapper {
    max-height: 600px;
  }
}

@media (max-width: 768px) {
  .page-affiliate__hero-section {
    padding: 10px 0 40px 0;
  }

  .page-affiliate__hero-image-wrapper {
    margin-bottom: 30px;
  }

  .page-affiliate__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-affiliate__description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-affiliate__cta-buttons {
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
  }

  .page-affiliate__btn-primary,
  .page-affiliate__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  .page-affiliate__container {
    padding: 0 15px;
  }

  .page-affiliate__section-title {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    margin-bottom: 15px;
  }

  .page-affiliate__section-description {
    font-size: 0.9rem;
    margin-bottom: 30px;
  }

  .page-affiliate__why-join-section,
  .page-affiliate__how-it-works-section,
  .page-affiliate__commission-section,
  .page-affiliate__faq-section,
  .page-affiliate__contact-cta-section {
    padding: 60px 0;
  }

  .page-affiliate__features-grid,
  .page-affiliate__steps-grid {
    grid-template-columns: 1fr; /* Single column layout for cards */
    gap: 25px;
    margin-top: 40px;
  }

  .page-affiliate__feature-icon {
    max-width: 200px;
  }

  .page-affiliate__card-title {
    font-size: 1.2rem;
  }

  .page-affiliate__card-text {
    font-size: 0.9rem;
  }

  .page-affiliate__commission-table-wrapper {
    margin-top: 30px;
  }

  .page-affiliate__commission-table th,
  .page-affiliate__commission-table td {
    padding: 12px;
    font-size: 0.9rem;
  }

  .page-affiliate__faq-list {
    margin-top: 40px;
  }

  .page-affiliate__faq-question {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .page-affiliate__faq-answer {
    padding: 0 20px 15px 20px;
    font-size: 0.85rem;
  }

  /* Mobile image, video, button forced styles */
  .page-affiliate img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-affiliate__section,
  .page-affiliate__card,
  .page-affiliate__container,
  .page-affiliate__hero-section,
  .page-affiliate__why-join-section,
  .page-affiliate__how-it-works-section,
  .page-affiliate__commission-section,
  .page-affiliate__faq-section,
  .page-affiliate__contact-cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Ensure hero content also has padding */
  .page-affiliate__hero-content {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-affiliate__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
  }
}