/* ════════════════════════════════════════════════════
   TAB 3 — SHOP
════════════════════════════════════════════════════ */
.shop-coming{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  min-height:65vh; padding:40px 30px; text-align:center;
}
.shop-icon{
  font-size:80px; margin-bottom:16px;
  animation:float 3s ease-in-out infinite;
}
@keyframes float{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
.shop-title{
  font-family:'Bebas Neue'; font-size:42px; letter-spacing:4px;
  background:linear-gradient(135deg,var(--star),var(--purple));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
}
.shop-sub{ font-size:13px; color:var(--text-dim); margin-top:10px; line-height:1.8; }
.shop-badge{
  margin-top:22px; display:inline-block;
  padding:7px 18px;
  background:rgba(168,85,247,.15); border:1px solid rgba(168,85,247,.35);
  border-radius:50px; font-size:10px; font-weight:700;
  letter-spacing:2px; color:var(--purple);
}

/* ════════════════════════════════════════════════════
   TAB 4 — PROFILE
════════════════════════════════════════════════════ */
.profile-hero{
  position:relative; padding:30px 20px 22px; text-align:center;
  border-bottom:1px solid var(--border-soft);
  overflow:hidden;
}
.profile-stars-bg{
  position:absolute; inset:0; overflow:hidden; pointer-events:none;
}
.profile-star{
  position:absolute; background:#cfe8ff; border-radius:50%;
  animation:pStar 4s ease-in-out infinite;
}
@keyframes pStar{
  0%,100%{ opacity:.15; transform:scale(.5); }
  50%    { opacity:.7;  transform:scale(1.2); }
}
.profile-shoot{
  position:absolute; width:80px; height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,209,102,.8), transparent);
  animation:pShoot 5s linear infinite; opacity:0;
}
@keyframes pShoot{
  0%  { opacity:0; transform:translate(-100px,-30px) rotate(20deg); }
  10% { opacity:1; }
  30% { opacity:0; transform:translate(400px,90px) rotate(20deg); }
  100%{ opacity:0; transform:translate(400px,90px) rotate(20deg); }
}

.avatar-ring{
  width:118px; height:118px; border-radius:50%;
  padding:3px; flex-shrink:0; margin:0 auto;
  position:relative; z-index:1;
}
/* Крутится только декоративное кольцо-фон (псевдоэлемент) — сама аватарка ниже
   вообще не анимируется, поэтому никакой рассинхронизации между двумя вращениями
   быть не может (раньше кольцо и аватарка крутились в противоположные стороны с
   одинаковой скоростью, чтобы визуально гасить друг друга, — на практике это
   иногда съезжало на кадр и читалось как дёрганье). */
.avatar-ring::before{
  content:'';
  position:absolute; inset:0;
  border-radius:50%;
  background:var(--ld-holo-ring);
  z-index:-1;
  animation:ringSpin 8s linear infinite;
}
@keyframes ringSpin{ to{ transform:rotate(360deg) } }
.avatar-inner{
  width:100%; height:100%; border-radius:50%; overflow:hidden;
  background:var(--surface2);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--ld-font-display); font-weight:800; font-size:46px;
  position:relative; z-index:1;
}
.avatar-inner img{ width:100%; height:100%; object-fit:cover; }

.profile-name{
  font-family:var(--ld-font-display); font-weight:800; font-size:30px; letter-spacing:.5px;
  margin-top:14px; position:relative; z-index:1;
}
.profile-username{
  font-size:13px; color:var(--text-dim); margin-top:3px;
  position:relative; z-index:1;
}

.profile-section{ padding:14px 18px 0; }

/* Wallet card */
.wallet-card{
  background:linear-gradient(135deg, var(--surface), var(--surface2));
  border:1px solid var(--border); border-radius:var(--r-lg);
  padding:16px;
}
.wallet-balances{
  display:grid; grid-template-columns:1fr 1fr; gap:10px;
}
.wal-block{ display:flex; flex-direction:column; gap:3px; }
.wal-lbl{
  font-size:10px; color:var(--muted); letter-spacing:1.5px;
  text-transform:uppercase; font-weight:700;
}
.wal-val{ font-family:'Bebas Neue'; font-size:26px; line-height:1; }
.wal-val.ton{ color:var(--ton); }
.wal-val.stars{ color:var(--star); }

