.controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 6px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: auto;
}

.controls h3 {
  display: none;
}

.controls button {
  padding: 8px;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: var(--slate-600);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  position: relative;
  text-indent: -9999px;
  overflow: hidden;
}

.controls button::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-indent: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.controls button:hover {
  background: rgba(148, 163, 184, 0.15);
  color: var(--slate-800);
  transform: scale(1.05);
}

.controls button:active {
  background: rgba(148, 163, 184, 0.25);
  transform: scale(0.98);
}

#zoomIn::before, #zoomOut::before, #resetView::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-indent: 0;
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

#zoomIn::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3Cline x1='11' y1='8' x2='11' y2='14'%3E%3C/line%3E%3Cline x1='8' y1='11' x2='14' y2='11'%3E%3C/line%3E%3C/svg%3E");
}

#zoomOut::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3Cline x1='8' y1='11' x2='14' y2='11'%3E%3C/line%3E%3C/svg%3E");
}

#resetView::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3Cpath d='M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16'/%3E%3Cpath d='M16 16h5v5'/%3E%3C/svg%3E");
}

.controls button:hover::before {
  opacity: 1;
}

.info-panel {
    margin-top: 20px;
}

.info-panel h3 {
    margin-bottom: 10px;
}

.node-info {
  background: white;
  border-radius: 6px;
  padding: 16px;
  border: 1px solid var(--slate-200);
  margin-top: 10px;
}

.node-info-placeholder {
  color: var(--slate-500);
  font-style: italic;
  padding: 10px 0;
  font-size: 13px;
}

.node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.node-label {
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font-mono);
  color: var(--slate-800);
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 85%;
}

.node-badge {
  background: var(--slate-100);
  color: var(--slate-600);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
}

.node-detail {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
}

.detail-label {
  width: 70px;
  color: var(--slate-500);
  flex-shrink: 0;
}

.node-detail span:last-child {
  flex: 1;
  word-break: break-word;
  overflow-wrap: break-word;
  padding-right: 5px;
  color: var(--slate-700);
}

.focus-button {
  margin-top: 12px;
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  font-size: 13px;
  font-weight: 500;
}

.focus-button:hover {
  background: var(--primary-dark);
}

.github-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--slate-200);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.github-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--slate-600);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px 12px;
  border-radius: 8px;
  margin: -8px -12px;
}

.github-link:hover {
  color: var(--slate-800);
  background: rgba(148, 163, 184, 0.1);
}

.github-link .github-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--slate-500);
  transition: all 0.2s ease;
}

.github-link:hover .github-icon {
  color: var(--slate-700);
  transform: scale(1.1);
}

.github-link span {
  flex: 1;
}

.github-link .external-icon {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  opacity: 0.4;
  color: var(--slate-400);
  transition: all 0.2s ease;
}

.github-link:hover .external-icon {
  opacity: 0.7;
  transform: translate(1px, -1px);
}

@media (max-width: 768px) {
  .controls {
    bottom: 12px;
    right: 12px;
    padding: 4px;
  }

  .controls button {
    width: 32px;
    height: 32px;
  }
}
