/* ============================================================
   SocialHub — Hoja de Estilos (Full visual match with juegos.lyconex.com)
   ============================================================ */

/* ── TOKENS ── */
:root {
  --bg:       #0a0b0f;
  --bg2:      #11131a;
  --bg3:      #181b26;
  --surface:  #1e2232;
  --border:   #2a2f45;
  --glow:     #5b6af0;
  --glow2:    #a259ff;
  --accent:   #00e5c3;
  --warn:     #ff6b6b;
  --text:     #e8eaf6;
  --muted:    #8890b0;
  --card-r:   16px;
  --hdr-h:    68px;
  --trans:    .22s cubic-bezier(.4,0,.2,1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; background: none; border: none; outline: none; }
img { max-width: 100%; display: block; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── FLOATING HEADER ── */
#header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--hdr-h);
  display: flex; align-items: center;
  padding: 0 28px;
  background: rgba(10,11,15,.72);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--trans), background var(--trans);
}
#header.scrolled { border-bottom-color: var(--border); background: rgba(10,11,15,.92); }

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem; font-weight: 700;
  display: flex; align-items: center; gap: 9px;
  flex-shrink: 0;
}
.logo-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--glow), var(--glow2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #fff;
}
.logo span, .logo-word { background: linear-gradient(90deg, var(--glow), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

nav, .main-nav { display: flex; align-items: center; gap: 4px; margin-left: 32px; flex: 1; }
nav a, .main-nav a {
  padding: 6px 14px; border-radius: 8px;
  font-size: .88rem; font-weight: 500; color: var(--muted);
  transition: color var(--trans), background var(--trans);
}
nav a:hover, nav a.active, .main-nav a:hover, .main-nav a.active { color: var(--text); background: var(--surface); }

.hdr-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

#searchBar {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 14px;
  width: 240px; transition: width var(--trans), border-color var(--trans);
  position: relative;
}
#searchBar:focus-within { border-color: var(--glow); width: 290px; }
#searchBar input { background: none; font-size: .875rem; flex: 1; border: none; outline: none; }
#searchBar input::placeholder { color: var(--muted); }
#searchBar svg { color: var(--muted); flex-shrink: 0; }
#searchClear { display: none; color: var(--muted); flex-shrink: 0; padding: 2px; border-radius: 5px; transition: color var(--trans); }
#searchClear:hover { color: var(--warn); }
#searchClear.show { display: flex; }

#searchSuggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  z-index: 1200; display: none;
}
#searchSuggest.open { display: block; }
.sugg-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; font-size: .82rem; color: var(--text);
  transition: background var(--trans); cursor: pointer;
}
.sugg-item:hover, .sugg-item.hl { background: var(--surface); }
.sugg-item .sugg-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.sugg-item .sugg-meta { margin-left: auto; font-size: .72rem; color: var(--muted); }
.sugg-empty { padding: 16px 14px; font-size: .8rem; color: var(--muted); text-align: center; }
.sugg-foot { padding: 8px 14px; font-size: .72rem; color: var(--muted); border-top: 1px solid var(--border); display: flex; justify-content: space-between; }

.btn-pub {
  padding: 8px 18px; border-radius: 10px; font-size: .875rem; font-weight: 600;
  background: linear-gradient(135deg, var(--glow), var(--glow2));
  color: #fff;
  box-shadow: 0 0 18px rgba(91,106,240,.35);
  transition: opacity var(--trans), transform var(--trans);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-pub:hover { opacity: .88; transform: translateY(-1px); }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); position: relative; transition: border-color var(--trans), color var(--trans);
}
.icon-btn:hover { border-color: var(--glow); color: var(--text); }
.badge-dot {
  position: absolute; top: -5px; right: -5px; background: var(--warn); color: #fff;
  font-size: .62rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px;
  display: grid; place-items: center; padding: 0 4px;
}
.btn-quiet {
  padding: 8px 16px; border-radius: 10px; font-size: .875rem; font-weight: 600;
  color: var(--muted); border: 1px solid var(--border); transition: all var(--trans);
}
.btn-quiet:hover { color: var(--text); border-color: var(--glow); }

