/* ============================================================
   AFFILIATE.CSS — Affiliate module specific styles
   Works alongside existing CSS without overriding
   ============================================================ */

/* ── Affiliate Landing Section ── */
.affiliate-promo-section {
  background: linear-gradient(135deg, #0b0c1a 0%, #1a1a3e 50%, #2d1b69 100%);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.affiliate-promo-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 40%, rgba(123, 47, 247, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 75% 60%, rgba(255, 60, 142, 0.15) 0%, transparent 50%);
}

.affiliate-promo-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.affiliate-promo-content h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 20px;
}

.affiliate-promo-content h1 span {
  background: linear-gradient(135deg, #7B2FF7, #FF3C8E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.affiliate-promo-content p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* ── Commission Tiers ── */
.commission-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.commission-tier {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.4s ease;
  border: 1px solid #f0f0f0;
}

.commission-tier:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(123, 47, 247, 0.15);
}

.commission-tier.featured {
  border: 2px solid var(--primary-color, #7B2FF7);
  background: linear-gradient(180deg, rgba(123, 47, 247, 0.04) 0%, #fff 100%);
}

.commission-tier .tier-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #7B2FF7, #FF3C8E);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.commission-tier .tier-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(123, 47, 247, 0.1), rgba(255, 60, 142, 0.1));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary-color, #7B2FF7);
}

.commission-tier h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.commission-tier .rate {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #7B2FF7, #FF3C8E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.commission-tier .rate-desc {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 16px;
}

.commission-tier ul {
  text-align: left;
  list-style: none;
  padding: 0;
}

.commission-tier ul li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 8px;
}

.commission-tier ul li i {
  color: #28a745;
  font-size: 0.8rem;
}

/* ── Affiliate Stats Cards ── */
.aff-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.aff-stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid #f0f2f8;
  transition: all 0.3s ease;
}

.aff-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.aff-stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.aff-stat-card .stat-icon.purple {
  background: linear-gradient(135deg, rgba(123, 47, 247, 0.15), rgba(123, 47, 247, 0.05));
  color: #7B2FF7;
}

.aff-stat-card .stat-icon.pink {
  background: linear-gradient(135deg, rgba(255, 60, 142, 0.15), rgba(255, 60, 142, 0.05));
  color: #FF3C8E;
}

.aff-stat-card .stat-icon.blue {
  background: linear-gradient(135deg, rgba(123, 47, 247, 0.15), rgba(123, 47, 247, 0.05));
  color: #7B2FF7;
}

.aff-stat-card .stat-icon.green {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.15), rgba(40, 167, 69, 0.05));
  color: #28a745;
}

.aff-stat-card .stat-info h4 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.aff-stat-card .stat-info p {
  font-size: 0.82rem;
  color: #888;
  margin: 0;
}

/* ── Leaderboard ── */
.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.leaderboard-table th {
  font-size: 0.8rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 16px;
  text-align: left;
}

.leaderboard-table td {
  padding: 14px 16px;
  background: #fff;
  font-size: 0.9rem;
}

.leaderboard-table tr td:first-child {
  border-radius: 10px 0 0 10px;
}

.leaderboard-table tr td:last-child {
  border-radius: 0 10px 10px 0;
}

.leaderboard-rank {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.leaderboard-rank.gold { background: #fef3cd; color: #d4a017; }
.leaderboard-rank.silver { background: #e8ecf4; color: #6c757d; }
.leaderboard-rank.bronze { background: #fce8e0; color: #d35400; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .commission-tiers {
    grid-template-columns: 1fr;
  }

  .aff-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .affiliate-promo-content h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .aff-stats-row {
    grid-template-columns: 1fr;
  }
}
