/* =============================================================
   ZappDetect Insta funnel — shared light theme (SPYGRAM-style)
   Single source of truth for tokens + components. Every page in
   the insta-stalker funnel should load this before its own CSS.
   ============================================================= */

:root {
    /* Vibrant Instagram palette */
    --pink: #ff0069;
    --red: #e1306c;
    --orange: #ff7a00;
    --yellow: #ffd600;
    --purple: #7638fa;

    /* Brand gradient — EXACT SPYGRAM stop values (yellow -> orange 27% -> pink 66% -> purple) */
    --grad-brand: linear-gradient(100deg, #ffd600, #ff7a00 27%, #ff0069 66%, #7638fa);
    --grad-brand-soft: linear-gradient(100deg, #ffc74d 0%, #ff9a3d 30%, #ff4d8d 66%, #9d6bff 100%);
    /* Instagram official gradient (used on the "open Instagram" pill / logo) */
    --grad-ig: linear-gradient(100deg, #ffd600, #ff7a00 27%, #ff0069 66%, #7638fa);

    /* Surfaces */
    --bg-page: #fff8f6;                 /* soft warm base */
    --bg-page-grad:
        radial-gradient(circle at 18% 12%, rgba(255,214,0,.16), transparent 26%),
        radial-gradient(circle at 86% 8%, rgba(255,0,105,.14), transparent 30%),
        radial-gradient(circle at 48% 92%, rgba(118,56,250,.10), transparent 34%),
        linear-gradient(135deg, #fffaf7, #fff3f7 44%, #f8fbff);
    --surface: #ffffff;
    --surface-glass: rgba(255, 255, 255, .92);   /* SPYGRAM glass card surface */
    --surface-2: #f7f8fa;
    --surface-dark: #0e1113;            /* dark inset panels (terminal / evidence) */

    /* Text */
    --text: #171421;
    --text-muted: #675f73;
    --text-faint: #9aa0a8;
    --on-grad: #ffffff;

    /* Semantic */
    --danger: #ff2d3c;
    --danger-soft: #ffe6e8;
    --warn: #ff8a00;
    --warn-soft: #fff1df;
    --success: #12b76a;
    --success-soft: #e6f7ef;
    --info: #4f5bd5;

    /* Borders / radius / shadow */
    --border: rgba(23, 20, 33, .08);
    --border-strong: #e6dfe6;
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    --shadow-sm: 0 2px 8px rgba(107, 29, 84, .07);
    --shadow: 0 12px 34px rgba(107, 29, 84, .10);
    --shadow-lg: 0 24px 70px rgba(107, 29, 84, .18);
    --shadow-glow: 0 12px 30px rgba(225, 48, 108, .38);

    /* Layout */
    --app-max: 480px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    background: transparent;      /* base color comes from html; aurora from ::before */
    min-height: 100vh;
}

/* Animated aurora background — the light base + soft color blobs (yellow/pink/
   purple) that drift slowly. Fixed so it stays on scroll; z-index:-1 keeps it
   behind all content. Pages that set an opaque body background (feed/direct/
   chats) naturally hide it, keeping the "Instagram" screens clean. */
body::before {
    content: "";
    position: fixed;
    inset: -25%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 16%, rgba(255,122,0,.22), transparent 24%),
        radial-gradient(circle at 82% 10%, rgba(255,0,105,.20), transparent 26%),
        radial-gradient(circle at 28% 86%, rgba(118,56,250,.18), transparent 28%),
        radial-gradient(circle at 80% 82%, rgba(255,214,0,.18), transparent 26%),
        linear-gradient(135deg, #fffaf7, #fff3f7 44%, #f8fbff);
    animation: auroraDrift 22s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes auroraDrift {
    0%   { transform: translate3d(0, 0, 0) scale(1.02); }
    50%  { transform: translate3d(2.5%, -2.2%, 0) scale(1.1); }
    100% { transform: translate3d(-2.5%, 2.2%, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
    body::before { animation: none; }
}

/* Centered mobile shell */
.app-shell {
    width: 100%;
    max-width: var(--app-max);
    margin: 0 auto;
    padding: 20px 16px 48px;
    position: relative;
}

/* ---------- Brand logo lockup ---------- */
.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 900;
    font-size: 23px;
    letter-spacing: -0.035em;
    line-height: 1;
}
.brand-logo .brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--grad-ig);
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: 0 6px 16px rgba(214, 41, 118, .32);
    flex: none;
    position: relative;
    overflow: hidden;
}
/* subtle sheen on the app-icon */
.brand-logo .brand-icon::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.35), transparent 45%);
    pointer-events: none;
}
.brand-logo .brand-icon svg { width: 60%; height: 60%; display: block; position: relative; z-index: 1; }
.brand-logo .brand-word { display: inline-flex; align-items: baseline; }
.brand-logo .brand-a { color: var(--text); }
.brand-logo .brand-b {
    margin-left: .16em;
    background: var(--grad-ig);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- Cards ---------- */
.card {
    background: var(--surface-glass);              /* SPYGRAM: rgba(255,255,255,.92) */
    border-radius: var(--radius-lg);               /* 24px */
    box-shadow: 0 24px 70px rgba(107, 29, 84, .14);/* SPYGRAM --v4-shadow */
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(225, 48, 108, .16);     /* SPYGRAM --v4-border (pink-tinted) */
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    animation: cardEntrance .5s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes cardEntrance {
    0% { opacity: 0; transform: translateY(24px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .card { animation: none; }
}
.card-tight { padding: 14px; }
.card-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}
.muted { color: var(--text-muted); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 800;
    font-size: 16px;
    padding: 16px 20px;
    border-radius: 14px;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn-gradient {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--grad-brand);
    color: var(--on-grad);
    /* SPYGRAM .v4-btn-gradient resting shadow + .v4-btn-attention glow pulse */
    box-shadow: 0 16px 36px rgba(255,0,105,.24), 0 8px 20px rgba(255,122,0,.16);
    animation: btnGlow 2.4s ease-in-out infinite;
}
/* shimmer sweep across gradient buttons — EXACT SPYGRAM v4-btn-shimmer */
.btn-gradient::after {
    content: "";
    position: absolute; top: 0; bottom: 0; left: 0; width: 42%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
    transform: translate(-160%) skew(-22deg);
    animation: btnShimmer 3.4s ease-in-out infinite;
    pointer-events: none;
}
.btn-gradient.glow { animation: btnGlow 2.4s ease-in-out infinite; }
.btn-success { background: var(--success); color: #fff; box-shadow: 0 10px 26px rgba(18,183,106,.28); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline {
    background: var(--surface);
    color: var(--text);
    border: 1.5px solid var(--border-strong);
    box-shadow: var(--shadow-sm);
}
.btn-ghost { background: transparent; color: var(--text-muted); box-shadow: none; }
.btn-sm { padding: 11px 16px; font-size: 14px; }
.btn-ig { background: var(--grad-ig); color: #fff; }

/* EXACT SPYGRAM v4-btn-glow-pulse */
@keyframes btnGlow {
    0%, 100% { box-shadow: 0 10px 25px rgba(225,48,108,.35), 0 0 0 0 rgba(255,0,105,.55); }
    50% { box-shadow: 0 18px 42px rgba(225,48,108,.55), 0 0 0 10px rgba(255,0,105,0); }
}
/* EXACT SPYGRAM v4-btn-shimmer */
@keyframes btnShimmer {
    0% { transform: translate(-160%) skew(-22deg); }
    60%, 100% { transform: translate(260%) skew(-22deg); }
}
/* SPYGRAM floating decorative elements */
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.floaty { animation: floatY 3.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
    .btn-gradient, .btn-gradient.glow { animation: none; }
    .btn-gradient::after { display: none; }
    .floaty { animation: none; }
}

/* ---------- Badges / pills ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: var(--radius-pill);
    line-height: 1;
}
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-info { background: #eef0ff; color: var(--info); }
.badge-neutral { background: var(--surface-2); color: var(--text-muted); }

/* Step indicator (ETAPA 1 DE 3) */
.step-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--text-faint);
    text-transform: uppercase;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
}
.step-dots { display: inline-flex; gap: 6px; align-items: center; }
.step-dots i {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--border-strong); display: inline-block;
}
.step-dots i.on { width: 22px; border-radius: 4px; background: var(--grad-brand); }

/* ---------- Urgency bar ---------- */
.urgency-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--danger);
    color: #fff;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
}
.urgency-bar .u-time { color: #ffd400; font-variant-numeric: tabular-nums; }
.urgency-bar .u-btn {
    background: #fff; color: var(--danger); border: none;
    font-weight: 800; font-size: 13px; padding: 7px 16px;
    border-radius: var(--radius-pill); cursor: pointer;
}

/* ---------- Progress bars ---------- */
.progress {
    height: 8px;
    background: var(--surface-2);
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.progress > i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--grad-brand);
    border-radius: var(--radius-pill);
    transition: width .4s ease;
}
.progress-row {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 14px; font-weight: 600; margin: 14px 0 6px;
}
.progress-row .pct { color: var(--danger); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- FAQ accordion ---------- */
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    background: var(--surface);
    overflow: hidden;
}
.faq-q {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 16px; cursor: pointer;
    font-weight: 700; font-size: 15px;
}
.faq-q .faq-ic { color: var(--danger); font-size: 20px; flex: none; transition: transform .2s ease; }
.faq-item.open .faq-ic { transform: rotate(45deg); }
.faq-a {
    max-height: 0; overflow: hidden;
    transition: max-height .28s ease, padding .28s ease;
    padding: 0 16px; color: var(--text-muted); font-size: 14px; line-height: 1.55;
}
.faq-item.open .faq-a { max-height: 320px; padding: 0 16px 16px; }

