:root{
  --bg:#060a14;
  --text:#eaf0ff;
  --muted:#aab6dd;

  --panelTop: rgba(18,26,55,.80);
  --panelBottom: rgba(12,18,40,.62);
  --line: rgba(255,255,255,.12);

  --shadowStrong: 0 28px 90px rgba(0,0,0,.60);
}

*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; }
body{
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: radial-gradient(1200px 900px at 20% 30%, #0e1840, var(--bg) 60%);
  overflow:hidden;
}

/* Stage */
.stage{
  position:relative;
  width:100vw;
  height:100vh;
  overflow:hidden;
}

/* Star overlay (cheap, looks good) */
.stage::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.55) 50%, transparent 55%),
    radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,.45) 50%, transparent 55%),
    radial-gradient(1px 1px at 60% 40%, rgba(255,255,255,.35) 50%, transparent 55%),
    radial-gradient(1px 1px at 80% 70%, rgba(255,255,255,.50) 50%, transparent 55%),
    radial-gradient(1px 1px at 90% 25%, rgba(255,255,255,.35) 50%, transparent 55%),
    radial-gradient(1px 1px at 15% 55%, rgba(255,255,255,.25) 50%, transparent 55%);
  opacity:.70;
  mix-blend-mode: screen;
  z-index: 0;
}

/* WebGL canvas */
.webgl{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  z-index: 1;
}

/* Left panel � chunky / lower / wider like Helium */
.sidebarOverlay{
  position:absolute;
  left:48px;
  top:30%;
  width:460px;
  max-width:calc(100vw - 96px);
  pointer-events:none;
  z-index:20;
  transition: transform 260ms ease, opacity 260ms ease;
}

.sidebarOverlay__inner{
  pointer-events:auto;
  padding:22px 22px 20px;
  border-radius:22px;
  background: linear-gradient(180deg, var(--panelTop), var(--panelBottom));
  border:1px solid var(--line);
  box-shadow: var(--shadowStrong);
  backdrop-filter: blur(16px);
  max-height:calc(100vh - 128px);
  overflow:auto;
}

.sidebarOverlay--hidden{
  transform: translateX(-120%);
  opacity: 0;
}

/* Typography */
.brand__title{ font-weight:900; font-size:44px; letter-spacing:.2px; }
.brand__subtitle{ margin-top:10px; color:var(--muted); font-size:14px; line-height:1.4; }

.card{
  margin-top:18px;
  padding:16px;
  border-radius:16px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 35px rgba(0,0,0,.35);
}

.card__title{ font-weight:700; margin-bottom:12px; }

.stats__row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 0;
  border-bottom:1px dashed rgba(255,255,255,.08);
}
.stats__row:last-child{ border-bottom:none; }
.stats span{ color:var(--muted); }

.hint{
  margin-top:12px;
  font-size:12px;
  color:var(--muted);
  line-height:1.4;
}

@media (max-width:900px){
  .sidebarOverlay{
    left:18px;
    top:18px;
    width:min(420px, calc(100vw - 36px));
  }
  .sidebarOverlay__inner{
    max-height:calc(100vh - 36px);
    border-radius:20px;
  }
  .brand__title{ font-size:36px; }
}


/* ---------------------------------------
   Profile card (presence info)
---------------------------------------- */
.card--profile{
  margin-top: 12px;
}
.profileRow{
  display:flex;
  gap:12px;
  align-items:center;
  margin-top:10px;
}
.avatarCircle{
  width:44px;
  height:44px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background: rgba(96, 114, 255, .14);
  border: 1px solid rgba(96, 114, 255, .22);
  color: var(--text);
  font-weight: 700;
  letter-spacing: .5px;
}
.profileText{
  min-width:0;
}
.profileName{
  font-weight:700;
  font-size: 14px;
  line-height: 1.2;
}
.profileMessage{
  margin-top:4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.25;
  overflow:hidden;
  text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.profileMeta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:10px;
  gap:10px;
}
.tagPill{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(96, 114, 255, .14);
  border: 1px solid rgba(96, 114, 255, .22);
  font-size:12px;
  color: var(--text);
  text-transform: capitalize;
}
.btnGhost{
  appearance:none;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 10px;
  cursor:pointer;
}
.btnGhost:hover{
  background: rgba(255,255,255,.10);
}


