.referral { background: var(--white); }
.rf-panel { position: relative; overflow: hidden; border-radius: 28px; padding: 60px 56px; text-align: center;
  background: linear-gradient(135deg, #225fe6 0%, #4b3bb4 55%, #1d7f8f 100%);
  box-shadow: 0 28px 80px rgba(34,95,230,.30); }
.rf-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; pointer-events: none; }
.rf-blob-a { width: 360px; height: 360px; background: #7aa2ff; top: -120px; right: -80px; }
.rf-blob-b { width: 320px; height: 320px; background: #17b3a3; bottom: -130px; left: -70px; opacity: .4; }
.rf-inner { position: relative; z-index: 2; }
.rf-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); padding: 8px 16px; border-radius: 999px; margin-bottom: 22px; }
.rf-title { font-size: clamp(26px, 3.6vw, 40px); font-weight: 700; color: #fff; line-height: 1.18; letter-spacing: -.01em; }
.rf-sub { font-size: 16px; color: rgba(255,255,255,.82); line-height: 1.65; max-width: 560px; margin: 16px auto 0; }

.rf-form { display: flex; gap: 12px; max-width: 540px; margin: 32px auto 0; }
.rf-input-wrap { position: relative; flex: 1; }
.rf-input { width: 100%; padding: 16px 46px 16px 18px; border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,.35); background: rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; font-family: var(--font); font-size: 18px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; outline: none; transition: border-color .18s, background .18s; }
.rf-input::placeholder { color: rgba(255,255,255,.5); font-weight: 600; letter-spacing: .06em; }
.rf-input:focus { border-color: #fff; background: rgba(255,255,255,.2); }
.rf-input.valid { border-color: #7fd4a8; }
.rf-tick { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #8fe0b5; font-size: 18px; font-weight: 800; animation: rfTick .3s ease; }
.rf-btn { padding: 16px 26px; border-radius: 14px; border: none; background: #fff; color: #163e9f;
  font-family: var(--font); font-size: 16px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: transform .15s, box-shadow .15s; }
.rf-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,.22); }
.rf-btn:active { transform: translateY(0); }

.rf-error { margin: 16px auto 0; max-width: 540px; font-size: 14px; font-weight: 600; color: #ffe0d8;
  background: rgba(255,90,70,.18); border: 1px solid rgba(255,150,130,.4); border-radius: 12px; padding: 10px 16px; animation: rfShake .35s ease; }

.rf-result { margin: 30px auto 0; max-width: 560px; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.26); border-radius: 20px; padding: 26px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); text-align: left; animation: rfPop .5s cubic-bezier(.2,.9,.3,1.3); }
.rf-result-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.rf-check { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: rgba(126,212,168,.25); border: 1px solid rgba(126,212,168,.5); color: #b6f0d1; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; animation: rfPopIn .5s cubic-bezier(.2,.9,.3,1.4); }
.rf-result-head strong { display: block; font-size: 16px; font-weight: 700; color: #fff; }
.rf-result-head span { font-size: 13px; color: rgba(255,255,255,.7); }

.rf-link-row { display: flex; gap: 10px; margin-bottom: 16px; }
.rf-link { flex: 1; min-width: 0; padding: 13px 15px; border-radius: 12px; border: 1px dashed rgba(255,255,255,.4);
  background: rgba(0,0,0,.2); color: #eaf1ff; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13.5px; outline: none; text-overflow: ellipsis; }
.rf-copy { flex-shrink: 0; padding: 0 20px; border-radius: 12px; border: none; background: #fff; color: #163e9f; font-family: var(--font); font-weight: 700; font-size: 14px; cursor: pointer; transition: background .18s, color .18s, transform .15s; }
.rf-copy:hover { transform: translateY(-1px); }
.rf-copy.copied { background: #7fd4a8; color: #06331f; }

.rf-share { display: flex; gap: 10px; flex-wrap: wrap; }
.rf-share-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.1); color: #fff;
  font-family: var(--font); font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .18s, transform .15s; }
.rf-share-btn:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.rf-share-btn.wa { background: rgba(37,211,102,.2); border-color: rgba(37,211,102,.45); }
.rf-share-btn.wa:hover { background: rgba(37,211,102,.32); }

.rf-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.rf-confetti span { position: absolute; top: -24px; border-radius: 2px; opacity: 0; animation-name: rfFall; animation-timing-function: cubic-bezier(.3,.6,.5,1); animation-fill-mode: forwards; }

@keyframes rfFall { 0% { transform: translateY(-24px) rotate(0deg); opacity: 0; } 12% { opacity: 1; } 100% { transform: translateY(460px) rotate(540deg); opacity: 0; } }
@keyframes rfPop { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes rfPopIn { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes rfTick { from { opacity: 0; transform: translateY(-50%) scale(.4); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
@keyframes rfShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

@media (max-width: 640px) {
  .rf-panel { padding: 40px 22px; border-radius: 22px; }
  .rf-form { flex-direction: column; }
  .rf-btn { padding: 15px; }
  .rf-link-row { flex-direction: column; }
  .rf-copy { padding: 13px; }
  .rf-share-btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .rf-confetti { display: none; }
  .rf-result, .rf-check, .rf-tick, .rf-error { animation: none !important; }
}
