:root {
  --bg-primary: #0a0e14;
  --bg-card: #111318;
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #fff;
  --text-secondary: rgba(255, 255, 255, 0.5);
  --accent-green: #10b981;
  --accent-cyan: #06b6d4;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

.header {
  display: flex;
  align-items: center;
  padding: 1rem;
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 10;
}

.back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

.header-title {
  flex: 1;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
}

.header-action {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.hero-section {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.2));
  padding: 2rem 1rem;
  text-align: center;
  margin: 0 1rem;
  border-radius: 1.5rem;
}

.hero-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: var(--accent-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
}

.hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.hero-reward {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0.75rem;
}

.reward-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-orange);
}

.reward-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.section {
  padding: 1.5rem 1rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.referral-card {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.referral-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.referral-code-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.referral-code {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.copy-btn {
  width: 44px;
  height: 44px;
  background: var(--accent-orange);
  border: none;
  border-radius: 0.5rem;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.referral-link-row {
  margin-top: 1rem;
}

.referral-link {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.share-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
}

.share-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-icon.whatsapp {
  background: #25d366;
}

.share-icon.telegram {
  background: #0088cc;
}

.share-icon.twitter {
  background: #1da1f2;
}

.share-icon.more {
  background: rgba(255, 255, 255, 0.1);
}

.share-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-value.earnings {
  color: var(--accent-green);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.how-it-works {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 1.25rem;
}

.step {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
}

.step:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.step-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.referral-list {
  margin-top: 1rem;
}

.referral-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
}

.referral-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.referral-info {
  flex: 1;
}

.referral-name {
  font-weight: 500;
  margin-bottom: 0.125rem;
}

.referral-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.referral-earned {
  font-weight: 600;
  color: var(--accent-green);
}

.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--accent-green);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s;
  z-index: 100;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}