/* ==================== Invite Page ==================== */

.invite-page {
  padding: 100px 16px 20px;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* 邀请好友卡片 */
.invite-hero {
  margin-top: 60px;
  margin-bottom: 24px;
}

.invite-hero-card {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #f97316 0%, #ec4899 100%) 1;
  border-radius: 16px;
  padding: 24px;
  position: relative;
}

.invite-hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.invite-hero-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.invite-hero-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.invite-hero-icon svg {
  width: 28px;
  height: 28px;
}

.invite-hero-text {
  flex: 1;
}

.invite-hero-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.invite-hero-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* 邀请码区域 */
.invite-code-section {
  margin-bottom: 16px;
}

.invite-code-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.invite-code-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.invite-code-text {
  font-size: 18px;
  font-weight: 600;
  background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.invite-copy-btn {
  background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
}

.invite-copy-btn:hover {
  opacity: 0.9;
}

.invite-copy-btn svg {
  width: 14px;
  height: 14px;
}

/* 邀请链接区域 */
.invite-link-section {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
}

.invite-link-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.invite-link-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.invite-share-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.invite-share-btn:hover {
  color: #ffffff;
}

.invite-link-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.invite-link-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.invite-link-copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.invite-link-copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.invite-link-copy-btn svg {
  width: 14px;
  height: 14px;
}

/* 分销规则说明 */
.invite-rules {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.invite-rules-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.invite-rules-title svg {
  color: #f97316;
}

.invite-rules-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.invite-rule-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.invite-rule-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.invite-rule-dot-orange {
  background: #f97316;
}

.invite-rule-dot-blue {
  background: #3b82f6;
}

.invite-rule-dot-purple {
  background: #a855f7;
}

.invite-rule-dot-green {
  background: #22c55e;
}

.invite-rule-text {
  color: rgba(255, 255, 255, 0.7);
  flex: 1;
}

.invite-rule-text strong {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

/* 三级分销佣金 */
/* 统计概览 */
.stats-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stats-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
}

.stats-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.stats-header svg {
  width: 18px;
  height: 18px;
}

.stats-value {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
}

.stats-value-green {
  color: #22c55e;
}

.stats-card-green .stats-header {
  color: #22c55e;
}

/* 三级团队统计 */
.team-breakdown-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.team-breakdown-card {
  background: rgba(15, 23, 42, 0.8);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  border: 1px solid transparent;
}

.team-breakdown-orange {
  border-color: rgba(249, 115, 22, 0.3);
}

.team-breakdown-blue {
  border-color: rgba(59, 130, 246, 0.3);
}

.team-breakdown-purple {
  border-color: rgba(168, 85, 247, 0.3);
}

.team-breakdown-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.team-breakdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.team-breakdown-dot-orange {
  background: #f97316;
}

.team-breakdown-dot-blue {
  background: #3b82f6;
}

.team-breakdown-dot-purple {
  background: #a855f7;
}

.team-breakdown-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.team-breakdown-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-breakdown-count {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.team-breakdown-earnings {
  display: none;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.team-breakdown-orange .team-breakdown-earnings {
  color: #f97316;
}

.team-breakdown-blue .team-breakdown-earnings {
  color: #3b82f6;
}

.team-breakdown-purple .team-breakdown-earnings {
  color: #a855f7;
}

/* 团队成员 */
.team-members-section {
  margin-bottom: 24px;
}

.team-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.team-tab {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.team-tab:hover {
  background: rgba(255, 255, 255, 0.1);
}

.team-tab.active {
  background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
  border-color: transparent;
  color: white;
  font-weight: 500;
}

.team-members-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.member-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.2s;
}

.member-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-name {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.member-level-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid;
}

.member-level-badge.level-1 {
  color: #f97316;
  border-color: rgba(249, 115, 22, 0.3);
}

.member-level-badge.level-2 {
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}

.member-level-badge.level-3 {
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.3);
}

.member-earnings {
  text-align: right;
  flex-shrink: 0;
}

.member-earning-value {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2px;
}

.member-earning-label {
  font-size: 12px;
  color: #22c55e;
  font-weight: 500;
}

/* 邀请卡片内团队成员 */
.invite-team {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.invite-team-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
}

.invite-team-title svg {
  color: #f97316;
}

.invite-team-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.invite-team-tabs::-webkit-scrollbar {
  display: none;
}

.invite-team-tab {
  padding: 6px 12px;
  border-radius: 16px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.invite-team-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.invite-team-tab.active {
  background: linear-gradient(135deg, #f97316, #ec4899);
  color: white;
}

.invite-team-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.invite-team-list::-webkit-scrollbar {
  width: 4px;
}

.invite-team-list::-webkit-scrollbar-track {
  background: transparent;
}

.invite-team-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.invite-team-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.invite-team-member-info {
  flex: 1;
}

.invite-team-member-phone {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2px;
}

.invite-team-member-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.invite-team-member-level {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
}

.invite-team-member-level.level-1 {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.invite-team-member-level.level-2 {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.invite-team-member-level.level-3 {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.invite-team-member-commission {
  text-align: right;
  flex-shrink: 0;
  margin-left: 12px;
}

.invite-team-member-commission-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 2px;
}

.invite-team-member-commission-value {
  font-size: 13px;
  font-weight: 600;
  color: #22c55e;
}

/* 响应式 */
@media (max-width: 768px) {
  .invite-page {
    padding: 16px 12px;
  }
  
  .team-breakdown-section {
    gap: 8px;
  }
  
  .team-breakdown-card {
    padding: 12px 8px;
  }
  
  .team-breakdown-count {
    font-size: 18px;
  }
  
  .invite-rules {
    margin-top: 16px;
    padding-top: 16px;
  }
  
  .invite-rules-title {
    font-size: 13px;
  }
  
  .invite-rule-item {
    font-size: 11px;
  }
}