/* Menú de usuario */
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; border: 1px solid var(--border); display: grid; place-items: center; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback { font-weight: 700; font-size: .95rem; background: var(--surface); width: 100%; height: 100%; display: grid; place-items: center; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 250px; background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 14px 40px rgba(0,0,0,.45); z-index: 1050; }
.menu-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.menu-head span { font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.menu-pop a { display: flex; justify-content: space-between; padding: 10px 16px; font-size: .86rem; transition: background var(--trans); }
.menu-pop a:hover { background: var(--surface); }
.menu-meta { color: var(--accent); font-size: .78rem; }
.menu-staff { color: var(--accent); }
.menu-out { border-top: 1px solid var(--border); color: var(--warn); }

/* Flash alerts */
.flash { margin: 14px auto 0; max-width: 1200px; padding: 12px 18px; border-radius: 12px; font-size: .88rem; border: 1px solid var(--border); background: var(--bg3); }
.flash-ok { border-color: #3ddc97; color: #3ddc97; }
.flash-error { border-color: var(--warn); color: var(--warn); }
.flash-info { border-color: var(--glow); }

/* ── HERO ── */
#hero {
  margin-top: var(--hdr-h);
  padding: 90px 28px 70px;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(91,106,240,.18) 0%, transparent 70%);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .3;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 80%);
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(91,106,240,.15); border: 1px solid rgba(91,106,240,.3);
  border-radius: 50px; padding: 5px 14px; font-size: .78rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--glow);
  margin-bottom: 22px;
}
h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700; line-height: 1.1;
  max-width: 800px; margin: 0 auto 20px;
}
h1 em { font-style: normal; background: linear-gradient(90deg, var(--glow), var(--glow2), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub {
  font-size: 1.08rem; color: var(--muted); max-width: 540px; margin: 0 auto 36px; line-height: 1.7;
}
.hero-ctas { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn-main {
  padding: 13px 28px; border-radius: 12px; font-size: .95rem; font-weight: 600;
  background: linear-gradient(135deg, var(--glow), var(--glow2));
  color: #fff; box-shadow: 0 0 28px rgba(91,106,240,.4);
  transition: transform var(--trans), box-shadow var(--trans);
  display: inline-block;
}
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 0 42px rgba(91,106,240,.55); }
.btn-ghost {
  padding: 13px 28px; border-radius: 12px; font-size: .95rem; font-weight: 600;
  border: 1px solid var(--border); color: var(--muted);
  transition: border-color var(--trans), color var(--trans), background var(--trans);
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--glow); color: var(--text); background: rgba(91,106,240,.08); }

.hero-stats {
  display: flex; justify-content: center; gap: 40px; margin-top: 52px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.9rem; font-weight: 700;
  background: linear-gradient(90deg, var(--text), var(--muted)); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { font-size: .78rem; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .06em; }

/* ── FILTERS BAR ── */
#filters {
  padding: 18px 28px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  position: sticky; top: var(--hdr-h); z-index: 90;
}
.filter-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 15px; border-radius: 50px; font-size: .83rem; font-weight: 500;
  border: 1px solid var(--border); color: var(--muted);
  transition: all var(--trans);
}
.filter-btn:hover { border-color: var(--glow); color: var(--text); }
.filter-btn.active { background: var(--glow); border-color: var(--glow); color: #fff; box-shadow: 0 0 14px rgba(91,106,240,.4); }
.filter-sep { width: 1px; height: 26px; background: var(--border); margin: 0 6px; }

.sort-select {
  margin-left: auto; padding: 7px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: .83rem; color: var(--muted); cursor: pointer;
  transition: border-color var(--trans);
}
.sort-select:hover { border-color: var(--glow); }

/* ── MAIN LAYOUT ── */
#main { display: flex; min-height: 80vh; }

/* ── SIDEBAR ── */
#sidebar {
  width: 260px; flex-shrink: 0;
  padding: 24px 18px;
  border-right: 1px solid var(--border);
  position: sticky; top: calc(var(--hdr-h) + 60px);
  height: fit-content; max-height: calc(100vh - var(--hdr-h) - 60px);
  overflow-y: auto;
}
.sidebar-section { margin-bottom: 28px; }
.sidebar-title {
  font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); margin-bottom: 12px;
}
.network-list { display: flex; flex-direction: column; gap: 4px; }
.net-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 10px; cursor: pointer;
  transition: background var(--trans); font-size: .875rem;
  color: var(--text);
}
.net-item:hover { background: var(--surface); }
.net-item.active { background: rgba(91,106,240,.15); color: var(--glow); }
.net-dot { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.net-count { margin-left: auto; font-size: .75rem; color: var(--muted); font-family: 'JetBrains Mono', monospace; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 4px 10px; border-radius: 6px; font-size: .75rem; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  cursor: pointer; transition: all var(--trans);
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* ── CARDS GRID ── */
#content { flex: 1; padding: 28px; }

#resultsInfo {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.results-count { font-size: .85rem; color: var(--muted); }
.view-toggle { display: flex; gap: 4px; }
.view-btn { padding: 6px 9px; border-radius: 8px; border: 1px solid var(--border); color: var(--muted); transition: all var(--trans); }
.view-btn.active { background: var(--surface); color: var(--text); border-color: var(--glow); }

#grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
#grid.list { grid-template-columns: 1fr; }

.card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--card-r);
  overflow: hidden;
  transition: transform var(--trans), border-color var(--trans), box-shadow var(--trans);
  cursor: pointer;
  position: relative;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--card-r);
  background: linear-gradient(135deg, rgba(91,106,240,.06), rgba(162,89,255,.06));
  opacity: 0; transition: opacity var(--trans);
}
.card:hover { transform: translateY(-3px); border-color: var(--glow); box-shadow: 0 8px 32px rgba(91,106,240,.2); }
.card:hover::before { opacity: 1; }

