/* Referrals Modal Styles */
.referrals-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.referrals-modal.hidden {
  display: none;
}

.referrals-content {
  background: linear-gradient(145deg, #1a1f36 0%, #0f1419 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
}

.referrals-header {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.referrals-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.referrals-title .icon {
  font-size: 24px;
}

.referrals-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-refresh {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-refresh:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.referrals-body {
  padding: 24px;
  max-height: calc(90vh - 80px);
  overflow-y: auto;
  color: #e5e7eb;
}

.referral-link-section {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.referral-link-section h3 {
  margin: 0 0 12px 0;
  color: #a5b4fc;
  font-size: 16px;
  font-weight: 600;
}

.link-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

#referral-link-input {
  flex: 1;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  color: #e5e7eb;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

#copy-referral-link {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

#copy-referral-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.section-divider {
  display: flex;
  align-items: center;
  margin: 24px 0 16px 0;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.2);
}

.section-divider::before {
  margin-right: 12px;
}

.section-divider::after {
  margin-left: 12px;
}

.referrals-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(17, 24, 39, 0.6);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.referrals-table th {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.referrals-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  vertical-align: middle;
}

.referrals-table tr:last-child td {
  border-bottom: none;
}

.uid-cell code,
.wallet-cell code,
.tx-cell code {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}

.vip-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.vip-badge.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.vip-badge:not(.active) {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.status-badge.approved {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.status-badge.rejected {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.status-badge.pending {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.claim-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.wallet-input {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 6px;
  padding: 6px 8px;
  color: #e5e7eb;
  font-size: 12px;
  width: 180px;
  font-family: 'Courier New', monospace;
}

.wallet-input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.btn-claim {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-claim:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-claim:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.empty-text {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.empty-subtext {
  font-size: 14px;
  opacity: 0.7;
}

.date-cell {
  font-size: 12px;
  color: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
  .referrals-modal {
    padding: 10px;
  }
  
  .referrals-content {
    max-height: 95vh;
  }
  
  .referrals-table {
    font-size: 12px;
  }
  
  .referrals-table th,
  .referrals-table td {
    padding: 8px 12px;
  }
  
  .link-input-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .claim-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .wallet-input {
    width: 100%;
  }
}