/* ---------- Pricing plans ---------- */
.plans { display: grid; gap: 14px; }
.plan {
    position: relative;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.plan.featured {
    border-color: transparent;
    background:
        linear-gradient(var(--surface), var(--surface)) padding-box,
        var(--grad-brand) border-box;
    box-shadow: var(--shadow-lg);
}
.plan-tag {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--grad-brand); color: #fff;
    font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    padding: 5px 14px; border-radius: var(--radius-pill); white-space: nowrap;
}
.plan-name { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.plan-price { font-size: 40px; font-weight: 900; letter-spacing: -0.03em; margin: 6px 0 2px; }
.plan-price small { font-size: 16px; font-weight: 700; color: var(--text-muted); }
.plan-old { color: var(--text-faint); text-decoration: line-through; font-size: 15px; }
.plan-feats { list-style: none; margin: 14px 0 18px; padding: 0; display: grid; gap: 9px; }
.plan-feats li { display: flex; gap: 9px; font-size: 14px; color: var(--text); line-height: 1.4; }
.plan-feats li::before { content: "✓"; color: var(--success); font-weight: 900; flex: none; }
.plan-feats li.off { color: var(--text-faint); }
.plan-feats li.off::before { content: "✕"; color: var(--text-faint); }

/* ---------- Suspicious media grid (blurred evidence) ---------- */
.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.evidence {
    position: relative; aspect-ratio: 1; border-radius: var(--radius-sm);
    overflow: hidden; background: var(--surface-2);
}
.evidence img { width: 100%; height: 100%; object-fit: cover; filter: blur(14px); transform: scale(1.15); animation: revealBlur 4.5s ease-in-out infinite; }
@keyframes revealBlur {
    0% { filter: blur(16px); }
    25% { filter: blur(10px); }
    50% { filter: blur(5px); }
    65% { filter: blur(3px); }
    78% { filter: blur(7px); }
    100% { filter: blur(16px); }
}
@media (prefers-reduced-motion: reduce) { .evidence img { animation: none; } }
.evidence .lock {
    position: absolute; inset: 0; display: grid; place-items: center;
    color: #fff; font-size: 22px; background: rgba(0,0,0,.18);
}
.evidence.flagged { box-shadow: inset 0 0 0 2px var(--danger); }

/* Dark inset panel (terminal / realtime steps) */
.panel-dark {
    background: var(--surface-dark);
    color: #e7eef0;
    border-radius: var(--radius);
    padding: 16px;
}
.panel-dark .mono { font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }

/* Stat rows (report summary) */
.stat-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 14px 16px; border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 10px; font-weight: 700; font-size: 15px;
}
.stat-row .stat-num { color: var(--danger); font-size: 20px; font-weight: 900; }
.stat-row .stat-ic { font-size: 18px; }