/* Sliding profile panel (left) */
.profilePanel{
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: min(420px, 92vw);
  transform: translateX(-110%);
  transition: transform 260ms ease;
  z-index: 14000;
  pointer-events: none;
}
.profilePanel.is-open{
  transform: translateX(0);
  pointer-events: auto;
}


/* Collapsed: hide panel completely; show only the tab */
.profilePanel.is-open.is-collapsed{
  transform: translateX(-110%);
  pointer-events: none;
}

.profilePanel__inner{
  height: 100%;
  padding: 18px 18px 22px;
  background: rgba(245, 246, 252, .92);
  border-right: 1px solid rgba(20, 24, 40, .10);
  box-shadow: 0 18px 60px rgba(0,0,0,.22);
  backdrop-filter: blur(14px);
}
.profilePanel__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.profilePanel__title{
  font-weight: 750;
  letter-spacing:.2px;
}
.profilePanel__close{
  appearance:none;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 20px;
  line-height: 30px;
}
.profilePanel__row{
  display:flex;
  gap:12px;
  align-items:center;
}
.profilePanel__avatar{
  width:48px;
  height:48px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
  font-weight:800;
}
.profilePanel__name{
  font-size: 18px;
  font-weight: 760;
}
.profilePanel__message{
  margin-top:2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}
.profilePanel__meta{
  margin-top: 14px;
}
.profilePanel__tag{
  display:inline-flex;
  padding:6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 12px;
}

/* Tooltip anchored to selected dot */
.dotTooltip{
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-9999px, -9999px);
  z-index: 13000;
  pointer-events: none;
}
.dotTooltip__inner{
  position: relative;

  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(245, 246, 252, .92);
  border: 1px solid rgba(20, 24, 40, .10);
  box-shadow: 0 18px 48px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
}
.dotTooltip__icon{
  width:40px;
  height:40px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: rgba(96, 114, 255, .14);
  border: 1px solid rgba(96, 114, 255, .22);
  font-weight: 800;
}
.dotTooltip__title{
  color: rgba(18, 20, 30, .92);

  font-weight: 760;
  font-size: 13px;
  line-height: 1.1;
}
.dotTooltip__sub{
  color: rgba(18, 20, 30, .62);

  color: var(--muted);
  font-size: 12px;
  line-height: 1.1;
  margin-top:2px;
}


/* Helium-style pointer */
.dotTooltip__inner::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-7px;
  width:14px;
  height:14px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(245, 246, 252, .92);
  border-right: 1px solid rgba(20, 24, 40, .10);
  border-bottom: 1px solid rgba(20, 24, 40, .10);
  box-shadow: 10px 10px 18px rgba(0,0,0,.10);
}

/* Helium-like light panel text */
.profilePanel__inner,
.profilePanel__inner *{
  color: rgba(18, 20, 30, .92);
}
.profilePanel__inner .muted,
.profilePanel__inner .profilePanel__subtitle{
  color: rgba(18, 20, 30, .62);
}



/* ================================
   Helium-style tooltip (IDENTICAL layout)
================================ */
.dotTooltip{
  position: fixed;
  left: 0;
  top: 0;
  z-index: 13000;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 14px));
  transition: opacity 180ms ease, transform 180ms ease;
}
.dotTooltip.is-visible{ opacity:1; transform: translate(-50%, calc(-100% - 18px)); }

.dotTooltip__card{
  width: 260px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(246, 246, 252, .96);
  border: 1px solid rgba(20,24,40,.10);
  box-shadow: 0 18px 48px rgba(0,0,0,.22);
  backdrop-filter: blur(10px);
}
.dotTooltip__media{
  height: 120px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(180deg, rgba(208,200,255,.92), rgba(236,234,255,.92));
}
.dotTooltip__media img{
  width: 84px;
  height: 84px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(0,0,0,.16);
}
.dotTooltip__body{
  padding: 14px 16px 16px;
}
.dotTooltip__kicker{
  font-size: 12px;
  font-weight: 700;
  color: rgba(40,42,60,.55);
  letter-spacing: .2px;
  margin-bottom: 6px;
}
.dotTooltip__title{
  font-size: 22px;
  font-weight: 800;
  color: rgba(18,20,30,.92);
  line-height: 1.1;
}
.dotTooltip__arrow{
  width: 14px;
  height: 14px;
  background: rgba(246, 246, 252, .96);
  border-left: 1px solid rgba(20,24,40,.10);
  border-bottom: 1px solid rgba(20,24,40,.10);
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 10px 10px 22px rgba(0,0,0,.05);
}