.card-banner {
  height: 68px;
  background: linear-gradient(135deg, #1a1d2e, #242840);
  position: relative; overflow: hidden;
}
.card-banner-bg {
  position: absolute; inset: 0;
  opacity: .55; background-size: cover; background-position: center;
}
.card-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 3px 9px; border-radius: 5px; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}
.badge-group { background: rgba(91,106,240,.85); color: #fff; }
.badge-canal { background: rgba(255,107,107,.85); color: #fff; }
.badge-pagina { background: rgba(0,229,195,.85); color: #000; }
.badge-comunidad { background: rgba(162,89,255,.85); color: #fff; }
.badge-servidor { background: rgba(88,101,242,.85); color: #fff; }

.card-body { padding: 16px; }
.card-meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.card-avatar {
  width: 42px; height: 42px; border-radius: 12px;
  font-size: 1.3rem; display: flex; align-items: center; justify-content: center;
  background: var(--surface); flex-shrink: 0;
  border: 2px solid var(--border);
}
.card-info { flex: 1; min-width: 0; }
.card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: .95rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-net {
  display: flex; align-items: center; gap: 4px;
  font-size: .75rem; color: var(--muted); margin-top: 2px;
}
.card-net-dot { width: 14px; height: 14px; border-radius: 4px; font-size: .6rem; display: flex; align-items: center; justify-content: center; }

.card-desc {
  font-size: .82rem; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 14px;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.card-tag {
  padding: 3px 8px; border-radius: 5px; font-size: .72rem;
  background: var(--surface); color: var(--muted);
  cursor: pointer; transition: all var(--trans);
}
.card-tag:hover { border-color: var(--accent); color: var(--accent); }

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.card-stats { display: flex; gap: 14px; }
.card-stat { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.card-stat strong { color: var(--text); font-family: 'JetBrains Mono', monospace; }

.card-actions { display: flex; align-items: center; gap: 6px; }
.btn-fav {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: .85rem;
  color: var(--muted); transition: all var(--trans); flex-shrink: 0;
}
.btn-fav:hover { border-color: var(--warn); color: var(--warn); }
.btn-fav.saved { border-color: var(--warn); color: var(--warn); background: rgba(255,107,107,.1); }

.btn-join {
  padding: 6px 16px; border-radius: 8px; font-size: .8rem; font-weight: 600;
  background: linear-gradient(135deg, var(--glow), var(--glow2));
  color: #fff;
  transition: opacity var(--trans), transform var(--trans);
  display: inline-block;
}
.btn-join:hover { opacity: .85; transform: scale(1.03); }

.card-verified {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: .7rem; color: var(--accent);
}

/* ── MODALS & OVERLAYS ── */
#modal-overlay, #biolink-overlay, #short-overlay, #info-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.75); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
#modal-overlay.open, #biolink-overlay.open, #short-overlay.open, #info-overlay.open {
  display: flex !important;
}

#modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp .25s cubic-bezier(.4,0,.2,1);
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-hdr {
  padding: 22px 26px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem; font-weight: 700; }
.modal-close {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--muted);
  transition: background var(--trans), color var(--trans);
}
.modal-close:hover { background: var(--border); color: var(--text); }

.modal-body { padding: 24px 26px; }
.form-row { margin-bottom: 18px; }
.form-label { font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 7px; display: block; text-transform: uppercase; letter-spacing: .06em; }
.form-input {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: .88rem; color: var(--text);
  transition: border-color var(--trans);
}
.form-input:focus { border-color: var(--glow); }
.form-input::placeholder { color: var(--muted); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-select {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: .88rem; color: var(--text); cursor: pointer;
  transition: border-color var(--trans);
}
.form-select:focus { border-color: var(--glow); }
.form-textarea {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: .88rem; color: var(--text); resize: vertical; min-height: 90px;
  transition: border-color var(--trans);
}
.form-textarea:focus { border-color: var(--glow); }

.modal-footer { padding: 16px 26px 22px; display: flex; justify-content: flex-end; gap: 10px; }
.btn-cancel { padding: 10px 20px; border-radius: 10px; font-size: .875rem; font-weight: 600; border: 1px solid var(--border); color: var(--muted); transition: all var(--trans); }
.btn-cancel:hover { border-color: var(--warn); color: var(--warn); }
.btn-submit { padding: 10px 24px; border-radius: 10px; font-size: .875rem; font-weight: 600; background: linear-gradient(135deg, var(--glow), var(--glow2)); color: #fff; box-shadow: 0 0 20px rgba(91,106,240,.35); transition: opacity var(--trans), transform var(--trans); display: inline-block; }
.btn-submit:hover { opacity: .88; transform: translateY(-1px); }

/* ── TOAST ── */
#toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(80px);
  z-index: 3000;
  background: var(--surface); border: 1px solid var(--glow);
  border-radius: 12px; padding: 12px 22px;
  font-size: .875rem; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s;
  opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── FOOTER ── */
#footer {
  margin-top: 80px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 28px 28px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px;
}
.footer-brand p { font-size: .875rem; color: var(--muted); line-height: 1.7; margin-top: 12px; max-width: 280px; }
.footer-col h4 { font-family: 'Space Grotesk', sans-serif; font-size: .85rem; font-weight: 600; margin-bottom: 14px; color: var(--text); }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: .83rem; color: var(--muted); transition: color var(--trans); }
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px; border-top: 1px solid var(--border);
  flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: .78rem; color: var(--muted); }
.footer-social { display: flex; gap: 10px; }
.soc-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .85rem;
  transition: all var(--trans);
}
.soc-btn:hover { border-color: var(--glow); color: var(--text); background: var(--surface); }

/* ── FLOATING ACTIONS ── */
#fabStack {
  position: fixed; bottom: 28px; right: 28px; z-index: 500;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
#toTop {
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text); font-size: 1.1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  transition: transform var(--trans), opacity var(--trans), border-color var(--trans), background var(--trans);
  opacity: 0; pointer-events: none; transform: translateY(10px) scale(.9);
}
#toTop.show { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
#toTop:hover { border-color: var(--glow); background: var(--bg3); transform: translateY(-2px); }

#fab {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--glow), var(--glow2));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 28px rgba(91,106,240,.5);
  font-size: 1.4rem; color: #fff;
  transition: transform var(--trans), box-shadow var(--trans);
}
#fab:hover { transform: scale(1.1) rotate(12deg); box-shadow: 0 10px 36px rgba(91,106,240,.65); }

