@import url('https://fonts.googleapis.com/css2?family=Anybody:ital,wght@0,700;0,800;0,900;1,800&family=Hanken+Grotesk:wght@400;500;700;800&family=JetBrains+Mono:wght@500;600;700;800&display=swap');

:root {
  --bg: #f7f7f8;
  --bg-2: #f1f1f3;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --border: #e6e7eb;
  --border-strong: #d3d5da;
  --ink: #14161a;
  --muted: #6b7280;
  --faint: #9aa0aa;
  --accent: #0bbf64;
  --accent-2: #08a554;
  --accent-deep: #0a8f4c;
  --accent-ink: #ffffff;
  --accent-soft: rgba(11, 191, 100, .10);
  --gold: #b8860b;
  --gold-bright: #f5b400;
  --gold-soft: rgba(245, 180, 0, .16);
  --danger: #e5484d;
  --heart: #e5484d;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 60px rgba(16, 24, 40, .16);
  --font-display: 'Anybody', sans-serif;
  --font-body: 'Hanken Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container { max-width: 600px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; }
.brand { font-family: var(--font-display); font-weight: 900; font-size: 18px; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.brand .logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff; font-size: 15px;
}
.online { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- hero ---------- */
.hero { padding: 30px 0 12px; }
.hero .kicker { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-deep); }
.hero h1 { font-family: var(--font-display); font-size: 30px; font-weight: 900; letter-spacing: -.03em; line-height: 1.08; margin-top: 8px; }
.hero h1 .hl { font-style: italic; color: var(--accent-deep); }
.hero .sub { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* ---------- auth bar ---------- */
#authbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 0 8px; }
#userBox { font-family: var(--font-body); font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
#userBox b { color: var(--ink); }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; padding: 12px 18px; font-family: var(--font-body); font-weight: 800; font-size: 14px; letter-spacing: .01em; transition: transform .05s, box-shadow .15s, background .15s, border-color .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(8, 165, 84, .35), 0 4px 14px rgba(11, 191, 100, .28); }
.btn-accent:hover { box-shadow: 0 2px 4px rgba(8, 165, 84, .4), 0 6px 20px rgba(11, 191, 100, .36); }
.btn-support { background: var(--surface); border: 1.5px solid var(--border-strong); color: var(--ink); }
.btn-support:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn-support .heart { color: var(--heart); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--border-strong); }
.btn-gold { background: linear-gradient(135deg, #ffd34d, var(--gold-bright)); color: #241a00; }
.btn-outline { background: transparent; border: 1.5px solid var(--border-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-deep); }

/* ---------- ranking ---------- */
.ranking { padding: 10px 0 48px; display: flex; flex-direction: column; gap: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; position: relative;
  box-shadow: var(--shadow);
}
.card.gold { border: 1.5px solid var(--gold-bright); box-shadow: 0 0 0 3px var(--gold-soft); }

.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rankbadge {
  font-family: var(--font-mono); font-size: 12px; font-weight: 800; line-height: 1;
  padding: 6px 10px; border-radius: 999px; display: inline-flex; align-items: center;
  background: var(--bg-2); color: var(--muted); border: 1px solid var(--border);
}
.rankbadge.r1 { background: var(--gold-bright); color: #241a00; border-color: transparent; }
.badge { font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; display: inline-flex; align-items: center; letter-spacing: .04em; }
.badge.trophy { background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(245, 180, 0, .35); }
.badge.n1 { background: var(--gold-bright); color: #241a00; }
.badge.n { background: var(--accent-soft); color: var(--accent-deep); }
.icon-net { width: 15px; height: 15px; color: var(--faint); flex-shrink: 0; }
.fuerza { margin-left: auto; text-align: right; }
.fuerza .val { font-family: var(--font-mono); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.fuerza .val.gold { color: var(--gold); }
.fuerza .lbl { font-family: var(--font-mono); display: block; font-size: 9px; color: var(--faint); text-transform: uppercase; letter-spacing: .12em; }

.card-title { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.card-desc { color: var(--muted); font-size: 13.5px; margin-top: 2px; }

.fbar { height: 5px; border-radius: 99px; background: var(--bg-2); margin-top: 14px; overflow: hidden; }
.fbar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .5s cubic-bezier(.4,0,.2,1); }
.card.gold .fbar > span { background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }

.card-actions { display: flex; gap: 8px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
.card-actions .btn { padding: 10px 14px; font-size: 13px; }
.cta-link { font-weight: 800; color: var(--accent-deep); font-size: 13.5px; display: inline-flex; align-items: center; gap: 3px; }
.gap-line { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); margin-top: 10px; letter-spacing: .02em; }
.gap-line b { color: var(--accent-deep); font-weight: 700; }
.card-divider { height: 1px; background: var(--border); margin: 14px 0 12px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-foot .url { font-family: var(--font-mono); color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; min-width: 0; }

/* ---------- tier menu (pulsear) ---------- */
.tier-menu { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tier-menu .btn { padding: 9px 13px; font-size: 12.5px; }
.tier-menu .tier-label { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(16, 18, 22, .5); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal.open { display: flex; }
.modal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 28px 24px; max-width: 360px; width: 100%; text-align: center;
  box-shadow: var(--shadow-lg);
}
.modal-card h3 { font-family: var(--font-display); font-size: 19px; font-weight: 900; }
.modal-card p { color: var(--muted); font-size: 13.5px; margin: 8px 0 20px; }
.modal-card #modalGoogleBtn { min-height: 44px; display: flex; justify-content: center; }
.modal-card .close { margin-top: 14px; color: var(--muted); font-size: 13px; }
.modal-card .exito-ico { font-size: 44px; margin-bottom: 10px; }

/* ---------- onboarding ---------- */
.steps { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 12px 0; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.step-dot.on { background: var(--accent); width: 22px; border-radius: 99px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.panel h2 { font-family: var(--font-display); font-size: 20px; font-weight: 900; letter-spacing: -.02em; }
.panel .sub { color: var(--muted); font-size: 14px; margin-top: 5px; margin-bottom: 20px; }

.grid-net { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.net-opt { border: 1.5px solid var(--border); border-radius: 14px; padding: 16px 8px; text-align: center; background: var(--surface); transition: all .12s; }
.net-opt:hover { border-color: var(--border-strong); }
.net-opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.net-opt .ic { font-size: 22px; line-height: 1; display: flex; justify-content: center; }
.net-opt .ic svg { width: 26px; height: 26px; fill: currentColor; }
.net-opt .nm { font-size: 13px; font-weight: 800; margin-top: 7px; color: var(--ink); }
.net-opt.sel .nm { color: var(--accent-deep); }
/* colores de marca por red */
.net-opt[data-net="instagram"] .ic { color: #E4405F; }
.net-opt[data-net="tiktok"] .ic { color: #111111; }
.net-opt[data-net="youtube"] .ic { color: #FF0000; }
.net-opt[data-net="linkedin"] .ic { color: #0A66C2; }
.net-opt[data-net="link"] .ic { color: var(--muted); }
.net-opt.wide { grid-column: 1 / -1; }

.field { margin-bottom: 16px; }
.field label { font-family: var(--font-mono); display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin-bottom: 7px; }
.field label .cnt { color: var(--muted); font-weight: 500; letter-spacing: 0; }
.field input, .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 13px 14px; font-size: 15px; font-family: var(--font-body); background: var(--surface); color: var(--ink);
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 70px; }

.preview { border: 1.5px solid var(--gold-bright); border-radius: var(--radius); padding: 16px; background: var(--gold-soft); }

.row-actions { display: flex; gap: 10px; margin-top: 22px; }
.row-actions .btn { flex: 1; }

/* ---------- reglas ---------- */
.rule-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px; }
.rule-card .ric { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.rule-card .ric.green { background: var(--accent-soft); }
.rule-card .ric.gray { background: var(--bg-2); }
.rule-card .ric.gold { background: var(--gold-soft); }
.rule-card .rt { font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.rule-card .rd { color: var(--muted); font-size: 13px; margin-top: 2px; }
.rule-card .rmono { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-top: 4px; }

.tier-card { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 14px; margin-bottom: 10px; position: relative; }
.tier-card.recom { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tier-card.ballena { border-color: var(--gold-bright); }
.tier-card .t-name { font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.tier-card .t-fuerza { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.tier-card .t-precio { font-family: var(--font-mono); font-weight: 800; font-size: 18px; }
.tier-card .recom-badge { position: absolute; top: -9px; left: 14px; background: var(--accent); color: #fff; font-family: var(--font-mono); font-size: 9px; font-weight: 800; letter-spacing: .08em; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 24px 0 44px; text-align: center; color: var(--muted); font-size: 12.5px; }
footer .tagline { font-family: var(--font-display); font-weight: 800; color: var(--ink); }
footer nav { margin: 10px 0; display: flex; justify-content: center; gap: 16px; }
footer nav a { color: var(--accent-deep); font-weight: 700; }
footer .disclaimer { max-width: 460px; margin: 12px auto 0; line-height: 1.5; font-size: 11.5px; color: var(--faint); }
footer .disclaimer a { color: var(--accent-deep); text-decoration: underline; }

/* ---------- historial ---------- */
.hist-item { display: flex; justify-content: space-between; align-items: center; }
.empty { color: var(--muted); text-align: center; padding: 34px 0; }

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #14161a; color: #f7f7f8; padding: 13px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 700; z-index: 99; opacity: 0; pointer-events: none; transition: opacity .2s;
  max-width: 90vw; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
#toast.show { opacity: 1; }

/* ---------- página de apoyo ---------- */
.btn-block { width: 100%; padding: 15px; font-size: 15px; margin-top: 16px; }

.monto-grid { display: flex; flex-direction: column; gap: 10px; }
.monto-opt {
  display: flex; align-items: center; justify-content: space-between;
  border: 1.5px solid var(--border); border-radius: 14px; padding: 14px 16px;
  background: var(--surface); text-align: left; transition: all .12s; position: relative;
}
.monto-opt:hover { border-color: var(--border-strong); }
.monto-opt.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.monto-opt .m-monto { font-family: var(--font-mono); font-weight: 800; font-size: 18px; color: var(--ink); }
.monto-opt.sel .m-monto { color: var(--accent-deep); }
.monto-opt .m-fuerza { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.monto-opt.recom .recom-badge { position: absolute; top: -9px; left: 14px; background: var(--accent); color: #fff; font-family: var(--font-mono); font-size: 9px; font-weight: 800; letter-spacing: .08em; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; }
.monto-opt .recom-badge { display: none; }
.monto-opt.recom .recom-badge { display: block; }

.proyeccion {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2); border-radius: 14px; padding: 14px;
}
.pr-col { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pr-lbl { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.pr-val { font-family: var(--font-mono); font-weight: 800; font-size: 15px; color: var(--ink); margin-top: 3px; white-space: nowrap; }
.pr-arrow { color: var(--faint); font-size: 18px; }
.pr-badge {
  font-family: var(--font-mono); font-size: 12px; font-weight: 800; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; white-space: nowrap;
}
.pr-msg { color: var(--muted); font-size: 13px; margin-top: 10px; }
.pr-disclaimer { color: var(--faint); font-size: 11.5px; text-align: center; margin-top: 12px; }
.pr-disclaimer a { color: var(--accent-deep); text-decoration: underline; }

/* ---------- términos ---------- */
.term h2 { font-family: var(--font-display); font-weight: 800; font-size: 16px; margin-bottom: 8px; }
.term p { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
.term p:last-child { margin-bottom: 0; }
.term ul { margin: 0 0 10px; padding-left: 18px; }
.term li { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 6px; }
.term b { color: var(--ink); font-weight: 700; }
