/* ============================================================
   BROKERGY Linktree — sistema de diseño
   Colores corporativos tomados de app.brokergy
   ============================================================ */
:root {
  --bkg-deep: #08090c;
  --bkg-base: #0c0e12;
  --bkg-surface: #13151a;
  --bkg-elevated: #1a1c22;
  --bkg-hover: #22242b;
  --brand: #ffa000;
  --brand-700: #ff6d00;
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.55);
  --text-faint: rgba(255, 255, 255, 0.30);
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

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

html, body {
  background: var(--bkg-base);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Halo de fondo con los colores de marca (detrás de la constelación) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(700px circle at 20% -5%, rgba(255, 160, 0, 0.10), transparent 55%),
    radial-gradient(650px circle at 90% 105%, rgba(255, 109, 0, 0.08), transparent 50%);
}

/* Fondo animado de constelaciones (canvas inyectado por network-bg.js) */
#network-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  filter: contrast(120%) brightness(110%);
}
.bg-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 150px rgba(8, 9, 12, 0.9);
}
.bg-fade {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(12, 14, 18, 0.4), transparent 50%, rgba(12, 14, 18, 0.4));
}

/* ------------------------------------------------------------
   Visor (linktree público)
   ------------------------------------------------------------ */
.page {
  position: relative;
  z-index: 10;
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 22px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bkg-surface);
  border: 2px solid var(--border);
  box-shadow: 0 0 0 4px rgba(255, 160, 0, 0.08), 0 16px 40px rgba(0, 0, 0, 0.45);
  animation: pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.name {
  margin-top: 18px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.headline {
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand);
}

.subtitle {
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-dim);
  max-width: 440px;
}

/* Iconos sociales */
.socials {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.social {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bkg-surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all 0.18s ease;
}
.social:hover {
  color: var(--brand);
  border-color: rgba(255, 160, 0, 0.4);
  transform: translateY(-2px);
}
.social svg { width: 20px; height: 20px; }

/* Lista de enlaces */
.links {
  width: 100%;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bkg-surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  text-align: left;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.link:hover { transform: translateY(-2px); background: var(--bkg-elevated); border-color: rgba(255, 255, 255, 0.16); }
.link:active { transform: translateY(0) scale(0.99); }

.link .icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--brand);
}
.link .icon svg { width: 22px; height: 22px; }

.link .body { flex: 1; min-width: 0; }
.link .label { font-weight: 700; font-size: 0.98rem; }
.link .sublabel { font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; }
.link .chev { color: var(--text-faint); flex: 0 0 auto; }
.link .chev svg { width: 18px; height: 18px; }

/* Variantes de estilo */
.link.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  border-color: transparent;
  color: #1a1200;
  box-shadow: 0 10px 30px rgba(255, 140, 0, 0.25);
}
.link.primary .icon,
.link.primary .sublabel,
.link.primary .chev { color: rgba(26, 18, 0, 0.72); }
.link.primary .sublabel { color: rgba(26, 18, 0, 0.65); }
.link.primary:hover { box-shadow: 0 14px 38px rgba(255, 140, 0, 0.35); }

.link.outline {
  background: transparent;
  border: 1px solid rgba(255, 160, 0, 0.45);
}
.link.outline .label { color: var(--brand); }

/* Pie */
.footer {
  position: relative;
  z-index: 10;
  margin-top: 40px;
  text-align: center;
  padding-bottom: 30px;
}
.wordmark {
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}
.wordmark .gy { color: var(--brand); }
.footer .tiny {
  margin-top: 6px;
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 700;
}

/* Selector de perfiles (cabecera flotante) */
.switcher {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 16px 0 0;
}
.switcher a {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: all 0.16s ease;
}
.switcher a:hover { color: var(--text); }
.switcher a.active { color: var(--brand); border-color: rgba(255, 160, 0, 0.4); background: rgba(255, 160, 0, 0.06); }

@keyframes pop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bkg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s ease both;
}