/* ── LOADING SKELETON ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--bg3) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── HAMBURGER & MOBILE MENU ── */
.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--trans), background var(--trans);
}
.mobile-menu-btn:hover {
  border-color: var(--glow);
}

.hamburger-icon {
  width: 18px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.hamburger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}

.mobile-menu-btn.open .hamburger-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-menu-btn.open .hamburger-icon span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.open .hamburger-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: var(--hdr-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 11, 15, 0.96);
  backdrop-filter: blur(20px) saturate(180%);
  z-index: 999;
  display: none;
  overflow-y: auto;
  padding: 16px 20px 48px;
  border-bottom: 1px solid var(--border);
  animation: slideDown .25s cubic-bezier(.4, 0, .2, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-inner {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 10px;
  transition: background var(--trans), color var(--trans);
}

.mobile-nav a .nav-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}

.mobile-nav a:hover, .mobile-nav a:active {
  background: var(--surface);
  color: var(--glow);
}

.mobile-pub-btn {
  width: 100%;
  padding: 14px;
  font-size: .95rem;
  font-weight: 600;
  justify-content: center;
  border-radius: 12px;
}

.mobile-user-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
}

.mobile-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.mobile-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.mobile-user-info .avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mobile-user-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-user-details strong {
  font-size: .92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-user-details span {
  font-size: .78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-user-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 12px;
}

.mobile-user-links a {
  padding: 9px 12px;
  font-size: .83rem;
  color: var(--muted);
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
  transition: all var(--trans);
}

.mobile-user-links a:hover {
  color: var(--text);
  background: var(--border);
}

.mobile-user-links a.menu-out {
  color: var(--warn);
}

.mobile-auth-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-login-mobile {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.btn-register-mobile {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--glow), var(--glow2));
}

