:root {
  --bg: #04060d;
  --ink: #e6edf7;
  --dim: #7d8aa5;
  --core: #5eead4;
  --core2: #38bdf8;
  --up: #4ade80;
  --down: #f87171;
  --unknown: #94a3b8;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.hub {
  background: radial-gradient(ellipse at 50% 50%, #0b1630 0%, #060a17 45%, var(--bg) 100%);
  color: var(--ink);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }

.system { position: fixed; inset: 0; z-index: 1; }

/* ---------- nucleul / pulsarul ---------- */
.core {
  position: absolute; left: 50%; top: 50%;
  width: var(--core-size, 220px); height: var(--core-size, 220px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 38% 32%, #1b3a5c 0%, #0b1a33 55%, #050b18 100%);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, .35), 0 0 60px rgba(56, 189, 248, .35), inset 0 0 50px rgba(94, 234, 212, .18);
  animation: core-beat 2.6s ease-in-out infinite;
}
.core-glow {
  position: absolute; inset: -40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, .28) 0%, rgba(94, 234, 212, .08) 40%, transparent 70%);
  animation: glow 2.6s ease-in-out infinite;
  pointer-events: none;
}
.core-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(94, 234, 212, .55);
  animation: ring-out 3.9s cubic-bezier(.2, .6, .3, 1) infinite;
  pointer-events: none;
}
.core-ring.r2 { animation-delay: 1.3s; }
.core-ring.r3 { animation-delay: 2.6s; }
.core-label { position: relative; text-align: center; line-height: 1.1; }
.brand { display: block; font-size: calc(var(--core-size, 220px) * .14); font-weight: 300; letter-spacing: .02em; }
.brand b { font-weight: 800; background: linear-gradient(90deg, var(--core), var(--core2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tag { display: block; margin-top: .5em; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--dim); }

@keyframes core-beat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  12% { transform: translate(-50%, -50%) scale(1.045); }
  24% { transform: translate(-50%, -50%) scale(.995); }
}
@keyframes glow { 0%, 100% { opacity: .65; } 12% { opacity: 1; } }
@keyframes ring-out {
  0% { transform: scale(1); opacity: .85; }
  100% { transform: scale(3.4); opacity: 0; }
}

/* ---------- platformele ---------- */
.orbit { position: absolute; inset: 0; }
.node {
  --c: #38bdf8;
  position: absolute; left: 0; top: 0;
  width: 132px; margin-left: -66px; margin-top: -46px;
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none; color: var(--ink);
  will-change: transform;
  opacity: 0;
  transition: opacity .8s ease;
  outline: none;
}
.node.ready { opacity: 1; }
.node-orb {
  position: relative;
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 45%, #0b1426) 0%, #0a1222 70%);
  border: 1.5px solid color-mix(in srgb, var(--c) 70%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--c) 45%, transparent), inset 0 0 18px color-mix(in srgb, var(--c) 25%, transparent);
  transition: transform .25s ease, box-shadow .25s ease;
}
.node-orb svg { width: 34px; height: 34px; fill: none; stroke: var(--c); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px var(--c)); }
.node-pulse {
  position: absolute; top: 0; left: 50%;
  width: 76px; height: 76px; margin-left: -38px; border-radius: 50%;
  border: 1.5px solid var(--c);
  opacity: 0; pointer-events: none;
}
.node.hit .node-pulse { animation: node-ping 1.2s ease-out; }
@keyframes node-ping { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.3); opacity: 0; } }

.node-name { margin-top: 10px; font-size: 15px; font-weight: 700; letter-spacing: .03em; text-shadow: 0 0 12px rgba(0, 0, 0, .9); white-space: nowrap; }
.node-sub { font-size: 11px; color: var(--dim); white-space: nowrap; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; }

.dot { position: absolute; right: 4px; top: 4px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #0a1222; background: var(--unknown); }
.node.up .dot { background: var(--up); box-shadow: 0 0 8px var(--up); }
.node.down .dot { background: var(--down); box-shadow: 0 0 8px var(--down); animation: blink 1s steps(2) infinite; }
.node.down .node-orb { filter: saturate(.35); }
@keyframes blink { 50% { opacity: .2; } }

.node:hover .node-orb, .node:focus-visible .node-orb { transform: scale(1.14); box-shadow: 0 0 40px var(--c), inset 0 0 22px color-mix(in srgb, var(--c) 40%, transparent); }
.node:hover .node-sub, .node:focus-visible .node-sub { opacity: 1; transform: none; }
.node:focus-visible .node-orb { outline: 2px solid var(--c); outline-offset: 4px; }
.node.ai .node-orb { width: 90px; height: 90px; }
.node.ai .node-orb svg { width: 42px; height: 42px; }
.node.ai .node-pulse { width: 90px; height: 90px; margin-left: -45px; }
/* orbita exterioara: noduri putin mai mici */
.node[data-ring="2"] { margin-top: -38px; }
.node[data-ring="2"] .node-orb { width: 60px; height: 60px; }
.node[data-ring="2"] .node-orb svg { width: 27px; height: 27px; }
.node[data-ring="2"] .node-pulse { width: 60px; height: 60px; margin-left: -30px; }
.node[data-ring="2"] .node-name { font-size: 13px; margin-top: 8px; }

.hub-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; color: var(--dim); font-size: 12px; letter-spacing: .08em;
}
.admin-link { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--dim); border: 1px solid rgba(125, 138, 165, .25); transition: color .2s, border-color .2s; }
.admin-link:hover { color: var(--ink); border-color: var(--ink); }
.admin-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

@media (max-width: 640px) {
  .node { width: 96px; margin-left: -48px; margin-top: -32px; }
  .node-orb { width: 46px; height: 46px; }
  .node-orb svg { width: 21px; height: 21px; }
  .node-pulse { width: 46px; height: 46px; margin-left: -23px; }
  .node.ai .node-orb { width: 56px; height: 56px; }
  .node.ai .node-orb svg { width: 26px; height: 26px; }
  .node.ai .node-pulse { width: 56px; height: 56px; margin-left: -28px; }
  .node-name { font-size: 12px; margin-top: 6px; }
  .node-sub { display: none; }
  .node { width: 84px; margin-left: -42px; margin-top: -26px; }
  .node-name { white-space: normal; text-align: center; line-height: 1.15; max-width: 76px; }
  .node[data-ring="2"] { margin-top: -26px; }
  .node[data-ring="2"] .node-orb { width: 42px; height: 42px; }
  .node[data-ring="2"] .node-orb svg { width: 19px; height: 19px; }
  .node[data-ring="2"] .node-pulse { width: 42px; height: 42px; margin-left: -21px; }
  .node[data-ring="2"] .node-name { font-size: 11px; margin-top: 4px; }
  .node-name { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .core, .core-glow, .core-ring { animation: none; }
}
