/* ═══════════════════════════════════════════
   AFFILIATE PROGRAM STYLES
   ═══════════════════════════════════════════ */

/* ─── NAV USER STATE ─── */
.nav__user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav__user-email {
  font-size: 0.82rem;
  color: var(--text-secondary);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── LOGIN MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
  text-align: center;
}

.modal-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.7rem 1rem;
  background: rgba(10, 15, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: var(--primary);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-error {
  background: rgba(255, 71, 87, 0.1);
  border-left: 3px solid var(--danger);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--danger);
  margin-bottom: 1rem;
}

.form-success {
  background: rgba(0, 212, 170, 0.1);
  border-left: 3px solid var(--primary);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--primary);
}

.form-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal-footer-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.modal-footer-text a {
  color: var(--primary);
  text-decoration: none;
}

.modal-footer-text a:hover {
  text-decoration: underline;
}

/* ─── LIVE DASHBOARD SECTION ─── */
.aff-live-dash {
  padding: 6rem 0;
  background: rgba(20, 27, 45, 0.3);
}

.aff-dash__payout-section {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.aff-dash__payout-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  outline: none;
  font-family: inherit;
  min-width: 0;
}

.aff-dash__payout-input::placeholder {
  color: var(--text-muted);
}

/* ─── HERO ─── */
.aff-hero {
  position: relative;
  padding: 10rem 0 5rem;
  overflow: hidden;
  text-align: center;
}

.aff-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.aff-hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
}

.aff-hero__glow--1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.15;
}

.aff-hero__glow--2 {
  width: 400px;
  height: 400px;
  background: #6366f1;
  bottom: -100px;
  right: -100px;
  opacity: 0.1;
}

.aff-hero__inner {
  position: relative;
  z-index: 1;
}

.aff-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.25);
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.3px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 8px rgba(0, 212, 170, 0); }
}

.aff-hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.2rem;
  color: #fff;
}

.aff-hero__subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.aff-hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.aff-hero__stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1.5rem 2rem;
  background: rgba(20, 27, 45, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  max-width: 650px;
  margin: 0 auto;
  backdrop-filter: blur(10px);
}

.aff-hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.aff-hero__stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.aff-hero__stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.aff-hero__stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
}

/* ─── STEPS ─── */
.aff-steps {
  padding: 6rem 0;
}

.aff-steps__grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.aff-step {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  max-width: 280px;
  flex: 1;
  min-width: 240px;
  position: relative;
  transition: transform 0.3s, border-color 0.3s;
}

.aff-step:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 170, 0.2);
}

.aff-step__num {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--bg);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.aff-step__icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.aff-step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.aff-step p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.aff-step__arrow {
  display: flex;
  align-items: center;
}

/* ─── EARNINGS CALCULATOR ─── */
.aff-earnings {
  padding: 6rem 0;
  background: rgba(20, 27, 45, 0.3);
}

.aff-calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
  align-items: start;
}

.aff-calc__card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
}

.aff-calc__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.aff-calc__table {
  padding: 0.5rem 0;
}

.aff-calc__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 0.85rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.aff-calc__row--header {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.aff-calc__row--highlight {
  background: rgba(0, 212, 170, 0.05);
}

.aff-calc__row .accent {
  font-weight: 700;
}

.aff-calc__note {
  padding: 1rem 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.aff-calc__features {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.aff-calc__feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.aff-calc__feature-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.aff-calc__feature h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
}

.aff-calc__feature p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── WHO CAN JOIN ─── */
.aff-audience {
  padding: 6rem 0;
}

.aff-audience__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.aff-audience__card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.8rem 1.5rem;
  transition: transform 0.3s, border-color 0.3s;
}

.aff-audience__card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 170, 0.2);
}

.aff-audience__icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.aff-audience__card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.aff-audience__card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── DASHBOARD MOCKUP ─── */
.aff-dashboard-preview {
  padding: 6rem 0;
  background: rgba(20, 27, 45, 0.3);
}

.aff-dash-mockup {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}

.aff-dash-mockup__card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.aff-dash__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 700;
  color: #fff;
}

.aff-dash__status {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
}