.mobile-footer-row {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.mobile-lang-btn {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

/* ── RESPONSIVE BREAKPOINTS ── */
@media (max-width: 1024px) {
  #sidebar { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav { display: none !important; }
  .mobile-menu-btn { display: flex; }
}

@media (max-width: 600px) {
  #header { padding: 0 12px; }
  .logo span { display: none; }
  .logo { gap: 0; }
  #searchBar { width: 125px; padding: 6px 10px; }
  #searchBar:focus-within { width: 165px; }
  .hdr-right { gap: 6px; }
  .hdr-right > .btn-pub { display: none; }
  .hdr-right > a[title="Switch Language"] { display: none; }
  .hdr-right > .user-menu { display: none; }
  h1 { font-size: 1.75rem; }
  .hero-stats { gap: 14px; flex-wrap: wrap; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  #grid, #communityGrid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; width: 100%; max-width: 320px; margin-left: auto; margin-right: auto; }
  .hero-ctas button { width: 100%; }
}

/* ── NETWORK COLORS ── */
.net-facebook { background: rgba(24,119,242,.2); }
.net-instagram { background: linear-gradient(135deg, rgba(255,120,67,.2), rgba(193,53,132,.2)); }
.net-telegram { background: rgba(0,136,204,.2); }
.net-whatsapp { background: rgba(37,211,102,.2); }
.net-tiktok { background: rgba(0,0,0,.3); }
.net-youtube { background: rgba(255,0,0,.2); }
.net-twitter { background: rgba(29,161,242,.2); }
.net-discord { background: rgba(88,101,242,.2); }
.net-reddit { background: rgba(255,69,0,.2); }
.net-linkedin { background: rgba(0,119,181,.2); }
.net-twitch { background: rgba(145,70,255,.2); }
.net-pinterest { background: rgba(230,0,35,.2); }

/* ── LIGHT MODE STYLES ── */
body.light {
  --bg:      #f0f2f8;
  --bg2:     #e4e7f2;
  --bg3:     #dce0ef;
  --surface: #cdd2e8;
  --border:  #b8bedd;
  --text:    #1a1d2e;
  --muted:   #5a6080;
}
body.light #header { background: rgba(240,242,248,.82); }
body.light #header.scrolled { background: rgba(240,242,248,.96); }
body.light .hero-grid { opacity: .18; }
body.light .card { background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
body.light #filters { background: var(--bg2); }
body.light #sidebar { background: var(--bg); }
body.light #modal, body.light #info-overlay > div, body.light #biolink-modal, body.light #short-overlay > div { background: var(--bg2); }
body.light .form-input, body.light .form-select, body.light .form-textarea { background: #fff; }
body.light #footer { background: var(--bg2); }

/* ── INNER PAGES, DASHBOARD & FORM UTILITIES ── */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

.page-lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
}

.panel {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--card-r);
  padding: 24px;
  margin-bottom: 24px;
}

.panel h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.empty {
  text-align: center;
  padding: 50px 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--card-r);
}

.empty-emoji {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* ── SIDE LINKS (Categorías / Redes grid) ── */
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: .88rem;
  font-weight: 500;
  transition: all var(--trans);
}
.side-link:hover {
  border-color: var(--glow);
  transform: translateY(-1px);
}
.side-emoji {
  font-size: 1.1rem;
}
.side-count {
  margin-left: auto;
  font-size: .75rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ── DASHBOARD LAYOUT ── */
.dash {
  max-width: 1280px;
  margin: 0 auto;
  padding: 100px 24px 60px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
}
@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  height: fit-content;
}
.dash-nav a {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--muted);
  transition: all var(--trans);
}
.dash-nav a:hover, .dash-nav a.is-active, .dash-nav a.active {
  color: var(--text);
  background: var(--surface);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpi b {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}
.kpi span {
  font-size: .78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── TABLES ── */
.table-scroll {
  overflow-x: auto;
  margin-top: 12px;
}

table.data, table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: .88rem;
}

table.data th, table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}

table.data td, table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

table.data tr:hover td {
  background: rgba(255,255,255,.02);
}

/* ── AUTH PAGES ── */
.auth-wrap {
  min-height: calc(100vh - var(--hdr-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 36px 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
}

.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 6px;
  text-align: center;
}

.auth-sub {
  font-size: .88rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 24px;
}

.auth-alt {
  font-size: .85rem;
  color: var(--muted);
  text-align: center;
  margin-top: 20px;
}

.auth-alt a {
  color: var(--glow);
  font-weight: 600;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  background: #fff;
  color: #333;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 16px;
  transition: opacity var(--trans);
}
.google-btn:hover { opacity: .9; }

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  font-size: .75rem;
  color: var(--muted);
  margin: 18px 0;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.divider::before { margin-right: 12px; }
.divider::after { margin-left: 12px; }

/* ── FORM ELEMENTS ── */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 7px;
}

.input, .select, .textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-size: .88rem;
  color: var(--text);
  transition: border-color var(--trans);
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--glow);
  outline: none;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--muted);
  cursor: pointer;
}