.wallet-actions{ display:flex; gap:8px; margin-top:14px; }
.wal-btn{
  flex:1; padding:10px;
  background:var(--surface3); border:1px solid var(--border);
  border-radius:11px; color:var(--text);
  font-family:'Inter'; font-size:12px; font-weight:700;
  cursor:pointer; transition:all .15s;
  display:flex; align-items:center; justify-content:center; gap:6px;
}
.wal-btn:active{ transform:scale(.97); }
.wal-btn.ton-act{
  background:rgba(0,152,234,.12); border-color:rgba(0,152,234,.3); color:var(--ton);
}
.wal-btn.star-act{
  background:rgba(255,184,0,.12); border-color:rgba(255,184,0,.3); color:var(--star);
}

/* Referral card */
.ref-card{
  background:linear-gradient(135deg, var(--surface), var(--surface2));
  border:1px solid var(--border); border-radius:var(--r-lg);
  padding:16px;
}
.ref-header{
  display:flex; justify-content:space-between; align-items:flex-start;
  margin-bottom:12px;
}
.ref-link-box{ display:flex; gap:8px; align-items:center; }
.ref-code{
  flex:1; background:var(--surface3); border:1px solid var(--border);
  border-radius:10px; padding:10px 12px;
  font-family:'Space Mono'; font-size:12px; letter-spacing:1px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.ref-copy-btn{
  padding:10px 14px;
  background:rgba(255,209,102,.12);
  border:1px solid rgba(255,209,102,.3);
  border-radius:10px; color:var(--gold);
  font-family:'Inter'; font-size:11px; font-weight:700;
  cursor:pointer; white-space:nowrap;
}

.stats-grid{
  display:grid; grid-template-columns:repeat(2,1fr); gap:9px;
  padding:14px 18px 0;
}
.stat-card{
  background:linear-gradient(135deg, var(--surface), var(--surface2));
  border:1px solid var(--border); border-radius:14px;
  padding:13px 15px;
}
.stat-card-val{
  font-family:'Bebas Neue'; font-size:28px; letter-spacing:1px; line-height:1;
}
.stat-card-lbl{
  font-size:10px; color:var(--muted); letter-spacing:1.5px;
  text-transform:uppercase; margin-top:3px; font-weight:600;
}

.history-section{ padding:16px 18px; }
.history-item{
  display:flex; align-items:center; gap:11px;
  padding:11px 13px;
  background:var(--surface); border:1px solid var(--border);
  border-radius:12px; margin-bottom:6px;
}
.history-icon{ font-size:19px; width:30px; text-align:center; flex-shrink:0; }
.history-desc{ flex:1; font-size:12px; }
.history-desc .desc-main{ font-weight:600; }
.history-desc .desc-sub{ color:var(--text-dim); font-size:10px; margin-top:1px; }
.history-amount{ font-family:'Bebas Neue'; font-size:17px; }
.history-amount.pos{ color:var(--win); }
.history-amount.neg{ color:var(--danger); }

/* ══ Баланс Stars в профиле (замена кошелька TON) ════════════════════ */
.profile-balance-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(255,184,0,.1) 0%, rgba(255,184,0,.04) 100%);
  border: 1px solid rgba(255,184,0,.2);
  border-radius: 20px;
  padding: 18px 20px;
  margin: 0 16px;
}
.profile-balance-icon {
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(255,184,0,.5));
}
.profile-balance-info {
  flex: 1;
}
.profile-balance-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1.5px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.profile-balance-val {
  font-family: 'Bebas Neue';
  font-size: 38px;
  color: var(--star);
  line-height: 1;
  letter-spacing: 1px;
}


