:root {
  --bg: #000000;
  --box: rgba(8, 10, 16, 0.72);
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --muted: #8b93a7;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; }
#graph { position: fixed; inset: 0; }

.box {
  position: fixed; z-index: 2; background: var(--box); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 11.5px; line-height: 1.55; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.box b { font-weight: 650; font-variant-numeric: tabular-nums; }

#hud { top: 14px; left: 14px; min-width: 150px; color: var(--muted); }
#hud b { color: var(--text); }
.brand { color: var(--text); font-weight: 700; letter-spacing: .06em; font-size: 12.5px; margin-bottom: 4px; }
.live { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #e05a5a; display: inline-block; }
.live i.on { background: #3ddc97; box-shadow: 0 0 6px #3ddc97; }

#legend { top: 14px; right: 14px; min-width: 170px; max-height: calc(100vh - 28px); overflow-y: auto; }
#legend .row { display: flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
#legend .row.off { opacity: .3; }
#legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
#legend .name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
#legend .n { color: var(--muted); font-variant-numeric: tabular-nums; padding-left: 12px; }

#feed { bottom: 14px; left: 14px; width: 400px; padding: 8px 10px; }
#feed:empty { display: none; }
#feed .row { display: grid; grid-template-columns: 56px 56px 1fr auto; gap: 8px; align-items: baseline; white-space: nowrap; }
#feed .row.new { animation: glow 2.4s ease-out; }
#feed .t { color: var(--muted); font-variant-numeric: tabular-nums; }
#feed .src { font-weight: 600; }
#feed .what { overflow: hidden; text-overflow: ellipsis; }
#feed .hits { color: var(--muted); }
@keyframes glow { from { background: rgba(255, 230, 109, .16); } to { background: transparent; } }

#fx { margin-top: 6px; }
#fx summary { cursor: pointer; color: var(--text); user-select: none; }
#fx label { display: flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; white-space: nowrap; }
#fx input { accent-color: #ffe66d; margin: 0; }
#fx label { margin-top: 4px; }
#fx .sl { display: grid; grid-template-columns: 74px 1fr 34px; align-items: center; gap: 6px; padding-left: 18px; color: var(--muted); }
#fx .sl input { width: 100%; height: 14px; }
#fx .sl b { color: var(--text); text-align: right; font-weight: 500; }
#fx .fxh { margin-top: 6px; color: var(--text); }
#fx .fxreset { margin-top: 8px; margin-right: 6px; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 5px;
  font: inherit; padding: 2px 8px; cursor: pointer; }
#fxList { max-height: 60vh; overflow-y: auto; min-width: 230px; }

.noui .box { display: none !important; }
.noui.stats #hud { display: block !important; }   /* öffentlich: nur Kennzahlen */
.noui #fx { display: none; }

@media (max-width: 700px) {
  #legend { top: auto; bottom: 14px; right: 14px; max-height: 30vh; overflow-y: auto; }
  #feed { bottom: auto; top: 140px; left: 14px; right: 14px; width: auto; }
  #feed .row { grid-template-columns: 50px 48px 1fr; }
  #feed .hits { display: none; }
}

/* Ladebalken (Aufbau der Wolke): halbtransparent, schwebt unten in der Mitte, auch auf der öffentlichen Seite */
#boot { position: fixed; left: 50%; bottom: 12vh; transform: translateX(-50%); width: min(420px, calc(100vw - 48px));
  padding: 12px 16px 14px; border-radius: 10px; pointer-events: none; z-index: 5;
  background: rgba(10, 16, 32, .38); border: 1px solid rgba(120, 200, 255, .18);
  box-shadow: 0 0 24px rgba(79, 195, 247, .10), inset 0 0 18px rgba(79, 195, 247, .05);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font: 11px/1.2 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(190, 225, 255, .78); transition: opacity 1.2s ease, transform 1.2s ease; }
#boot.done { opacity: 0; transform: translateX(-50%) translateY(10px); }
.boot-row { display: flex; justify-content: space-between; margin-bottom: 9px; }
#bootPct { color: rgba(120, 220, 255, .95); text-shadow: 0 0 8px rgba(79, 195, 247, .7); }
.boot-bar { position: relative; height: 3px; border-radius: 2px; background: rgba(120, 180, 255, .12); overflow: hidden; }
.boot-bar i { position: absolute; inset: 0; transform: scaleX(0); transform-origin: 0 50%; border-radius: 2px; transition: transform .25s linear; will-change: transform;
  background: linear-gradient(90deg, #4fc3f7, #a78bfa 70%, #ff7ac6); box-shadow: 0 0 10px #4fc3f7, 0 0 18px rgba(167, 139, 250, .6); }
.boot-bar::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; left: 0; transform: translateX(-100%); will-change: transform;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: bootScan 1.6s linear infinite; }
@keyframes bootScan { to { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) { .boot-bar::after { animation: none; } }