.form-error {
  background: rgba(255,107,107,.12);
  border: 1px solid var(--warn);
  color: var(--warn);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: .85rem;
  margin-bottom: 18px;
}

/* ── STATUS BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: .74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-ok, .badge-approved { background: rgba(61,220,151,.15); color: #3ddc97; }
.badge-pending { background: rgba(255,165,0,.15); color: #ffa500; }
.badge-rejected, .badge-warn { background: rgba(255,107,107,.15); color: var(--warn); }

/* ═══════════════ LIGHT MODE STYLES ═══════════════ */
html.light, body.light {
  --bg:       #f0f2f8;
  --bg2:      #e4e7f2;
  --bg3:      #dce0ef;
  --surface:  #cdd2e8;
  --border:   #b8bedd;
  --text:     #1a1d2e;
  --muted:    #5a6080;
}

html.light, body.light {
  background: var(--bg);
  color: var(--text);
}

html.light #header, body.light #header {
  background: rgba(240,242,248,.82);
  border-bottom-color: var(--border);
}
html.light #header.scrolled, body.light #header.scrolled {
  background: rgba(240,242,248,.96);
}

html.light .hero-grid, body.light .hero-grid {
  opacity: .18;
}

html.light .card, body.light .card {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border-color: var(--border);
}
html.light .card:hover, body.light .card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

