.referral-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}
@media (max-width: 900px) {
  .referral-grid {
    grid-template-columns: 1fr;
  }
}

.referral-code-box, .referral-link-box {
  background: #f8fafc;
  border: 1px dashed var(--accent);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.referral-copy-content,
.referral-code-content {
  flex: 1;
  min-width: 0;
}
.referral-value {
  font-family: monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 1px;
}
.referral-link-value {
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.btn-copy {
  background: white;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
  transition: background 0.2s;
}
.btn-copy:hover {
  background: #f1f5f9;
}
.btn-copy.copied {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.how-it-works-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.how-it-works-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.how-it-works-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  background: #e0e7ff;
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

@media (max-width: 640px) {
  .referral-link-box,
  .referral-code-box {
    flex-direction: column;
    align-items: stretch;
  }

  .referral-link-value {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .btn-copy {
    width: 100%;
  }

  .referral-value {
    font-size: 1.1rem;
    letter-spacing: 0.04em;
  }
}
