/* Flovix Live: full-screen 3D view. A deliberately dark, single-theme page (space). */
@font-face {
  font-family: "Onest";
  src: url("../fonts/onest-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/onest-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("../fonts/martian-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --space: #05070d;
  --glass: rgba(8, 12, 20, 0.76);
  --edge: rgba(140, 170, 210, 0.26);
  --edge-hi: rgba(140, 170, 210, 0.5);
  --text: #dfe7f0;
  --soft: #8fa6bf;
  --teal: #5dcaa5;
  --violet: #afa9ec;
  --gold: #ffd27a;
  --amber: #ef9f27;
  --red: #f0806a;
  --sans: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Martian Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; background: var(--space); color: var(--text); font-family: var(--sans); overflow: hidden; }
a { color: var(--text); }
#lv-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#lv-canvas.is-dragging { cursor: grabbing; }
#lv-labels { position: fixed; inset: 0; pointer-events: none; font-family: var(--mono); font-size: 11px; color: var(--soft); overflow: hidden; }
#lv-labels > div { position: absolute; white-space: nowrap; transform: translate(-50%, -50%); transition: opacity 0.4s; }
#lv-labels .lb-src { color: #7fd8bb; transform: translate(-50%, -170%); }
#lv-labels .lb-eye { color: #c4bff2; transform: translate(-50%, -170%); }
#lv-labels .lb-off { color: #6c7a8a; transform: translate(-50%, -170%); }
#lv-labels .lb-watch { color: var(--gold); font-family: var(--sans); font-size: 12px; transform: translate(-50%, -260%); }
#lv-labels .lb-threat { color: var(--red); font-family: var(--sans); font-size: 12px; }
#lv-labels .lb-noise { color: var(--amber); font-family: var(--sans); font-size: 12px; }
#lv-labels .lb-open { color: var(--teal); }

.lv-panel {
  position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); top: max(12px, env(safe-area-inset-top, 0px));
  width: 270px; max-height: calc(100% - 24px); overflow: auto;
  background: var(--glass); border: 0.5px solid var(--edge); border-radius: 12px; padding: 14px 14px 12px;
  font-size: 13px; line-height: 1.5; backdrop-filter: blur(6px); transition: opacity 0.35s, transform 0.35s;
}
.lv-panel.is-hidden { opacity: 0; transform: translateX(-12px); pointer-events: none; }
.lv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.lv-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 15px; }
.lv-brand svg { width: 34px; height: 20px; fill: none; stroke: var(--text); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.lv-brand svg .ghost { opacity: 0.38; }
.lv-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--teal); border: 0.5px solid rgba(93, 202, 165, 0.5); border-radius: 5px; padding: 1px 6px; }
.lv-nets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.lv-nets button { font: inherit; font-size: 12px; color: var(--text); background: rgba(20, 30, 46, 0.8); border: 0.5px solid var(--edge-hi); border-radius: 7px; padding: 5px 9px; cursor: pointer; }
.lv-nets button[aria-pressed="true"] { background: rgba(55, 138, 221, 0.35); border-color: rgba(133, 183, 235, 0.85); color: #fff; }
.lv-nets button:focus-visible, .lv-ctl button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.lv-sec { border-top: 0.5px solid var(--edge); padding-top: 9px; margin-top: 9px; }
.lv-sec h2 { margin: 0 0 4px; font-size: 11px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); font-family: var(--mono); }
.lv-net-name { font-size: 17px; font-weight: 600; color: #fff; }
.lv-muted { color: var(--soft); }
.lv-mono { font-family: var(--mono); font-size: 12px; }
.lv-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.lv-row span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-row.lv-wrap span:last-child { white-space: normal; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; display: inline-block; transform: translateY(-1px); }
.dot-ok { background: var(--teal); } .dot-eye { background: var(--violet); } .dot-off { background: #5f6b78; }
.dot-warn { background: var(--amber); } .dot-alert { background: var(--red); } .dot-calm { background: var(--gold); }
.lv-sub { padding-left: 16px; color: var(--soft); font-size: 12px; margin-top: -2px; }
.lv-feed { font-family: var(--mono); font-size: 11px; line-height: 1.6; color: var(--text); }
.lv-feed div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; font-size: 12px; color: var(--soft); }
.lv-legend span { display: flex; align-items: center; gap: 6px; }
.sw { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sw-transfer { background: #85b7eb; } .sw-token { background: #5dcaa5; } .sw-call { background: #afa9ec; }
.sw-reward { background: #ffc46b; } .sw-create { background: #f0997b; } .sw-ring { border: 2px solid #e24b4a; background: transparent; }
.lv-hint { margin: 10px 0 0; font-size: 11px; color: var(--soft); }
.lv-hint kbd { font-family: var(--mono); font-size: 10px; border: 0.5px solid var(--edge-hi); border-radius: 4px; padding: 0 4px; }
.lv-ctl {
  position: fixed; right: max(12px, env(safe-area-inset-right, 0px)); bottom: max(12px, env(safe-area-inset-bottom, 0px));
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
}
.lv-ctl button { font: inherit; font-size: 13px; color: var(--text); background: rgba(20, 30, 46, 0.85); border: 0.5px solid var(--edge-hi); border-radius: 8px; min-width: 36px; height: 34px; padding: 0 10px; cursor: pointer; }
.lv-ctl button:disabled { opacity: 0.35; cursor: default; }
.lv-tip {
  position: fixed; pointer-events: none; z-index: 5; max-width: 340px; background: rgba(8, 12, 20, 0.94);
  border: 0.5px solid var(--edge-hi); border-radius: 9px; padding: 9px 11px; font-size: 12px; line-height: 1.55; color: var(--text);
}
.lv-tip .t-title { color: #fff; font-weight: 600; margin-bottom: 3px; }
.lv-tip .t-k { color: var(--soft); }
.lv-tip .t-v { font-family: var(--mono); font-size: 11px; word-break: break-all; }
.lv-tip .t-note { color: var(--soft); margin-top: 4px; }
.lv-tip .t-red { color: var(--red); } .lv-tip .t-amber { color: var(--amber); } .lv-tip .t-ok { color: var(--teal); }
.lv-toast {
  position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 4;
  background: rgba(8, 12, 20, 0.9); border: 0.5px solid var(--edge-hi); border-radius: 9px; padding: 7px 13px;
  font-size: 13px; transition: opacity 0.5s; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis;
}
.lv-toast.is-red { border-color: rgba(240, 128, 106, 0.8); }
.lv-fallback { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--soft); }
@media (max-width: 640px) {
  .lv-panel { width: auto; right: 12px; max-height: 40%; font-size: 12px; padding: 10px 12px; }
  .lv-legend { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lv-panel, .lv-toast, #lv-labels > div { transition: none; }
}