/* ══ Строка пополнения Stars ════════════════════════════════════════ */
.profile-topup-row {
  display: flex;
  gap: 10px;
  padding: 0 16px;
  margin-top: 10px;
  align-items: stretch;
}
.profile-topup-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  transition: border-color .2s, box-shadow .2s;
}
.profile-topup-field:focus-within {
  border-color: rgba(255,184,0,.5);
  box-shadow: 0 0 0 3px rgba(255,184,0,.1);
}
.profile-topup-star {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.profile-topup-field input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  padding: 13px 0;
  min-width: 0;
}
.profile-topup-field input::placeholder {
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
}
.profile-topup-confirm {
  background: linear-gradient(135deg, #FFB800 0%, #e07b00 100%);
  border: none;
  border-radius: 14px;
  color: #000;
  font-family: 'Bebas Neue';
  font-size: 18px;
  letter-spacing: 1.5px;
  padding: 0 22px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(255,184,0,.35);
  transition: transform .1s, box-shadow .15s;
  flex-shrink: 0;
}
.profile-topup-confirm:active {
  transform: scale(.96);
  box-shadow: 0 2px 8px rgba(255,184,0,.25);
}

/* ══ Секция кошелька в профиле ══════════════════════════════════════ */
.profile-wallet {
  margin: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Единая карточка баланса ─────────────────────────────────────
   Лейбл сверху → большое число с звёздой → две кнопки рядом снизу.
   Никаких полей ввода в основной карточке — они появляются в раскрываемых
   формах ниже, как pull-down меню. */
.pw-balance-card {
  background: var(--surface);
  border: 1px solid rgba(255,200,58,.22);
  border-radius: 22px;
  padding: 18px 20px 16px;
  box-shadow:
    0 8px 24px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.04),
    var(--ld-glow-gold);
}
.pw-balance-label {
  font-size: 11px;
  letter-spacing: 2.2px;
  font-weight: 700;
  color: rgba(255,200,58,.7);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.pw-balance-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.pw-balance-icon {
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(255,184,0,.5));
}
.pw-balance-val {
  font-family: var(--ld-font-display);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #fff;
  line-height: 1;
  font-feature-settings: "tnum";
}

/* Две кнопки в одну строку — 50/50 */
.pw-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Раскрываемые формы (появляются при клике на кнопку) ────────── */
.pw-form-card {
  background: var(--ld-panel);
  border: 1px solid var(--ld-panel-border);
  border-radius: 18px;
  padding: 14px 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: pwFormSlide .22s ease-out;
}
@keyframes pwFormSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pw-form-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: .5px;
  margin-bottom: 10px;
}
.pw-form-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.pw-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ld-panel);
  border: 1px solid var(--ld-panel-border);
  border-radius: 13px;
  padding: 0 12px;
  transition: border-color .2s, box-shadow .2s;
  min-width: 0;
}
.pw-input-wrap:focus-within {
  border-color: rgba(0,152,234,.5);
  box-shadow: 0 0 0 3px rgba(0,152,234,.1);
}
.pw-input-prefix { font-size: 18px; flex-shrink: 0; }
.pw-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  padding: 12px 0;
  min-width: 0;
}
.pw-input-wrap input::placeholder {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}

/* ── Кнопки — две разные роли, две разные раскраски ─────────────── */
.pw-btn {
  border: none;
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
  padding: 14px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .1s, box-shadow .15s, background .15s;
  flex-shrink: 0;
}
.pw-btn:active { transform: scale(.97); }