/* ================================
   Helium-style profile side panel
================================ */
.profilePanel{
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: min(520px, 92vw);
  transform: translateX(-110%);
  transition: transform 260ms ease, opacity 220ms ease;
  z-index: 14000;
  opacity: 0;
  pointer-events: none;
}
.profilePanel.is-open{
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.profilePanel__inner{
  height: 100%;
  padding: 18px 18px 28px;
  background: rgba(246, 246, 252, .98);
  border-right: 1px solid rgba(20,24,40,.10);
  box-shadow: 0 18px 70px rgba(0,0,0,.22);
  backdrop-filter: blur(14px);
  overflow:auto;
}
.profilePanel__header{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  padding: 6px 4px 12px;
}
.profilePanel__close{
  appearance:none;
  border: none;
  background: rgba(20,24,40,.06);
  color: rgba(20,24,40,.70);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 22px;
  line-height: 0;
  cursor:pointer;
}
.profilePanel__hero{
  padding: 10px 4px 6px;
}
.profilePanel__heroCard{
  height: 180px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(208,200,255,.92), rgba(236,234,255,.92));
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 18px 45px rgba(0,0,0,.10);
  border: 1px solid rgba(20,24,40,.08);
}
.profilePanel__heroCard img{
  width: 108px;
  height: 108px;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0,0,0,.14);
}
.profilePanel__section{
  padding: 14px 6px 0;
}
.profilePanel__kicker{
  font-size: 12px;
  font-weight: 800;
  color: rgba(40,42,60,.55);
  margin-bottom: 6px;
}
.profilePanel__bigTitle{
  font-size: 40px;
  font-weight: 900;
  letter-spacing: .2px;
  color: rgba(18,20,30,.92);
  line-height: 1.05;
}
.profilePanel__chips{
  margin-top: 12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.profilePanel__chip{
  display:inline-flex;
  align-items:center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(20,24,40,.06);
  color: rgba(18,20,30,.70);
  font-size: 13px;
  font-weight: 700;
}
.profilePanel__message{
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(18,20,30,.78);
}

/* Fade helpers when zoomed out (used by JS by toggling classes) */
.profilePanel.is-fading, .dotTooltip.is-fading{
  opacity: 0 !important;
}


/* --- Tooltip close button (Helium-like) --- */
.dotTooltip { pointer-events: none; }
.dotTooltip__close{
  pointer-events: auto;
  position:absolute;
  top:8px;
  right:8px;
  width:26px;
  height:26px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.35);
  background:rgba(15,22,35,0.35);
  color:#fff;
  font-size:18px;
  line-height:24px;
  cursor:pointer;
}
.dotTooltip__card{ position:relative; }

/* --- Profile panel collapse + tab --- */
.profilePanel.is-collapsed{
  transform: translateX(-92%);
  opacity: 0.95;
  pointer-events: none;
}
.profilePanel.is-collapsed .profilePanel__inner{
  pointer-events: none;
}

.profilePanel__collapse{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(12,18,34,0.55);
  color:#fff;
  font-size:22px;
  line-height:0px;
  cursor:pointer;
}

.profileTab{
  position:fixed;
  left:0px;
  top:50%;
  height: 85px;
  width: 35px;
  transform: translateY(-50%);
  z-index: 12050;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:0px 14px 14px 0px;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,255);
  font-size: 22px;
  color:#000;
  cursor:pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.profileTab__chev{ font-size:18px; opacity:0.95; }
.profileTab__label{ font-size:13px; letter-spacing:0.2px; opacity:0.95; }


.profileTab[hidden]{ display:none !important; }
