:root {
  color-scheme: dark;
  --bg: #060912;
  --panel: rgba(10, 15, 30, 0.52);
  --panel-strong: rgba(12, 18, 36, 0.72);
  --line: rgba(168, 189, 233, 0.18);
  --line-strong: rgba(168, 189, 233, 0.26);
  --text: #edf2ff;
  --muted: rgba(237, 242, 255, 0.68);
  --accent: #9ab8ff;
  --accent-soft: rgba(154, 184, 255, 0.14);
  --shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(40, 55, 110, 0.42), transparent 38%),
    radial-gradient(circle at 80% 10%, rgba(26, 33, 74, 0.34), transparent 40%),
    linear-gradient(180deg, #070b16 0%, #05070e 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.graph-shell {
  position: absolute;
  inset: 0 0 0 100px;
  width: calc(100vw - 100px);
  height: 100vh;
  z-index: 0;
}

#graph {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.overlay {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(300px, calc(100vw - 24px));
  z-index: 5;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-start;
  padding: 14px 0 14px 14px;
  overflow-x: hidden;
  overflow-y: scroll;
}
.overlay::-webkit-scrollbar {
  width: 6px;   /* schmal */
  height: 6px;
}

/* Track (Hintergrund) */
.overlay::-webkit-scrollbar-track {
  background: transparent; /* oder leicht dunkel */
}

/* Thumb (der „Griff“) */
.overlay::-webkit-scrollbar-thumb {
  background-color: #1e3a5f; /* dezentes Dunkelblau */
  border-radius: 10px;
}

/* Hover-Effekt */
.overlay::-webkit-scrollbar-thumb:hover {
  background-color: #274b7a;
}

.panel {
  width: 100%;
  pointer-events: auto;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 12px 12px 10px;
}

.panel h1 {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(237, 242, 255, 0.9);
}

h2 {
   margin: 0 0 10px;
   padding: 0;
   font-size: 12px;
}

.tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.graph-btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: rgba(7, 11, 22, 0.42);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.15;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, opacity 120ms ease;
}

.graph-btn:hover {
  background: rgba(16, 22, 41, 0.58);
  border-color: rgba(154, 184, 255, 0.42);
}

.graph-btn.active {
  background: rgba(154, 184, 255, 0.14);
  border-color: rgba(154, 184, 255, 0.56);
}

.graph-btn:active {
  transform: translateY(1px);
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 12, 22, 0.38);
}

.option-row label {
  font-size: 12px;
  line-height: 1.2;
  color: rgba(237, 242, 255, 0.9);
}

.option-row input[type="range"],
.option-row input[type="number"] {
  width: 100%;
}

.option-row input[type="range"] {
  accent-color: var(--accent);
}

.option-row input[type="number"] {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  outline: none;
}

.option-row input[type="number"]:focus,
.option-row input[type="range"]:focus {
  outline: none;
}

.value-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.value-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(154, 184, 255, 0.16);
  background: rgba(154, 184, 255, 0.08);
  color: rgba(237, 242, 255, 0.9);
  font-size: 11px;
}

.helper {
  display: none;
}

.link {
  stroke: rgba(154, 184, 255, 0.28);
  stroke-width: 1.05;
  stroke-linecap: round;
  fill: none;
}

.node circle {
  fill: rgba(35, 55, 95, 0.92);
  stroke: rgba(185, 212, 255, 0.72);
  stroke-width: 1.1;
}

.node text {
  fill: rgba(237, 242, 255, 0.96);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(5, 10, 20, 0.8);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.node:hover circle {
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 1.8;
  filter: drop-shadow(0 0 10px rgba(154, 184, 255, 0.35));
}

@media (max-width: 760px) {
  .graph-shell {
    inset: 0;
    width: 100vw;
  }

  .overlay {
    width: min(280px, calc(100vw - 16px));
    padding: 10px 0 0 10px;
  }

  .panel {
    padding: 10px 10px 8px;
  }

  .graph-btn,
  .option-row label,
  .option-row input[type="number"] {
    font-size: 11px;
  }
}








.graph-shell {
  position: absolute;
  inset: 0 0 0 100px;
  width: calc(100vw - 100px);
  height: 100vh;
}

.overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: min(300px, calc(100vw - 16px));
  z-index: 10;
  padding: 12px;
  pointer-events: none;
}

.panel {
  pointer-events: auto;
  background: rgba(10, 15, 30, 0.50);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 10px;
}

.results {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 20;
  background: transparent;
  color: rgba(240, 245, 255, 0.92);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
  pointer-events: none;
}

.node.informed circle {
  fill: #e53935;
}

.node.reached circle {
  fill: #f4d03f;
}

.link.active {
  stroke: #f4d03f;
  stroke-width: 2;
}

.link.used {
  stroke: #e53935;
  stroke-width: 2;
}

.node.start circle {
  fill: #2f6fff;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 1.4;
}