.neural-body {
  background: #0a0a0a;
  color: #c0c0c0;
  font-family: 'Courier New', 'Consolas', 'Liberation Mono', monospace;
  margin: 0;
  overflow: hidden;
  height: 100vh;
}

.neural-topbar {
  position: relative;
  z-index: 20;
}

.neural-nav-links {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-left: .5rem;
}

.sync-line {
  position: relative;
  z-index: 10;
  text-align: center; font-size: .65rem; color: #555;
  letter-spacing: .12em; padding: .35rem 0 .5rem;
}

#graph-container {
  position: absolute;
  top: 85px;
  left: 0;
  right: 0;
  bottom: 0;
}

.canvas-header {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  pointer-events: none;
  user-select: none;
}

.canvas-title {
  display: block;
  font-size: .7rem;
  letter-spacing: .25em;
  color: #d00;
}

.canvas-stats {
  display: flex;
  gap: .8rem;
  justify-content: center;
  margin-top: 2px;
  font-size: .6rem;
  letter-spacing: .1em;
  color: #eee;
}

.link {
  stroke: #333;
  stroke-width: 1px;
  stroke-opacity: 0.5;
}

.node-circle {
  cursor: pointer;
  stroke: #0a0a0a;
  stroke-width: 1.5px;
}

.node-circle:hover {
  stroke: #d00;
  stroke-width: 2px;
}

.node-label {
  font-family: 'Courier New', 'Consolas', 'Liberation Mono', monospace;
  font-size: 8px;
  fill: #eee;
  pointer-events: none;
}
.node-slug {
  font-family: 'Courier New', 'Consolas', 'Liberation Mono', monospace;
  font-size: 6.5px;
  fill: #666;
  pointer-events: none;
}

.legend {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  padding: .4rem .8rem;
  background: rgba(10,10,10,.85);
  border: 1px solid #222;
  z-index: 15;
  font-size: .65rem;
  letter-spacing: .1em;
  user-select: none;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: .35rem;
  color: #888;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.info-panel {
  position: fixed;
  top: 76px;
  right: 16px;
  width: 260px;
  background: rgba(10,10,10,.92);
  border: 1px solid #333;
  z-index: 25;
  padding: .75rem;
  font-size: .7rem;
}

.info-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid #222;
}

#infoLabel {
  color: #eee;
  font-weight: bold;
  font-size: .8rem;
  word-break: break-all;
}

.info-type-tag {
  display: inline-block;
  padding: .1rem .35rem;
  border: 1px solid #555;
  color: #aaa;
  font-size: .6rem;
  letter-spacing: .1em;
  white-space: nowrap;
}

.info-panel-body {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.info-row {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.info-key {
  color: #555;
  font-size: .6rem;
  letter-spacing: .1em;
}

.info-val {
  color: #aaa;
  word-break: break-all;
  line-height: 1.3;
}

.info-val a {
  color: #4488ff;
  text-decoration: none;
}

.info-val a:hover {
  text-decoration: underline;
}

.info-btn {
  margin-top: .6rem;
  width: 100%;
  padding: .4rem;
  background: transparent;
  border: 1px solid #d00;
  color: #d00;
  font-family: inherit;
  font-size: .7rem;
  letter-spacing: .2em;
  cursor: pointer;
  transition: all .15s;
}

.info-btn:hover {
  background: #d00;
  color: #0a0a0a;
}

.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #444;
  font-size: .8rem;
  letter-spacing: .2em;
  z-index: 5;
}

.filter-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
}
.legend-filter {
  background: transparent;
  border: 1px solid #333;
  color: #888;
  font-family: inherit;
  font-size: .65rem;
  padding: .15rem .4rem;
  width: 14ch;
  outline: none;
  letter-spacing: .08em;
}
.legend-filter:focus { border-color: #d00; color: #eee; }
.legend-filter::placeholder { color: #444; }

.filter-clear {
  position: absolute;
  right: 2px;
  background: none;
  border: none;
  color: #666;
  font-size: .8rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  font-family: inherit;
}
.filter-clear:hover { color: #d00; }

.filter-count {
  font-size: .6rem;
  color: #555;
  white-space: nowrap;
}

.hover-card {
  position: fixed;
  pointer-events: none;
  z-index: 30;
  background: rgba(10,10,10,.92);
  border: 1px solid #444;
  padding: .5rem .65rem;
  font-size: .65rem;
  line-height: 1.4;
  max-width: 280px;
}
.hover-card .hc-label {
  color: #eee;
  font-weight: bold;
  font-size: .75rem;
}
.hover-card .hc-type {
  color: #888;
  margin-left: .35rem;
}
.hover-card .hc-url {
  color: #666;
  font-size: .6rem;
  word-break: break-all;
  margin-top: .15rem;
}
.hover-card .hc-row {
  color: #888;
  margin-top: .1rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 600px) {
  .legend { flex-wrap: wrap; gap: .4rem; width: 90%; font-size: .55rem; bottom: 8px; }
  .info-panel { width: auto; left: 8px; right: 8px; top: 130px; }
}