html.light #filters, body.light #filters {
  background: var(--bg2);
}
html.light .filter-btn, body.light .filter-btn {
  background: var(--surface);
  color: var(--muted);
}
html.light .filter-btn:hover, body.light .filter-btn:hover {
  color: var(--text);
}
html.light .filter-btn.active, body.light .filter-btn.active {
  background: #ffffff;
  color: var(--glow);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

html.light #sidebar, body.light #sidebar {
  background: var(--bg);
}
html.light .net-item, body.light .net-item {
  color: var(--muted);
}
html.light .net-item:hover, body.light .net-item:hover,
html.light .net-item.active, body.light .net-item.active {
  background: var(--surface);
  color: var(--text);
}

html.light #modal, body.light #modal,
html.light #biolink-modal, body.light #biolink-modal,
html.light #info-overlay > div, body.light #info-overlay > div,
html.light #short-overlay > div, body.light #short-overlay > div {
  background: var(--bg2);
  color: var(--text);
  border-color: var(--border);
}

html.light .form-input, body.light .form-input,
html.light .form-select, body.light .form-select,
html.light .form-textarea, body.light .form-textarea,
html.light .input, body.light .input,
html.light .select, body.light .select {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border);
}

html.light #searchBar, body.light #searchBar {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}
html.light #searchInput, body.light #searchInput {
  color: var(--text) !important;
}
html.light #searchSuggest, body.light #searchSuggest {
  background: #ffffff;
  border-color: var(--border);
}
html.light .sugg-item, body.light .sugg-item {
  color: var(--text);
}
html.light .sugg-item:hover, body.light .sugg-item:hover {
  background: var(--bg2);
}

html.light #footer, body.light #footer {
  background: var(--bg2);
  border-top-color: var(--border);
}

html.light .panel, body.light .panel {
  background: var(--bg2);
  border-color: var(--border);
}
html.light .dash-nav, body.light .dash-nav {
  background: var(--bg2);
  border-color: var(--border);
}
html.light .dash-nav a.active, body.light .dash-nav a.active {
  background: #ffffff;
  color: var(--text);
}
html.light .kpi, body.light .kpi {
  background: var(--bg2);
  border-color: var(--border);
}
html.light .auth-card, body.light .auth-card {
  background: var(--bg2);
  border-color: var(--border);
}
html.light table.data, body.light table.data {
  background: #ffffff;
}
html.light table.data th, body.light table.data th {
  background: var(--bg3);
  color: var(--text);
}
html.light table.data td, body.light table.data td {
  border-bottom-color: var(--border);
  color: var(--text);
}
html.light .tag, body.light .tag {
  background: var(--surface);
  border-color: var(--border);
  color: var(--muted);
}
html.light .tag:hover, body.light .tag:hover {
  color: var(--text);
}
html.light .chip, body.light .chip {
  background: var(--surface);
  border-color: var(--border);
  color: var(--muted);
}
html.light .chip.is-active, body.light .chip.is-active {
  background: #ffffff;
  color: var(--glow);
}
html.light .product, body.light .product {
  background: #ffffff;
  border-color: var(--border);
}
html.light .menu-pop, body.light .menu-pop {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text);
}
html.light .menu-pop a:hover, body.light .menu-pop a:hover {
  background: var(--bg2);
}

html.light .mobile-menu, body.light .mobile-menu {
  background: rgba(240, 242, 248, 0.96);
  border-bottom-color: var(--border);
}
html.light .mobile-nav, body.light .mobile-nav {
  background: var(--bg2);
  border-color: var(--border);
}
html.light .mobile-nav a, body.light .mobile-nav a {
  color: var(--text);
}
html.light .mobile-nav a:hover, body.light .mobile-nav a:active {
  background: #ffffff;
}
html.light .mobile-user-section, body.light .mobile-user-section {
  background: var(--bg2);
  border-color: var(--border);
}