/* «Пополнить» — основное действие, золотое */
.pw-btn-buy {
  background: var(--ld-gold);
  color: var(--ld-on-gold);
  box-shadow:
    var(--ld-glow-gold),
    inset 0 1px 0 rgba(255,255,255,.3);
}
.pw-btn-buy:hover { background: linear-gradient(135deg, #FFE17A, #FFC83A); }

/* «Вывести» — вторичное действие, тёмное стекло */
.pw-btn-withdraw {
  background: var(--ld-panel);
  color: var(--ld-text);
  border: 1px solid var(--ld-panel-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.pw-btn-withdraw:hover { background: var(--surface3); }

.pw-btn-ton {
  background: linear-gradient(135deg, #0098EA, #006BBF);
  color: #fff;
  border: none;
  box-shadow: 0 2px 12px rgba(0,152,234,.35);
}
.pw-btn-ton:hover { background: linear-gradient(135deg, #22AAFF, #0088DD); }

.pw-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}
.pw-hint span { color: var(--star); font-weight: 700; }

.ton-rate-line {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  letter-spacing: .2px;
}

.ton-stars-preview {
  font-size: 22px;
  font-weight: 700;
  color: var(--star);
  text-align: center;
  min-height: 28px;
  margin-top: 8px;
  letter-spacing: .3px;
}

.pw-btn-check {
  display: block;
  width: 100%;
  background: rgba(0,229,255,.08);
  border: 1px solid rgba(0,229,255,.25);
  border-radius: 10px;
  color: var(--ld-ice);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  cursor: pointer;
  padding: 11px 0;
  margin-top: 10px;
  text-align: center;
  opacity: 1;
  transition: background .15s;
}
.pw-btn-check:active { background: rgba(0,229,255,.18); }

/* ── Промокод ── */
.promo-section {
  margin: 0 16px 16px;
  background: var(--ld-panel);
  border: 1px solid var(--ld-panel-border);
  border-radius: 18px;
  padding: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.promo-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 10px;
}
.promo-input {
  width: 100%; box-sizing: border-box; margin-bottom: 8px;
  background: rgba(10,11,22,.5);
  border: 1px solid rgba(140,170,255,.16);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px; font-weight: 600;
  outline: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: border-color .2s;
}
.promo-input:focus { border-color: rgba(255,184,0,.4); }
.promo-input::placeholder { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; }
.promo-btn {
  width: 100%; padding: 13px 18px;
  background: var(--ld-holo);
  border: none; border-radius: 12px;
  color: var(--ld-on-holo); font-family: var(--ld-font-display); font-weight: 800; font-style: italic;
  font-size: 16px; letter-spacing: .5px;
  cursor: pointer; white-space: nowrap;
  box-shadow: var(--ld-glow-btn);
  transition: transform .15s;
}
.promo-btn:active { transform: scale(.97); }
.promo-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Language toggle — top-left corner of profile hero ── */
.profile-lang-corner {
  position: absolute;
  top: 14px;
  left: 16px;
  display: flex;
  gap: 5px;
  z-index: 2;
}
.profile-lang-corner .lang-btn {
  flex: none;
  padding: 5px 11px;
  font-size: 10px;
  letter-spacing: .10em;
  border-radius: 8px;
}
.promo-result {
  margin-top: 10px;
  font-size: 13px; font-weight: 600;
  text-align: center; border-radius: 10px;
  padding: 10px;
}
.promo-result.ok  { background: rgba(0,229,160,.1); color: #4ADE80; }
.promo-result.err { background: rgba(255,61,107,.08); color: #FF7090; }

/* ── Кнопка в профиле ── */
.ref-section {
  margin: 0 16px 16px;
}
.ref-invite-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(0,229,255,.1), rgba(139,92,246,.1));
  border: 1px solid rgba(0,229,255,.3);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--text);
  font-family: 'Unbounded', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.ref-invite-btn .ref-invite-icon { font-size: 20px; }
.ref-percent-badge {
  margin-left: auto;
  background: linear-gradient(135deg, var(--ld-ice), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 15px;
  font-weight: 900;
}

/* ── Реферальный экран ── */
.referral-screen {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0 0 100px;
  background: var(--ld-bg-screen);
}
.ref-screen-header {
  display: flex;
  align-items: center;
  padding: 14px 16px 4px;
}
.ref-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ld-panel);
  border: 1px solid var(--ld-panel-border);
  border-radius: var(--ld-r-pill);
  color: var(--ld-text);
  font-family: var(--ld-font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  padding: 10px 18px;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color .18s, transform .14s;
}
.ref-back-btn:active { transform: scale(.97); border-color: rgba(111,233,255,.4); }
.ref-back-arrow {
  font-size: 16px;
  line-height: 1;
  margin-top: -1px;
  color: var(--ld-ice);
}
.ref-screen-hero {
  text-align: center;
  padding: 28px 24px 22px;
  position: relative;
}
.ref-screen-emoji {
  width: 76px; height: 76px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--ld-holo-ring);
  padding: 2px;
  display: flex; align-items: center; justify-content: center;
}
.ref-screen-emoji::after {
  content: '👥';
  width: 100%; height: 100%;
  border-radius: 50%;
  background: #0d0c17;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}
.ref-screen-tagline {
  font-family: var(--ld-font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 19px;
  color: var(--ld-text);
  line-height: 1.4;
  margin-bottom: 8px;
}
.ref-accent {
  background: var(--ld-holo);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(91,184,255,.35));
}
.ref-screen-sub {
  font-family: var(--ld-font-ui);
  font-size: 13px;
  color: var(--ld-muted);
}
.ref-screen-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 16px 14px;
}
.ref-stat-card {
  background: var(--ld-panel);
  border: 1px solid var(--ld-panel-border);
  border-radius: var(--ld-r-card);
  padding: 18px 10px;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--ld-shadow-card);
}
.ref-stat-val {
  font-family: var(--ld-font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--ld-text);
}
.ref-stat-label {
  font-family: var(--ld-font-ui);
  font-size: 10.5px;
  color: var(--ld-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.ref-balance-card {
  margin: 0 16px 14px;
  background: var(--ld-panel);
  border: 1px solid var(--ld-panel-border);
  border-radius: var(--ld-r-card);
  padding: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--ld-shadow-card);
  position: relative;
  overflow: hidden;
}
.ref-balance-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 0% 0%, rgba(91,184,255,.10), transparent 60%);
  pointer-events: none;
}
.ref-balance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}
.ref-balance-label {
  font-family: var(--ld-font-ui);
  font-size: 10.5px;
  color: var(--ld-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
}
.ref-balance-val {
  font-family: var(--ld-font-display);
  font-size: 25px;
  font-weight: 800;
  color: var(--ld-star);
  text-shadow: 0 0 18px rgba(255,200,58,.25);
}
.ref-transfer-btn {
  background: var(--ld-holo);
  border: none;
  border-radius: var(--ld-r-pill);
  padding: 11px 18px;
  color: var(--ld-on-holo);
  font-family: var(--ld-font-ui);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--ld-glow-btn);
  transition: opacity .15s, transform .14s;
}
.ref-transfer-btn:active { transform: scale(.96); }
.ref-transfer-btn:disabled { box-shadow: none; }
.ref-balance-hint {
  font-family: var(--ld-font-ui);
  font-size: 11px;
  color: var(--ld-faint);
  margin-top: 10px;
  position: relative;
}

.ref-screen-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 16px 22px;
}
.ref-copy-btn {
  width: 50px;
  height: 50px;
  min-width: 50px;
  background: var(--ld-panel);
  border: 1px solid var(--ld-panel-border);
  border-radius: var(--ld-r-md);
  color: var(--ld-ice);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color .18s, transform .14s;
}
.ref-copy-btn:active { transform: scale(.94); border-color: rgba(111,233,255,.4); }
.ref-screen-list-label {
  font-family: var(--ld-font-ui);
  font-size: 11px;
  color: var(--ld-muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0 16px 10px;
}
.ref-list {
  display: flex;
  flex-direction: column;
  margin: 0 16px;
  padding: 4px 14px;
  background: var(--ld-panel);
  border: 1px solid var(--ld-panel-border);
  border-radius: var(--ld-r-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.ref-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}
.ref-row::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(111,233,255,.22) 50%, transparent);
}
.ref-row:last-child::after { display: none; }
.ref-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ld-font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}
.ref-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.ref-row-name {
  flex: 1;
  font-family: var(--ld-font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--ld-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ref-row-earned {
  font-family: var(--ld-font-ui);
  font-size: 13px;
  font-weight: 800;
  color: var(--ld-star);
  white-space: nowrap;
}
.ref-row-earned-legacy {
  color: var(--ld-muted);
  font-weight: 700;
  font-size: 12px;
}
.ref-empty {
  text-align: center;
  color: var(--ld-muted);
  font-family: var(--ld-font-ui);
  font-size: 13px;
  padding: 36px 0;
  line-height: 1.6;
}
.ref-more-btn {
  width: 100%;
  margin-top: 4px;
  padding: 13px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--ld-hairline);
  color: var(--ld-ice);
  font-family: var(--ld-font-ui);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.ref-more-btn:active { opacity: .7; }

/* ══════════════════════════════════════════════════════
   TOP-UP BOTTOM SHEET — Звёзды / TON / Подарки
   ══════════════════════════════════════════════════════ */
.topup-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(4,3,10,.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.topup-sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.topup-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--ld-bg-screen);
  background-color: #12101c;
  border: 1px solid var(--ld-panel-border);
  border-bottom: none;
  border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--ld-shadow-soft);
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.topup-sheet-overlay.open .topup-sheet {
  transform: translateY(0);
}

.topup-sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.topup-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  margin: 6px auto 14px;
}

