/* ══════════════════════════════════════════════════════════════
   SpinChain — Profile Screen Styles
   Premium fintech aesthetic: deep surfaces, gold accents, violet VIP.
   Depends on: tokens.css, components.css (do not redefine variables).
   ══════════════════════════════════════════════════════════════ */


/* ════════════════════════════════════════════════════════════
   ROOT LAYOUT
   ════════════════════════════════════════════════════════════ */

.pf-root {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: var(--s-4) var(--s-4) var(--s-6);
  max-width: var(--maxw);
  margin-inline: auto;
}


/* ════════════════════════════════════════════════════════════
   SECTION SHELL (shared wrapper for every section)
   ════════════════════════════════════════════════════════════ */

.pf-section {
  margin-bottom: var(--s-5);
}

.pf-section-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 var(--s-3) var(--s-1);
}


/* ════════════════════════════════════════════════════════════
   1. PROFILE HEADER
   ════════════════════════════════════════════════════════════ */

.pf-header {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  padding: var(--s-6) var(--s-2) var(--s-5);
}

/* Avatar wrapper — the .avatar .avatar-xl classes handle size + ring,
   we just add subtle pulse for VIP users */
.pf-avatar {
  flex-shrink: 0;
  /* Slight scale-up pulse animation hint */
  transition: transform var(--t-med) var(--ease-spring);
}

.pf-avatar:hover {
  transform: scale(1.05);
}

/* VIP tier — extra outer glow ring */
.pf-header .avatar-tier-4 { box-shadow: 0 0 0 3px var(--bg-1), 0 0 0 5px var(--violet-2), var(--glow-violet); }
.pf-header .avatar-tier-5 { box-shadow: 0 0 0 3px var(--bg-1), 0 0 0 5px var(--tier-5),   0 0 24px rgba(255,122,184,0.5); }
.pf-header .avatar-tier-6 { box-shadow: 0 0 0 3px var(--bg-1), 0 0 0 5px var(--cyan-2),    var(--glow-cyan); }
.pf-header .avatar-tier-2 { box-shadow: 0 0 0 3px var(--bg-1), 0 0 0 5px var(--gold-3),    var(--glow-gold); }

.pf-header-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.pf-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-1);
  margin: 0;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-username {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  margin: 0;
  line-height: 1;
}

.pf-header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-1);
}

.pf-badge {
  font-size: 11px;
}

/* Standard chip — muted, unobtrusive */
.pf-badge--standard {
  color: var(--text-3);
  background: rgba(255,255,255,0.05);
  border-color: var(--stroke);
}


/* ════════════════════════════════════════════════════════════
   2. STATS GRID
   ════════════════════════════════════════════════════════════ */

.pf-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}

.pf-stat-card {
  /* stat-card already sets background/border/radius via the component class */
  min-height: 88px;
  justify-content: flex-end;
  padding: var(--s-3) var(--s-4);
  gap: var(--s-1);
}

/* Gold-tinted card for Total Deposits */
.pf-stat-card--gold {
  background: linear-gradient(
    150deg,
    rgba(255, 208, 85, 0.09) 0%,
    var(--bg-1) 100%
  );
  border-color: rgba(255, 208, 85, 0.18);
}

.pf-stat-card--gold .stat-value {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pf-stat-icon {
  font-size: 18px;
  line-height: 1;
  margin-bottom: var(--s-1);
  display: block;
}

/* Pending winnings sub-line under the Total Winnings figure. */
.pf-stat-pending {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  color: #ffcf5b;
  -webkit-text-fill-color: #ffcf5b;
}

/* Smaller stat value for text labels (wheel name, tier) */
.stat-value--sm {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}


/* ════════════════════════════════════════════════════════════
   3. REFERRAL CARD — hero, gold gradient accent
   ════════════════════════════════════════════════════════════ */

.pf-referral-card {
  padding: var(--s-5);
  /* Gold glow layer on top of standard .card */
  background:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(255, 208, 85, 0.12) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border-color: rgba(255, 208, 85, 0.22);
  box-shadow:
    var(--shadow-card),
    0 0 40px -16px rgba(255, 200, 80, 0.25);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.pf-referral-header {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
}

.pf-referral-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(255, 200, 80, 0.6));
}

.pf-referral-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin: 0 0 var(--s-1);
}

.pf-referral-sub {
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
  line-height: 1.4;
}

/* Monospace pill showing the referral link */
.pf-link-pill {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  background: var(--bg-0);
  border: 1px solid rgba(255, 208, 85, 0.18);
  border-radius: var(--r-md);
  overflow: hidden;
}

