/* "Arkadaşını Davet Et" (referral.js) — AGENTS.md §4.2: absolute, inset 0, no vh/vw; the card scrolls when short. */
.ref-overlay {
  position: absolute;
  inset: 0;
  z-index: 10040;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3%, 40px);
  background: rgba(2, 6, 23, 0.66);
}
.ref-card {
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(20px, 4%, 32px);
  border-radius: 24px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.ref-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #f1f5f9;
  color: #475569;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.ref-loading { padding: 40px 10px; text-align: center; font-size: 16px; font-weight: 700; color: #64748b; }
.ref-hero { display: flex; align-items: center; gap: 14px; padding: 14px 56px 14px 14px; border-radius: 18px; background: linear-gradient(135deg, #fef3c7, #fff7ed); }
.ref-hero-icon { flex-shrink: 0; width: 64px; height: 64px; display: grid; place-items: center; font-size: 36px; border-radius: 18px; background: #ffffff; box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3); }
.ref-title { margin: 0; font-size: 24px; font-weight: 900; }
.ref-sub { margin: 4px 0 0; font-size: 15px; font-weight: 800; color: #b45309; }
.ref-section-title { margin: 18px 0 8px; font-size: 13px; font-weight: 900; color: #64748b; letter-spacing: 0.6px; text-transform: uppercase; }
.ref-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ref-step { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border-radius: 12px; background: #f8fafc; border: 1.5px solid #e2e8f0; font-size: 13px; font-weight: 700; line-height: 1.35; color: #334155; }
.ref-step-n { flex-shrink: 0; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #0284c7; color: #ffffff; font-size: 13px; font-weight: 900; }
.ref-tier { margin-bottom: 10px; padding: 12px; border-radius: 16px; border: 2px solid #e2e8f0; background: #f8fafc; }
.ref-tier.is-now.ref-tier-full { border-color: #f59e0b; background: linear-gradient(135deg, #fffbeb, #ffffff); box-shadow: 0 6px 18px rgba(245, 158, 11, 0.22); }
.ref-tier.is-now.ref-tier-small { border-color: #38bdf8; background: linear-gradient(135deg, #f0f9ff, #ffffff); box-shadow: 0 6px 18px rgba(56, 189, 248, 0.2); }
.ref-tier.is-done { opacity: 0.55; }
.ref-tier-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.ref-tier-badge { padding: 3px 9px; border-radius: 8px; background: #0284c7; color: #ffffff; font-size: 11px; font-weight: 900; letter-spacing: 0.4px; }
.ref-tier-full .ref-tier-badge { background: linear-gradient(135deg, #f59e0b, #d97706); }
.ref-tier-head { font-size: 15px; font-weight: 900; color: #0f172a; }
.ref-tier-left { margin-left: auto; font-size: 13px; font-weight: 900; color: #15803d; }
.ref-reward-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.ref-reward-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: #ffffff; border: 1.5px solid #e2e8f0; }
.ref-reward-item img, .ref-reward-item svg { display: block; }
.ref-reward-item b { font-size: 16px; font-weight: 900; color: #0f172a; }
.ref-reward-item span { font-size: 11px; font-weight: 800; color: #64748b; }
.ref-ri-token b { color: #b45309; }
.ref-ri-cash b { color: #059669; }
.ref-progress { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.ref-progress-bar { height: 10px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.ref-progress-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f59e0b, #22c55e); }
.ref-progress span { font-size: 13px; font-weight: 800; color: #475569; }
.ref-link-box { margin: 0 0 10px; padding: 12px 14px; border-radius: 14px; border: 1.5px dashed #7dd3fc; background: #f0f9ff; }
.ref-link { display: block; font-size: 15px; font-weight: 800; color: #0369a1; overflow-wrap: anywhere; user-select: text; }
.ref-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ref-btn { flex: 1 1 200px; padding: 14px 18px; border-radius: 14px; font-size: 16px; font-weight: 900; cursor: pointer; transition: transform 0.15s ease; }
.ref-btn:active { transform: scale(0.97); }
.ref-btn-share { border: none; background: linear-gradient(135deg, #22c55e, #16a34a); color: #ffffff; box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35); }
.ref-btn-copy { border: 1.5px solid #cbd5e1; background: #f1f5f9; color: #334155; }
.ref-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.ref-stats > div { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 12px; background: #f1f5f9; }
.ref-stats b { font-size: 20px; font-weight: 900; color: #0f172a; }
.ref-stats span { font-size: 12px; font-weight: 700; color: #64748b; text-align: center; }
/* a narrow window (phone, large UI scale): three rewards a row, the steps under each other */
@container game (max-width: 760px) {
  .ref-reward-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ref-steps { grid-template-columns: 1fr; }
}
