:root {
  --bg: #07110f;
  --surface: rgba(8, 16, 16, 0.82);
  --surface-strong: rgba(11, 25, 24, 0.94);
  --border: rgba(218, 236, 226, 0.18);
  --text: #f5fff9;
  --muted: #a8bab3;
  --green: #62e6a8;
  --cyan: #6fd8ff;
  --amber: #ffd166;
  --rose: #ff6f91;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.38);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

body {
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 32%),
    radial-gradient(circle at 20% 18%, rgba(98, 230, 168, 0.18), transparent 32%),
    radial-gradient(circle at 84% 22%, rgba(111, 216, 255, 0.15), transparent 32%),
    radial-gradient(circle at 52% 102%, rgba(255, 111, 145, 0.13), transparent 40%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.experiment {
  position: fixed;
  inset: 0;
  min-width: 320px;
  isolation: isolate;
}

canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.panel {
  position: fixed;
  z-index: 2;
  top: 16px;
  left: 16px;
  width: min(318px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  text-transform: uppercase;
}

.back-link:hover {
  color: var(--green);
}

h1 {
  margin: 7px 0 12px;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: 0;
}

.stats {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
  margin: 0;
}

.stats div {
  min-width: 0;
}

dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

dd {
  min-width: 0;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--green);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.8);
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 18px rgba(98, 230, 168, 0.85);
}

.status-dot.offline {
  background: var(--rose);
  box-shadow: 0 0 18px rgba(255, 111, 145, 0.85);
}

a:focus-visible {
  outline: 3px solid rgba(111, 216, 255, 0.35);
  outline-offset: 2px;
}

@media (max-width: 680px) {
  .panel {
    top: 10px;
    left: 10px;
    width: min(300px, calc(100vw - 20px));
    padding: 12px;
  }

  h1 {
    font-size: 22px;
  }
}