.pf-link-text {
  font-family: 'Courier New', 'Inconsolata', monospace;
  font-size: 13px;
  color: var(--gold-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  user-select: all;
}

.pf-referral-actions {
  display: flex;
  gap: var(--s-3);
}

/* Copy link takes up most space */
.pf-referral-actions .pf-btn-copy {
  flex: 2;
}

/* Share secondary */
.pf-referral-actions .pf-btn-share {
  flex: 1;
}

.pf-referral-microcopy {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.55;
  margin: 0;
  text-align: center;
  padding: 0 var(--s-2);
}

.pf-referral-microcopy strong {
  color: var(--gold-2);
  font-weight: 600;
}


/* ════════════════════════════════════════════════════════════
   4. WHEEL PROGRESS CARD
   ════════════════════════════════════════════════════════════ */

.pf-wheel-card {
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

/* Current wheel row */
.pf-wheel-current {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

/* Tier dot */
.pf-wheel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pf-wheel-dot--basic    { background: var(--tier-1); box-shadow: 0 0 6px var(--tier-1); }
.pf-wheel-dot--golden   { background: var(--tier-2); box-shadow: 0 0 8px rgba(255,216,107,0.8); }
.pf-wheel-dot--platinum { background: var(--tier-3); box-shadow: 0 0 8px rgba(185,199,230,0.8); }

.pf-wheel-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
  flex: 1;
}

.pf-chip-unlocked {
  font-size: 11px;
  color: var(--success);
  background: rgba(61,220,151,0.12);
  border-color: rgba(61,220,151,0.25);
}

/* Progress block (toward next wheel) */
.pf-wheel-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.pf-wheel-progress-labels {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.pf-wheel-next {
  font-size: 13px;
  color: var(--text-2);
}

.pf-wheel-next strong {
  color: var(--text-1);
  font-weight: 600;
}

.pf-wheel-count {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-2);
}

.pf-progress {
  /* Taller bar for the profile view */
  height: 10px;
}

.pf-wheel-remaining {
  font-size: 12px;
  color: var(--text-3);
  margin: 0;
}

.pf-wheel-remaining--ready {
  color: var(--success);
}

/* VIP hint section (when platinum is already unlocked) */
.pf-wheel-hint {
  font-size: 13px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.5;
}

.pf-wheel-hint strong {
  color: var(--violet-1);
}

/* VIP path rows inside wheel card (reused in VIP teaser too) */
.pf-vip-path {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.pf-vip-path-top {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.pf-vip-path-icon {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.pf-vip-path-label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.pf-vip-path-count {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
}

/* Violet progress bar variant (wheel → VIP paths) */
.pf-progress-bar--violet {
  background: var(--grad-violet);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* Gold progress bar variant */
.pf-progress-bar--gold {
  background: var(--grad-gold);
  box-shadow: 0 0 8px rgba(255, 200, 80, 0.5);
}


/* ════════════════════════════════════════════════════════════
   5. VIP STATUS CARD
   ════════════════════════════════════════════════════════════ */

/* Active VIP card — violet gradient */
.pf-vip-card {
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.pf-vip-card--active {
  background:
    radial-gradient(ellipse 100% 60% at 50% -5%, rgba(139, 92, 246, 0.18) 0%, transparent 65%),
    linear-gradient(160deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow:
    var(--shadow-card),
    0 0 48px -20px rgba(139, 92, 246, 0.4);
}

.pf-vip-active-header {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.pf-vip-crown {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.7));
}

.pf-vip-tier-label {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.pf-vip-member-since {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.pf-vip-badge-lg {
  margin-left: auto;
  font-size: 13px;
  padding: 5px 14px;
}

/* Perks list */
.pf-vip-perks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  border-top: 1px solid rgba(139, 92, 246, 0.15);
  padding-top: var(--s-3);
}

.pf-vip-perk {
  font-size: 14px;
  color: var(--violet-1);
  font-weight: 500;
  line-height: 1.4;
}

/* ── Non-VIP teaser card ────────────────────────────────── */

.pf-vip-card--teaser {
  background:
    radial-gradient(ellipse 80% 50% at 50% -5%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
    linear-gradient(160deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border-color: rgba(139, 92, 246, 0.18);
}

.pf-vip-teaser-header {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.pf-vip-lock {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.75;
}

.pf-vip-teaser-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin: 0 0 2px;
}

.pf-vip-teaser-sub {
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
}

.pf-vip-paths {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

/* Highlighted (closest) path */
.pf-vip-path--highlight {
  padding: var(--s-3) var(--s-4);
  background: rgba(139, 92, 246, 0.07);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--r-md);
}

.pf-vip-path--highlight .pf-vip-path-label {
  color: var(--violet-1);
  font-weight: 600;
}

.pf-vip-path-detail {
  font-size: 12px;
  color: var(--text-3);
  margin: var(--s-1) 0 0;
  line-height: 1.5;
}

/* Preview perk chips */
.pf-vip-perks-preview {
  border-top: 1px solid var(--stroke);
  padding-top: var(--s-3);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.pf-vip-preview-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0;
}

.pf-vip-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.pf-preview-chip {
  font-size: 11px;
  color: var(--violet-1);
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.2);
}


/* ════════════════════════════════════════════════════════════
   6. WALLET CARD
   ════════════════════════════════════════════════════════════ */

.pf-wallet-card {
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.pf-wallet-desc {
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
  line-height: 1.55;
}

.pf-wallet-field {
  /* inherits .field layout (column, gap) */
  min-width: 0;            /* never overflow inside the row */
}

/* coin + network selectors side by side, stacking safely on tiny screens */
.pf-wallet-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.pf-wallet-row .pf-wallet-field { flex: 1 1 0; }
.pf-wallet-row select.pf-wallet-input {
  width: 100%;
  height: 46px;
  font-family: var(--font-body, inherit);
  font-size: 15px;
  letter-spacing: normal;
  cursor: pointer;
}
@media (max-width: 359px) {
  .pf-wallet-row { flex-direction: column; gap: 10px; }
}

/* The input inside .field uses component styles already;
   we add a monospace override for wallet addresses */
.pf-wallet-input {
  font-family: 'Courier New', 'Inconsolata', monospace;
  font-size: 14px;
  letter-spacing: 0.03em;
  /* Width / padding / border come from .field input ruleset in components.css */
  width: 100%;
  padding: 12px var(--s-4);
  background: var(--bg-2);
  border: 1.5px solid var(--stroke);
  border-radius: var(--r-md);
  color: var(--text-1);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition:
    border-color var(--t-fast) var(--ease-out),
    box-shadow   var(--t-fast) var(--ease-out),
    background   var(--t-fast) var(--ease-out);
}

.pf-wallet-input::placeholder {
  color: var(--text-3);
  font-family: var(--font-body);
}

.pf-wallet-input:hover {
  border-color: var(--stroke-strong);
  background: var(--bg-3);
}

.pf-wallet-input:focus {
  border-color: var(--gold-3);
  box-shadow: 0 0 0 3px rgba(233, 177, 62, 0.18);
  background: var(--bg-3);
  outline: none;
}

.pf-wallet-save {
  /* inherits .btn .btn-ghost .btn-block */
  margin-top: var(--s-1);
}


/* ════════════════════════════════════════════════════════════
   7. SPIN HISTORY LIST
   ════════════════════════════════════════════════════════════ */

.pf-history-card {
  overflow: hidden;
  /* remove default card padding; list-rows handle their own */
  padding: 0;
}

.pf-history-row {
  /* inherits .list-row flex layout */
  padding: var(--s-3) var(--s-4);
  gap: var(--s-3);
  align-items: center;
}

/* Tier color dot */
.pf-history-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Prize + wheel name */
.pf-history-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pf-history-prize {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-history-wheel {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}

/* Value + time */
.pf-history-meta {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pf-history-value {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--success);
}

.pf-history-ago {
  font-size: 11px;
  color: var(--text-3);
}

/* Status pills */
.pf-status-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pf-status-pill--credited {
  background: rgba(61, 220, 151, 0.12);
  color: var(--success);
  border-color: rgba(61, 220, 151, 0.25);
}

.pf-status-pill--review {
  background: rgba(255, 181, 71, 0.12);
  color: var(--warning);
  border-color: rgba(255, 181, 71, 0.25);
}

/* Empty state */
.pf-history-empty {
  padding: var(--s-8) var(--s-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  text-align: center;
}

.pf-history-empty-icon {
  font-size: 36px;
  line-height: 1;
  opacity: 0.45;
}

.pf-history-empty-text {
  font-size: 14px;
  color: var(--text-3);
  margin: 0;
  line-height: 1.55;
}


/* ════════════════════════════════════════════════════════════
   8. FOOTER LINKS ROW
   ════════════════════════════════════════════════════════════ */

.pf-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-2) var(--s-2);
}

.pf-footer-link {
  /* override .btn height for a slimmer footer feel */
  height: 32px !important;
  font-size: 12px !important;
  padding: 0 var(--s-3) !important;
  color: var(--text-3) !important;
  border-color: transparent !important;
  background: transparent !important;
}

.pf-footer-link:hover {
  color: var(--text-2) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: var(--stroke) !important;
}

.pf-footer-sep {
  color: var(--text-3);
  font-size: 14px;
  opacity: 0.5;
  user-select: none;
  line-height: 1;
}


/* ════════════════════════════════════════════════════════════
   RESPONSIVE TWEAKS
   ════════════════════════════════════════════════════════════ */

/* Compact on narrow screens (most phones are 360–375px) */
@media (max-width: 379px) {
  .pf-stat-grid {
    gap: var(--s-2);
  }

  .pf-referral-actions {
    flex-direction: column;
  }

  .pf-referral-actions .pf-btn-copy,
  .pf-referral-actions .pf-btn-share {
    flex: unset;
    width: 100%;
  }
}

/* ── Connections card (Telegram + casino) ──────────────────── */
.pf-conn-card { padding: 6px 16px; }
.pf-conn-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--stroke, rgba(150,110,255,0.16));
}
.pf-conn-row:last-child { border-bottom: none; }
.pf-conn-ico {
  font-size: 20px; width: 40px; height: 40px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 12px;
  background: rgba(255,255,255,0.05);
}
.pf-conn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-conn-label { font-weight: 600; font-size: 0.92rem; color: var(--text-1, #f4f0ff); }
.pf-conn-sub {
  font-size: 0.76rem; color: var(--text-3, #8579b5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-conn-badge {
  flex-shrink: 0; font-size: 0.72rem; font-weight: 700;
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.pf-conn-on { color: #07140d; background: var(--success, #2bd66b); }
.pf-conn-off {
  color: var(--text-2, #b8aee0); background: rgba(255,255,255,0.06);
  border: 1px solid var(--stroke-strong, rgba(180,140,255,0.34));
}

/* Payout summary (profile) — balance + read-only saved addresses */
.pf-payout-balance {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.pf-payout-balance-label { font-size: 12px; color: var(--text-3, #9aa); text-transform: uppercase; letter-spacing: 0.06em; }
.pf-payout-balance-num {
  font-family: var(--font-display); font-weight: 900; font-size: 26px;
  background: var(--grad-gold, linear-gradient(90deg, #ffe89a, #f5b942));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pf-addr-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pf-addr-item {
  padding: 9px 11px; border-radius: 9px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke, rgba(180,140,255,0.18));
}
.pf-addr-top { display: block; font-size: 13px; font-weight: 700; color: var(--text-1, #fff); }
.pf-addr-sub { display: block; font-size: 11px; color: var(--text-3, #9aa); font-family: ui-monospace, monospace; }
.pf-addr-default {
  font-size: 9px; font-weight: 800; letter-spacing: 0.06em; color: #0b0f2a;
  background: var(--grad-gold, linear-gradient(90deg, #ffe89a, #f5b942));
  padding: 1px 5px; border-radius: 4px; vertical-align: middle;
}

/* Mystery boxes (profile) — sealed (openable) + opened */
.pf-box-list { display: flex; flex-direction: column; gap: 10px; }
.pf-box {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke, rgba(180,140,255,0.18));
}
.pf-box--sealed {
  background: linear-gradient(135deg, rgba(255,208,85,0.12), rgba(180,80,255,0.10));
  border-color: rgba(255,208,85,0.32);
  box-shadow: 0 0 22px -10px rgba(255,200,80,0.5);
}
.pf-box-ico { font-size: 26px; line-height: 1; flex-shrink: 0; }
.pf-box--sealed .pf-box-ico { animation: pfBoxWiggle 2.2s ease-in-out infinite; }
@keyframes pfBoxWiggle { 0%,100%{transform:rotate(-6deg)} 50%{transform:rotate(6deg) scale(1.08)} }
.pf-box-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-box-title { font-size: 14px; font-weight: 700; color: var(--text-1, #fff); }
.pf-box-sub { font-size: 12px; color: var(--text-3, #9aa); }
.pf-box-open { flex-shrink: 0; padding: 8px 18px; font-size: 13px; }
.pf-box-won {
  flex-shrink: 0; font-weight: 800; color: #3ddc97; font-size: 15px;
}
.pf-box--opened { opacity: 0.85; }

/* Connections — action buttons + note (web linking) */
.pf-conn-btn {
  flex-shrink: 0; padding: 7px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 800; cursor: pointer;
  color: #0b0f2a; border: none;
  background: var(--grad-gold, linear-gradient(90deg, #ffe89a, #f5b942));
  box-shadow: 0 2px 10px -2px rgba(255,200,80,.5);
}
.pf-conn-btn:active { transform: scale(.95); }
.pf-conn-note {
  margin: 4px 4px 0; font-size: 11px; line-height: 1.45; color: var(--text-3, #9aa);
}

/* Free spins — separate balance + history */
.pf-freespin-card { padding: 16px; }
.pf-freespin-bal { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pf-freespin-ico { font-size: 30px; line-height: 1; }
.pf-freespin-num {
  display: block; font-family: var(--font-display); font-weight: 900; font-size: 28px;
  color: #ffcf5b; line-height: 1.05;
}
.pf-freespin-lbl { display: block; font-size: 12px; color: var(--text-3, #9aa); }
.pf-freespin-list { display: flex; flex-direction: column; border-top: 1px solid var(--stroke, rgba(180,140,255,.14)); padding-top: 6px; }

/* Editable nickname + avatar */
.pf-name { display: flex; align-items: center; gap: 8px; }
.pf-name-edit, .pf-avatar-edit {
  background: none; border: none; cursor: pointer; font-size: 14px; opacity: .8;
}
.pf-avatar { position: relative; border: none; cursor: pointer; padding: 0; background: none; }
.pf-avatar .avatar-inner { font-size: 26px; }
.pf-avatar-edit {
  position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; font-size: 11px;
  background: var(--grad-gold, linear-gradient(90deg,#ffe89a,#f5b942)); color: #0b0f2a;
  border-radius: 50%; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.5);
}
/* Stat helper text + ? marker */
.pf-stat-q {
  display: inline-grid; place-items: center; width: 13px; height: 13px; font-size: 9px;
  border-radius: 50%; background: rgba(255,255,255,.12); color: var(--text-2,#ccd); vertical-align: middle;
}
.pf-stat-hint { display: block; margin-top: 4px; font-size: 10px; line-height: 1.35; color: var(--text-3,#9aa); }

/* Avatar picker overlay */
.pf-av-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(4,4,12,.7);
  display: grid; place-items: end center; backdrop-filter: blur(4px); }
.pf-av-sheet { width: 100%; max-width: 460px; background: var(--bg-1,#12122a);
  border: 1px solid var(--stroke,rgba(180,140,255,.2)); border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.pf-av-title { font-size: 15px; font-weight: 800; margin: 0 0 12px; color: var(--text-1,#fff); }
.pf-av-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.pf-av-opt { font-size: 26px; padding: 10px 0; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid var(--stroke,rgba(180,140,255,.16)); }
.pf-av-opt:active { transform: scale(.92); }

/* Pagination controls */
.pf-pg-row { display: none; }
.pf-pg-row.is-on { display: block; }
.pf-pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 0 2px; }
.pf-pager-btn { background: rgba(255,255,255,.06); border: 1px solid var(--stroke,rgba(180,140,255,.2));
  color: var(--text-1,#fff); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.pf-pager-btn:disabled { opacity: .35; cursor: default; }
.pf-pager-lbl { font-size: 12px; color: var(--text-3,#9aa); min-width: 42px; text-align: center; }
.pf-use-spins { flex-shrink: 0; padding: 8px 16px; font-size: 13px; margin-left: auto; }

/* ── Security: two-factor (TOTP) setup panel ─────────────────────────────── */
.pf-2fa-on {
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
  color: var(--success, #4ade80);
  background: rgba(74, 222, 128, .14); border: 1px solid rgba(74, 222, 128, .4);
  padding: 1px 6px; border-radius: 999px; vertical-align: middle; margin-left: 4px;
}
.pf-2fa-panel { display: flex; flex-direction: column; gap: 9px; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--stroke, rgba(255,255,255,.1)); }
.pf-2fa-hint { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-2, #c9c7d6); }
.pf-2fa-hint b { color: var(--gold-2, #ffd84a); }
.pf-2fa-err { color: var(--danger, #ff6b6b); }
.pf-2fa-key { display: flex; align-items: center; gap: 8px; }
.pf-2fa-key code {
  flex: 1; min-width: 0; word-break: break-all;
  font-family: ui-monospace, Menlo, monospace; font-size: 14px; letter-spacing: 1px;
  color: var(--gold-2, #ffd84a);
  background: rgba(255,255,255,.05); border: 1px solid var(--stroke, rgba(255,255,255,.12));
  border-radius: 8px; padding: 8px 10px;
}
.pf-2fa-link {
  display: inline-block; font-size: 13px; font-weight: 600;
  color: var(--gold-2, #ffd84a); text-decoration: none;
}
.pf-2fa-link:hover { text-decoration: underline; }
.pf-2fa-msg { margin: 2px 0 0; font-size: 12.5px; }
