/**
 * Snapchat Followers Count — Premium UI v5.2
 * FIX: mobile search button now OUTSIDE the input (separate pills).
 */

:root {
    --sfc-primary:#FFFC00; --sfc-accent:#F5A623; --sfc-bg:#0D0D0D; --sfc-card-bg:#1A1A2E;
    --sfc-text:#FFFFFF; --sfc-muted:#8B8FA3; --sfc-border:rgba(255,255,255,.07);
    --sfc-glow:rgba(255,252,0,.18); --sfc-glass:rgba(255,255,255,.04); --sfc-glass-brd:rgba(255,255,255,.09);
    --sfc-r:20px; --sfc-r-sm:14px; --sfc-r-xs:10px; --sfc-ease:cubic-bezier(.4,0,.2,1);
}

.sfc-wrapper,.sfc-wrapper * { box-sizing:border-box; margin:0; padding:0; }
.sfc-wrapper { max-width:720px; margin:32px auto; padding:0 16px; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; color:var(--sfc-text); line-height:1.6; -webkit-font-smoothing:antialiased; }

/* SEARCH */
.sfc-search-section { margin-bottom:6px; }
.sfc-input-group { display:flex; align-items:center; background:var(--sfc-glass); border:1.5px solid var(--sfc-glass-brd); border-radius:60px; padding:5px 5px 5px 20px; transition:border-color .3s var(--sfc-ease),box-shadow .3s var(--sfc-ease); }
.sfc-input-group:focus-within { border-color:var(--sfc-primary); box-shadow:0 0 0 4px var(--sfc-glow),0 12px 40px rgba(0,0,0,.35); }
.sfc-input-icon { display:flex; flex-shrink:0; color:var(--sfc-muted); margin-right:10px; }
.sfc-input { flex:1; min-width:0; background:transparent; border:none; outline:none; color:var(--sfc-text); font-size:15px; font-family:inherit; padding:12px 0; }
.sfc-input::placeholder { color:var(--sfc-muted); opacity:.65; }
.sfc-btn { display:inline-flex; align-items:center; gap:8px; flex-shrink:0; padding:13px 30px; border:none; border-radius:50px; background:var(--sfc-primary); color:#000; font-size:14px; font-weight:700; font-family:inherit; cursor:pointer; transition:background .25s var(--sfc-ease),transform .2s var(--sfc-ease),box-shadow .25s var(--sfc-ease); }
.sfc-btn:hover { background:#fff; transform:translateY(-1px); box-shadow:0 6px 24px var(--sfc-glow); }
.sfc-btn:active { transform:scale(.97); }
.sfc-btn:disabled { opacity:.55; cursor:not-allowed; transform:none; box-shadow:none; }
.sfc-btn .sfc-spinner { animation:sfc-spin .8s linear infinite; }
@keyframes sfc-spin { to { transform:rotate(360deg); } }
.sfc-input-hint { text-align:center; font-size:12px; color:var(--sfc-muted); opacity:.55; margin-top:10px; }

/* ERROR */
.sfc-error { display:flex; align-items:center; gap:10px; margin-top:16px; padding:14px 20px; background:rgba(239,68,68,.08); border:1px solid rgba(239,68,68,.22); border-radius:var(--sfc-r-xs); color:#FCA5A5; font-size:14px; animation:sfc-shake .4s var(--sfc-ease); }
@keyframes sfc-shake { 0%,100%{transform:translateX(0);} 20%{transform:translateX(-6px);} 60%{transform:translateX(5px);} }

/* RESULTS */
.sfc-results { margin-top:24px; padding:32px 28px; border-radius:var(--sfc-r); border:1px solid var(--sfc-glass-brd); background:linear-gradient(165deg,#111118 0%,#0D0D14 30%,#0A0A10 60%,#08080D 100%); box-shadow:0 24px 64px rgba(0,0,0,.55),0 4px 16px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.04); animation:sfc-rise .5s var(--sfc-ease) both; }
@keyframes sfc-rise { from{opacity:0;transform:translateY(24px) scale(.985);} to{opacity:1;transform:translateY(0) scale(1);} }

/* PROFILE ROW */
.sfc-profile-row { display:flex; align-items:center; gap:16px; }
.sfc-avatar-ring { flex-shrink:0; width:72px; height:72px; border-radius:50%; padding:3px; background:linear-gradient(135deg,var(--sfc-primary),var(--sfc-accent)); box-shadow:0 4px 20px rgba(255,252,0,.2); }
.sfc-avatar-ring.sfc-clickable { cursor:pointer; transition:transform .25s var(--sfc-ease),box-shadow .25s var(--sfc-ease); }
.sfc-avatar-ring.sfc-clickable:hover { transform:scale(1.06); box-shadow:0 6px 28px rgba(255,252,0,.4); }
.sfc-avatar-ring.sfc-clickable:active { transform:scale(.98); }
.sfc-avatar { width:100%; height:100%; border-radius:50%; object-fit:cover; border:3px solid #111118; display:block; pointer-events:none; }
.sfc-avatar-fallback { width:100%; height:100%; border-radius:50%; background:#1A1A2E; border:3px solid #111118; display:flex; align-items:center; justify-content:center; font-size:30px; }
.sfc-profile-meta { flex:1; min-width:0; }
.sfc-name-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.sfc-name { font-size:20px; font-weight:800; letter-spacing:-.3px; color:var(--sfc-text); line-height:1.25; }
.sfc-verified { display:inline-flex; align-items:center; gap:3px; background:rgba(59,130,246,.14); color:#60A5FA; padding:2px 9px; border-radius:6px; font-size:11px; font-weight:700; letter-spacing:.3px; }
.sfc-username { display:block; font-size:14px; color:var(--sfc-muted); margin-top:2px; }
.sfc-profile-cta { flex-shrink:0; display:inline-flex; align-items:center; gap:6px; padding:10px 20px; border-radius:50px; background:rgba(255,252,0,.08); border:1px solid rgba(255,252,0,.22); color:var(--sfc-primary); font-size:13px; font-weight:700; text-decoration:none; transition:all .25s var(--sfc-ease); }
.sfc-profile-cta:hover { background:var(--sfc-primary); color:#000; box-shadow:0 4px 20px var(--sfc-glow); transform:translateY(-1px); }

/* DIVIDER */
.sfc-divider { height:1px; background:linear-gradient(90deg,transparent 0%,var(--sfc-glass-brd) 20%,var(--sfc-glass-brd) 80%,transparent 100%); margin:22px 0; }

/* STATS */
.sfc-stats-row { display:flex; align-items:center; justify-content:center; }
.sfc-stat { flex:1; text-align:center; padding:4px 8px; }
.sfc-stat-num { display:block; font-size:26px; font-weight:800; letter-spacing:-.5px; color:var(--sfc-text); line-height:1.2; }
.sfc-stat-glow .sfc-stat-num { color:var(--sfc-primary); text-shadow:0 0 24px var(--sfc-glow); }
.sfc-stat-sm { font-size:14px !important; font-weight:600 !important; word-break:break-word; line-height:1.35; }
.sfc-stat-lbl { display:block; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:1.2px; color:var(--sfc-muted); margin-top:4px; }
.sfc-stat-sep { width:1px; height:36px; background:var(--sfc-glass-brd); flex-shrink:0; }

/* SNAPCODE THUMB */
.sfc-snapcode-thumb-btn { display:inline-flex; align-items:center; justify-content:center; width:52px; height:52px; padding:3px; border:2px solid rgba(255,252,0,.25); border-radius:12px; background:#fff; cursor:pointer; transition:transform .25s var(--sfc-ease),box-shadow .25s var(--sfc-ease),border-color .25s var(--sfc-ease); }
.sfc-snapcode-thumb-btn:hover { transform:scale(1.1); border-color:var(--sfc-primary); box-shadow:0 4px 20px var(--sfc-glow); }
.sfc-snapcode-thumb-btn:active { transform:scale(.95); }
.sfc-snapcode-thumb { width:100%; height:100%; object-fit:contain; border-radius:8px; }

/* DETAIL CARDS */
.sfc-details { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.sfc-detail { display:flex; align-items:flex-start; gap:12px; padding:16px; border-radius:var(--sfc-r-xs); background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.06); transition:border-color .3s var(--sfc-ease),transform .25s var(--sfc-ease),box-shadow .3s var(--sfc-ease); }
.sfc-detail:hover { border-color:rgba(255,252,0,.16); transform:translateY(-2px); box-shadow:0 6px 24px rgba(0,0,0,.3); }
.sfc-detail-ico { flex-shrink:0; width:38px; height:38px; display:flex; align-items:center; justify-content:center; font-size:18px; border-radius:9px; background:rgba(255,252,0,.06); border:1px solid rgba(255,252,0,.1); }
.sfc-detail-body { flex:1; min-width:0; }
.sfc-detail-lbl { display:block; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:1px; color:var(--sfc-muted); margin-bottom:4px; }
.sfc-detail-val { font-size:13.5px; color:var(--sfc-text); opacity:.9; line-height:1.55; word-break:break-word; }
.sfc-detail-link { font-size:13.5px; font-weight:600; color:var(--sfc-primary); text-decoration:none; word-break:break-all; transition:opacity .2s; }
.sfc-detail-link:hover { opacity:.75; text-decoration:underline; }

/* CTA */
.sfc-cta-wrap { margin-top:24px; text-align:center; }
.sfc-cta-btn { display:inline-flex; align-items:center; justify-content:center; gap:10px; width:100%; max-width:380px; padding:16px 32px; border-radius:50px; background:var(--sfc-primary); color:#000; font-size:15px; font-weight:800; font-family:inherit; text-decoration:none; letter-spacing:-.2px; transition:background .25s var(--sfc-ease),transform .2s var(--sfc-ease),box-shadow .25s var(--sfc-ease); box-shadow:0 4px 20px rgba(255,252,0,.2); }
.sfc-cta-btn:hover { background:#fff; transform:translateY(-2px); box-shadow:0 8px 32px rgba(255,252,0,.3); }
.sfc-cta-btn:active { transform:scale(.97); }

/* MODALS */
.sfc-modal { position:fixed !important; top:0 !important; left:0 !important; right:0 !important; bottom:0 !important; width:100vw !important; height:100vh !important; max-width:none !important; margin:0 !important; padding:20px !important; z-index:2147483647 !important; align-items:center !important; justify-content:center !important; overflow-y:auto !important; float:none !important; clear:both !important; transform:none !important; }
.sfc-modal-overlay { position:fixed !important; top:0 !important; left:0 !important; right:0 !important; bottom:0 !important; width:100vw !important; height:100vh !important; background:rgba(6,6,10,.92) !important; backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); cursor:pointer; }
.sfc-modal-box { position:relative; z-index:1; margin:auto; background:linear-gradient(165deg,#16161E,#0E0E14); border:1px solid rgba(255,255,255,.1); border-radius:var(--sfc-r); padding:36px 32px 28px; text-align:center; max-width:360px; width:100%; max-height:90vh; overflow-y:auto; box-shadow:0 32px 80px rgba(0,0,0,.7); animation:sfc-modal-pop .35s var(--sfc-ease) both; }
@keyframes sfc-modal-pop { from{opacity:0;transform:scale(.9) translateY(16px);} to{opacity:1;transform:scale(1) translateY(0);} }
.sfc-modal-x { position:absolute; top:14px; right:14px; width:36px; height:36px; display:flex; align-items:center; justify-content:center; border:1px solid rgba(255,255,255,.14); border-radius:50%; background:rgba(255,255,255,.08); color:#c7cad6; cursor:pointer; transition:all .2s var(--sfc-ease); line-height:1; }
.sfc-modal-x:hover { background:rgba(255,68,68,.18); border-color:rgba(255,68,68,.4); color:#fff; }
.sfc-modal-x svg { display:none !important; }
.sfc-modal-x::before,.sfc-modal-x::after { content:''; position:absolute; top:50%; left:50%; width:15px; height:2px; background:currentColor; border-radius:2px; }
.sfc-modal-x::before { transform:translate(-50%,-50%) rotate(45deg); }
.sfc-modal-x::after  { transform:translate(-50%,-50%) rotate(-45deg); }
.sfc-modal-title { font-size:16px; font-weight:700; color:var(--sfc-text); margin-bottom:20px; }
.sfc-snapcode-full { width:240px; height:240px; max-width:100%; object-fit:contain; border-radius:16px; background:#fff; padding:12px; border:2px solid rgba(255,252,0,.25); box-shadow:0 8px 32px rgba(0,0,0,.5); }
.sfc-modal-hint { margin-top:16px; font-size:12.5px; color:var(--sfc-muted); line-height:1.5; }

/* PROFILE IMAGE MODAL */
.sfc-img-full { width:280px; height:280px; max-width:100%; object-fit:cover; border-radius:16px; background:#1A1A2E; border:2px solid rgba(255,252,0,.25); box-shadow:0 8px 32px rgba(0,0,0,.5); }
.sfc-img-download { margin-top:18px; display:inline-flex; align-items:center; justify-content:center; gap:8px; width:100%; padding:13px 24px; border:none; border-radius:50px; background:var(--sfc-primary); color:#000; font-size:14px; font-weight:800; font-family:inherit; cursor:pointer; letter-spacing:-.2px; transition:background .25s var(--sfc-ease),transform .2s var(--sfc-ease),box-shadow .25s var(--sfc-ease); box-shadow:0 4px 18px rgba(255,252,0,.2); }
.sfc-img-download:hover { background:#fff; transform:translateY(-1px); box-shadow:0 6px 24px rgba(255,252,0,.35); }
.sfc-img-download:active { transform:scale(.97); }
.sfc-img-download:disabled { opacity:.7; cursor:wait; transform:none; }

/* COMPACT */
.sfc-layout-compact .sfc-input-group { padding:4px 4px 4px 16px; }
.sfc-layout-compact .sfc-btn { padding:11px 22px; font-size:13px; }
.sfc-layout-compact .sfc-results { padding:24px 20px; }

/* ═══ TABLET / MOBILE — search button OUTSIDE input ═══ */
@media (max-width:768px) {
    .sfc-wrapper { margin:20px auto; }

    /* outer wrapper becomes invisible → input & button are separate pills */
    .sfc-input-group { flex-direction:column; background:transparent; border:none; padding:0; gap:10px; box-shadow:none; }
    .sfc-input-group:focus-within { border-color:transparent; box-shadow:none; }
    .sfc-input-icon { display:none; }
    /* input gets its own bordered pill */
    .sfc-input { background:var(--sfc-glass); border:1.5px solid var(--sfc-glass-brd); border-radius:50px; padding:14px 18px; text-align:center; width:100%; transition:border-color .3s var(--sfc-ease),box-shadow .3s var(--sfc-ease); }
    .sfc-input:focus { border-color:var(--sfc-primary); box-shadow:0 0 0 4px var(--sfc-glow); }
    /* button is its own full-width pill below */
    .sfc-btn { width:100%; justify-content:center; border-radius:50px; padding:15px; }

    .sfc-results { padding:24px 18px; }
    .sfc-profile-row { flex-direction:column; text-align:center; gap:12px; }
    .sfc-name-row { justify-content:center; }
    .sfc-profile-cta { margin-top:2px; }
    .sfc-stats-row { flex-wrap:wrap; gap:16px 0; }
    .sfc-stat { flex:0 0 50%; }
    .sfc-stat-sep { display:none; }
    .sfc-stat-num { font-size:22px; }
    .sfc-details { grid-template-columns:1fr; }
    .sfc-modal { padding:16px !important; }
    .sfc-snapcode-full { width:220px; height:220px; }
    .sfc-img-full { width:240px; height:240px; }
}

@media (max-width:480px) {
    .sfc-results { padding:20px 14px; border-radius:16px; }
    .sfc-avatar-ring { width:64px; height:64px; }
    .sfc-name { font-size:18px; }
    .sfc-stat-num { font-size:20px; }
    .sfc-stat-sm { font-size:13px !important; }
    .sfc-divider { margin:18px 0; }
    .sfc-cta-btn { font-size:14px; padding:14px 24px; }
    .sfc-modal-box { padding:28px 20px 22px; max-width:320px; }
    .sfc-snapcode-full { width:200px; height:200px; }
    .sfc-img-full { width:210px; height:210px; }
    .sfc-snapcode-thumb-btn { width:46px; height:46px; }
}

@media (prefers-reduced-motion:reduce) { .sfc-results,.sfc-error,.sfc-modal-box,.sfc-btn .sfc-spinner { animation:none !important; } .sfc-wrapper * { transition:none !important; } }

.sfc-wrapper h2,.sfc-wrapper h3,.sfc-wrapper h4,.sfc-wrapper p,.sfc-wrapper span,.sfc-wrapper a,.sfc-wrapper button,.sfc-wrapper input { font-family:inherit; }
.sfc-wrapper .sfc-input:focus,.sfc-wrapper .sfc-btn:focus { outline:none; box-shadow:none; }
.sfc-wrapper .sfc-btn:focus-visible { outline:2px solid var(--sfc-primary); outline-offset:2px; }
.sfc-modal,.sfc-modal * { box-sizing:border-box; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; }
body.sfc-modal-open { overflow:hidden !important; }