/* ==========================================================================
   Spoilr — FAN SIDE styles (mobile-first). Scoped under body.fan-mode and the
   .fan-screen wrapper so nothing here touches the creator app.
   ========================================================================== */

body.fan-mode { -webkit-font-smoothing: antialiased; }

.fan-screen {
  max-width: 640px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px 24px;
  font-family: var(--font-sans, -apple-system, system-ui, sans-serif);
  color: #14141a;
  animation: fanIn .28s ease both;
}
@keyframes fanIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- header */
.fan-head { margin: 4px 0 18px; }
.fan-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.fan-head p { margin: 4px 0 0; color: #7a7a83; font-size: 15px; }
.fan-h3 { font-size: 17px; font-weight: 700; margin: 26px 0 10px; letter-spacing: -.01em; }

/* ---------------------------------------------------------------- search + chips */
.fan-search {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 14px;
  padding: 0 12px; height: 46px; margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.fan-search .fs-ic { color: #9a9aa2; display: flex; }
.fan-search .fs-ic svg { width: 18px; height: 18px; }
.fan-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; color: #14141a; }

.fan-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: none; }
.fan-chips::-webkit-scrollbar { display: none; }
.fan-chip {
  flex: 0 0 auto; border: 1px solid rgba(0,0,0,.08); background: #fff; color: #57575e;
  font: 600 13px/1 var(--font-sans); padding: 9px 15px; border-radius: 9999px; cursor: pointer;
  transition: all .18s;
}
.fan-chip.on { background: #111; color: #fff; border-color: #111; }

/* ---------------------------------------------------------------- creator grid */
.fan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 400px) { .fan-grid { grid-template-columns: 1fr; } }

.fan-card {
  position: relative; background: #fff; border: 1px solid rgba(0,0,0,.06);
  border-radius: 20px; padding: 18px 14px 14px; text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.04); transition: transform .15s, box-shadow .2s;
}
.fan-card:active { transform: scale(.985); }
.fan-hot {
  position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 3px;
  background: rgba(239,93,168,.12); color: #E23F92; font: 700 11px/1 var(--font-sans);
  padding: 5px 8px; border-radius: 9999px;
}
.fan-av {
  width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font: 800 20px/1 var(--font-sans); color: #fff; letter-spacing: -.02em;
  background: linear-gradient(135deg, #EF5DA8, #C13584);
}
.fan-av[data-g="male"] { background: linear-gradient(135deg, #4A9DFF, #2E5BFF); }
.fan-av[data-g="neutral"] { background: linear-gradient(135deg, #9CA3AF, #6B7280); }
.fan-av.lg { width: 52px; height: 52px; font-size: 18px; margin: 0; }
.fan-card-name { display: flex; align-items: center; justify-content: center; gap: 4px; font-weight: 700; font-size: 15px; }
.fan-card-cat { color: #8a8a90; font-size: 12.5px; margin: 2px 0 10px; }
.fan-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; color: #6a6a72; margin-bottom: 12px; }
.fan-card-meta span { display: inline-flex; align-items: center; gap: 3px; }
.fan-card-pay { color: #16A34A; font-weight: 600; text-align: right; }
.fan-card-actions { display: flex; flex-direction: column; gap: 7px; }
.fan-card-actions .btn { width: 100%; }
.fan-card-actions .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }

/* ---------------------------------------------------------------- earnings hero */
.fan-hero {
  background: linear-gradient(135deg, #111 0%, #2a2a33 100%); color: #fff;
  border-radius: 24px; padding: 22px 20px; text-align: center; margin-bottom: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.fan-hero-lab { font-size: 13px; opacity: .7; font-weight: 600; }
.fan-hero-val { font-size: 40px; font-weight: 800; letter-spacing: -.03em; margin: 4px 0 16px; }
.fan-hero .btn-primary { background: #fff; color: #111; }

.fan-stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.fan-stat {
  background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 16px; padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
}
.fan-stat-ic { color: #9a9aa2; }
.fan-stat-val { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.fan-stat-lab { font-size: 11px; color: #8a8a90; font-weight: 600; }

/* ---------------------------------------------------------------- lists / rows */
.fan-list { display: flex; flex-direction: column; gap: 8px; }
.fan-row {
  display: flex; align-items: center; gap: 12px; background: #fff;
  border: 1px solid rgba(0,0,0,.06); border-radius: 16px; padding: 12px 14px;
}
.fan-row-ic {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; color: #14141a;
  background: #f1f1f4;
}
.fan-row-ic.soft { color: #6a6a72; }
.fan-row-ic[data-plat="tiktok"] { background: #111; color: #fff; }
.fan-row-ic[data-plat="youtube"] { background: #FF0000; color: #fff; }
.fan-row-ic[data-plat="instagram"] { background: linear-gradient(135deg,#f09433,#dc2743,#bc1888); color: #fff; }
.fan-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fan-row-body b { font-size: 14.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.fan-row-sub { font-size: 12.5px; color: #8a8a90; }
.fan-row-amt { font-weight: 800; font-size: 15px; }
.fan-row-amt.pos { color: #16A34A; }
.fan-badge { font: 700 10.5px/1 var(--font-sans); padding: 4px 8px; border-radius: 9999px; }
.fan-badge.live { background: rgba(22,163,74,.14); color: #16A34A; }
.fan-badge.review { background: rgba(234,168,0,.16); color: #B4820A; }

.fan-empty { text-align: center; color: #9a9aa2; font-size: 14px; padding: 22px; background: #fff; border-radius: 16px; border: 1px dashed rgba(0,0,0,.1); }

/* ---------------------------------------------------------------- earn programs */
.fan-strategy {
  display: flex; gap: 12px; align-items: flex-start; background: linear-gradient(135deg,#FFF4FA,#F3F6FF);
  border: 1px solid rgba(0,0,0,.05); border-radius: 20px; padding: 16px; margin-bottom: 16px;
}
.fan-strategy .fs-ic { width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: #111; color: #fff; }
.fan-strategy b { font-size: 15px; }
.fan-strategy p { margin: 3px 0 0; font-size: 13.5px; color: #57575e; line-height: 1.4; }

.fan-progs { display: flex; flex-direction: column; gap: 10px; }
.fan-prog {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 18px; padding: 14px;
  cursor: pointer; transition: transform .14s, box-shadow .2s;
}
.fan-prog:active { transform: scale(.99); }
.fan-prog-ic { width: 46px; height: 46px; border-radius: 14px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.fan-prog-ic.big { width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 14px; }
.fan-prog-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fan-prog-body b { font-size: 15px; font-weight: 700; }
.fan-prog-body > span { font-size: 13px; color: #7a7a83; line-height: 1.35; }
.fan-prog-pay { display: inline-flex; align-items: center; gap: 5px; color: #16A34A !important; font-weight: 600; font-size: 12.5px !important; margin-top: 4px; }
.fan-prog-chev { color: #c4c4cc; flex: 0 0 auto; }

/* program detail */
.fan-back {
  display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; cursor: pointer;
  color: #57575e; font: 600 15px/1 var(--font-sans); padding: 4px 0 14px; margin-left: -4px;
}
.fan-back svg { width: 20px; height: 20px; }
.fan-prog-hero { text-align: center; margin-bottom: 8px; }
.fan-prog-hero h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.fan-prog-hero p { color: #7a7a83; font-size: 15px; margin: 6px 0 0; }
.fan-prog-payline { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; background: rgba(22,163,74,.1); color: #16A34A; font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 9999px; }
.fan-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.fan-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; color: #2a2a33; }
.fan-step-n { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: #111; color: #fff; font: 800 13px/26px var(--font-sans); text-align: center; }
.fan-example { background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 16px; padding: 14px 16px; margin: 18px 0; }
.fan-example b { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #9a9aa2; }
.fan-example p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.45; color: #2a2a33; }
.fan-note { font-size: 12.5px; color: #9a9aa2; margin-top: 12px; }
.fan-note.center { text-align: center; }

/* ---------------------------------------------------------------- settings */
.fan-profile-card {
  display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid rgba(0,0,0,.06);
  border-radius: 20px; padding: 16px; margin-bottom: 18px;
}
.fan-profile-card b { font-size: 17px; display: block; }
.fan-profile-card span { font-size: 13px; color: #8a8a90; }
.fan-sgroup { margin-bottom: 18px; }
.fan-sgroup-t { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: #9a9aa2; font-weight: 700; margin: 0 4px 8px; }
.fan-srow {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: #fff; border: 0; border-bottom: 1px solid rgba(0,0,0,.05); padding: 14px 14px; cursor: pointer;
  font: 500 15px/1 var(--font-sans); color: #14141a;
}
.fan-sgroup .fan-srow:first-child { border-radius: 16px 16px 0 0; }
.fan-sgroup .fan-srow:last-child { border-radius: 0 0 16px 16px; border-bottom: 0; }
.fan-sgroup .fan-srow:only-child { border-radius: 16px; }
.fan-srow-ic { color: #57575e; display: flex; }
.fan-srow-lab { flex: 1; }
.fan-toggle { width: 46px; height: 28px; border-radius: 9999px; background: #d8d8de; border: 0; position: relative; cursor: pointer; transition: background .2s; }
.fan-toggle span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.fan-toggle.on { background: #16A34A; }
.fan-toggle.on span { transform: translateX(18px); }
.fan-become { margin-bottom: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.fan-signout { color: #E5484D !important; }

/* ---------------------------------------------------------------- join / gate */
.fan-join { text-align: center; padding-top: 6px; }
.fan-join-badge { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#FDBB2D,#F7971E); color: #fff; box-shadow: 0 8px 24px rgba(247,151,30,.35); }
.fan-join h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.fan-join-lede { color: #57575e; font-size: 15.5px; line-height: 1.45; margin: 8px auto 22px; max-width: 380px; }
.fan-join-perks { display: flex; flex-direction: column; gap: 10px; text-align: left; margin-bottom: 24px; }
.fan-perk { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 16px; padding: 13px 14px; }
.fan-perk-ic { width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: #f1f1f4; color: #14141a; }
.fan-perk b { font-size: 14.5px; display: block; }
.fan-perk span { font-size: 13px; color: #7a7a83; }
.fan-join-form { text-align: left; }
.fan-join-form .field { margin-bottom: 12px; }
.fan-join-form label { display: block; font-size: 13px; font-weight: 600; color: #57575e; margin-bottom: 6px; }
.fan-join-form input { width: 100%; height: 48px; border: 1px solid rgba(0,0,0,.1); border-radius: 13px; padding: 0 14px; font-size: 16px; background: #fff; outline: 0; transition: border-color .15s; }
.fan-join-form input:focus { border-color: #111; }
.fan-err { color: #E5484D; font-size: 13px; font-weight: 600; min-height: 18px; margin-bottom: 6px; }

.fan-gate { text-align: center; background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 22px; padding: 32px 20px; margin-top: 10px; }
.fan-gate-ic { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: #f1f1f4; color: #57575e; }
.fan-gate p { color: #7a7a83; font-size: 15px; margin: 0 0 18px; }

/* ---------------------------------------------------------------- role chooser (signup step 0) */
.role-opts { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.role-card {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface-1, #fff); border: 1px solid rgba(0,0,0,.1); border-radius: 20px; padding: 20px;
  transition: transform .15s, border-color .15s, box-shadow .2s;
}
.role-card:hover { border-color: rgba(0,0,0,.25); box-shadow: 0 8px 24px rgba(0,0,0,.06); transform: translateY(-2px); }
.role-card:active { transform: scale(.99); }
.role-ic {
  width: 52px; height: 52px; border-radius: 15px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  background: var(--ink, #111); color: #fff;
}
.role-ic svg { width: 24px; height: 24px; }
.role-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.role-tx b { font-size: 17px; font-weight: 700; }
.role-tx span { font-size: 13.5px; color: var(--fg-2, #7a7a83); line-height: 1.4; }
.role-chev { color: var(--fg-3, #c4c4cc); flex: 0 0 auto; width: 22px; height: 22px; }

/* ---------------------------------------------------------------- link box (modal) */
.fan-linkbox { display: flex; align-items: center; gap: 8px; background: #f4f4f7; border: 1px solid rgba(0,0,0,.07); border-radius: 12px; padding: 6px 6px 6px 12px; }
.fan-linkbox span { flex: 1; font-size: 13px; color: #2a2a33; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