.aff-dash__stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.aff-dash__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.aff-dash__stat:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.aff-dash__stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.aff-dash__stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.aff-dash__link-box {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.aff-dash__link-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.5rem;
}

.aff-dash__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(10, 15, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.6rem 1rem;
}

.aff-dash__link code {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aff-dash__copy-btn {
  background: var(--primary);
  color: var(--bg);
  border: none;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.aff-dash__copy-btn:hover {
  opacity: 0.85;
}

.aff-dash__referrals-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.aff-dash__count {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.aff-dash__referral {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
}

.aff-dash__ref-email {
  color: var(--text-secondary);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
}

.aff-dash__ref-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.aff-dash__ref-status--qualified {
  background: rgba(0, 212, 170, 0.12);
  color: var(--primary);
}

.aff-dash__ref-status--pending {
  background: rgba(255, 165, 2, 0.12);
  color: var(--warn);
}

.aff-dash__ref-reward {
  font-weight: 700;
  font-size: 0.9rem;
}

/* ─── PROGRAM RULES ─── */
.aff-rules {
  padding: 6rem 0;
}

.aff-rules__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.aff-rules__card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.8rem 1.5rem;
}

.aff-rules__card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.aff-rules__card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.aff-rules__card li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding-left: 1.2rem;
  position: relative;
}

.aff-rules__card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* ─── FAQ ─── */
.aff-faq {
  padding: 6rem 0;
  background: rgba(20, 27, 45, 0.3);
}

.aff-faq__list {
  max-width: 700px;
  margin: 3rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.aff-faq__item {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.aff-faq__item[open] {
  border-color: rgba(0, 212, 170, 0.2);
}

.aff-faq__item summary {
  padding: 1.2rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.aff-faq__item summary::-webkit-details-marker {
  display: none;
}

.aff-faq__item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 600;
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 0.2s;
}

.aff-faq__item[open] summary::after {
  content: '−';
}

.aff-faq__item p {
  padding: 0 1.5rem 1.2rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.aff-faq__item code {
  font-size: 0.82rem;
  background: rgba(0, 212, 170, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--primary);
}

/* ─── JOIN CTA ─── */
.aff-join {
  padding: 6rem 0;
}

.aff-join__inner {
  position: relative;
  text-align: center;
  padding: 4rem 3rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  overflow: hidden;
}

.aff-join__bg-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  background: var(--primary);
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.08;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.aff-join__inner h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 1rem;
  position: relative;
}

.aff-join__inner > p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.6;
  position: relative;
}

.aff-join__steps-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  position: relative;
}

.aff-join__mini-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.aff-join__mini-num {
  background: var(--primary);
  color: var(--bg);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

.aff-join__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* Store buttons reuse from main site */
.store-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  color: #000;
  padding: 0.7rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.store-btn svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.store-btn__label {
  display: block;
  font-size: 0.65rem;
  color: #666;
  line-height: 1;
}

.store-btn__store {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .aff-hero {
    padding: 8rem 0 3rem;
  }

  .aff-hero__stats {
    gap: 1rem;
    padding: 1rem;
  }

  .aff-hero__stat-divider {
    display: none;
  }

  .aff-hero__stat {
    min-width: 80px;
  }

  .aff-steps__grid {
    flex-direction: column;
  }

  .aff-step {
    max-width: 100%;
  }

  .aff-step__arrow {
    transform: rotate(90deg);
  }

  .aff-calc {
    grid-template-columns: 1fr;
  }

  .aff-audience__grid {
    grid-template-columns: 1fr;
  }

  .aff-rules__grid {
    grid-template-columns: 1fr;
  }

  .aff-join__inner {
    padding: 2.5rem 1.5rem;
  }

  .aff-join__steps-mini svg {
    display: none;
  }

  .aff-join__steps-mini {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .aff-hero__title {
    font-size: 2rem;
  }

  .aff-dash__stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .aff-dash__stat:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 1rem;
  }

  .aff-dash__referral {
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
  }

  .aff-dash__ref-email {
    grid-column: 1 / -1;
  }

  .modal-card {
    padding: 2rem 1.25rem;
  }

  .nav__user-email {
    display: none;
  }
}