.topup-sheet-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.08);
  color: var(--ld-text-2);
  font-size: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.topup-sheet-balance-label {
  text-align: center;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--ld-faint);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.topup-sheet-balance-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.topup-sheet-balance-val {
  font-family: var(--ld-font-display);
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.topup-tabs {
  position: relative;
  display: flex;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 3px;
  margin-bottom: 18px;
}
.topup-tabs-slider {
  position: absolute;
  top: 3px; bottom: 3px; left: 3px;
  width: calc(33.333% - 2px);
  background: var(--ld-blue);
  border-radius: 11px;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(91,184,255,.35);
}
.topup-tab {
  flex: 1;
  padding: 10px 4px;
  background: transparent;
  border: none;
  border-radius: 11px;
  color: var(--ld-text-2);
  font-family: var(--ld-font-ui);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: color .2s;
  position: relative;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
}
.topup-tab.active { color: #fff; }

.topup-tab-pane {
  display: none;
}
.topup-tab-pane.active {
  display: block;
  animation: pwFormSlide .2s ease-out;
}

.topup-sheet-submit {
  width: 100%;
  margin-top: 12px;
}

/* ── Шаги пополнения подарком ── */
.gift-step {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ld-panel);
  border: 1px solid var(--ld-panel-border);
  border-radius: 16px;
  padding: 13px 16px;
  margin-bottom: 10px;
}
.gift-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ld-blue);
  color: #fff;
  font-family: var(--ld-font-ui);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gift-step-text {
  font-family: var(--ld-font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--ld-text-2);
  line-height: 1.35;
}
.gift-step-text a,
.gift-step-text #gift-deposit-username {
  color: var(--ld-ice);
}
.ref-more-btn:active { background: rgba(0,229,255,.14); }