/* Keyword pills row */
.kw-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 16px; border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 8px; font-weight: 700;
}
.kw-row .kw-count {
    background: var(--danger-soft); color: var(--danger);
    border-radius: var(--radius-pill); padding: 3px 12px; font-size: 13px; font-weight: 800;
}

/* Floating access-instagram pill (persistent CTA) */
.float-cta {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: 16px; z-index: 60;
    width: calc(100% - 32px); max-width: calc(var(--app-max) - 32px);
    box-shadow: var(--shadow-lg);
}

/* Toast / realtime notification */
.rt-toast {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--surface-dark); color: #e7eef0;
    border-radius: 14px; padding: 12px 14px; font-size: 13px; line-height: 1.4;
    box-shadow: var(--shadow);
}
.rt-toast .rt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); margin-top: 5px; flex: none; }
.rt-toast b { color: #fff; }
.rt-hl { background: rgba(18,183,106,.22); color: #7ef0b4; padding: 1px 5px; border-radius: 5px; }

/* Helpers */
.hidden { display: none !important; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.gradient-text {
    background: var(--grad-brand);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.divider { height: 1px; background: var(--border); margin: 16px 0; border: 0; }
.stack-sm > * + * { margin-top: 8px; }

/* Fade / slide entrance */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .4s ease both; }

/* Glitch headline (RGB split) — add class="glitch" to a heading */
.glitch { position: relative; animation: glitchText 3.6s steps(1) infinite; }
@keyframes glitchText {
    0%   { text-shadow: none; transform: none; }
    6%   { text-shadow: -2px 0 var(--pink), 2px 0 var(--purple); transform: skewX(-2deg); }
    12%  { text-shadow: 2px 0 var(--pink), -2px 0 var(--purple); transform: none; }
    18%  { text-shadow: -1px 0 var(--pink), 1px 0 var(--purple); transform: skewX(1deg); }
    24%  { text-shadow: none; transform: none; }
    100% { text-shadow: none; transform: none; }
}

/* Full-screen scanline overlay — add an empty <div class="scanline"></div> */
.scanline { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.scanline::before {
    content: ""; position: absolute; left: 0; right: 0; height: 120px;
    background: linear-gradient(180deg, transparent, rgba(255,0,105,.10) 45%, rgba(118,56,250,.10) 55%, transparent);
    animation: scanMove 5.5s linear infinite;
}
@keyframes scanMove { 0% { transform: translateY(-140px); } 100% { transform: translateY(100vh); } }

/* Soft pulsing border-glow (add class="glow-border") */
.glow-border { animation: borderGlow 2.6s ease-in-out infinite; }
@keyframes borderGlow {
    0%, 100% { box-shadow: var(--shadow-sm); }
    50% { box-shadow: 0 0 22px rgba(255,0,105,.28), inset 0 0 12px rgba(255,0,105,.05); }
}

@media (prefers-reduced-motion: reduce) {
    .glitch, .scanline::before, .glow-border { animation: none; }
}

/* Modal overlay */
.overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(20, 22, 26, .55);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.overlay .modal {
    width: 100%; max-width: 420px;
    background: var(--surface); border-radius: var(--radius-lg);
    padding: 24px; box-shadow: var(--shadow-lg);
    animation: fadeUp .3s ease both;
}
