:root {
  --bg: #1b1f24;
  --panel: rgba(28, 33, 40, 0.92);
  --panel-border: #3a4350;
  --text: #e7ecf2;
  --text-dim: #9aa6b4;
  --accent: #6fb1ff;
  --accent-dim: #3a536f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow: hidden; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

#scene { display: block; width: 100%; height: 100%; }

.overlay {
  position: absolute;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

/* Bedienpanel links */
#panel {
  top: 16px;
  left: 16px;
  width: 270px;
  padding: 18px 18px 14px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

#panel h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}
#panel h1 .sub {
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  padding: 1px 6px;
  vertical-align: middle;
}

#panel section { margin-bottom: 16px; }

#panel h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.toggles { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }

.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
}
.toggle:hover { background: rgba(111,177,255,0.08); }
.toggle.off { opacity: 0.4; }
.toggle .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); flex: 0 0 auto;
}

.btn {
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 13px;
}
.btn:hover { background: rgba(111,177,255,0.12); }
.btn.small { width: 100%; }

input[type="range"] { width: 100%; accent-color: var(--accent); }

.row-between {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-dim); margin-top: 2px;
}

.check {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; margin-bottom: 6px; cursor: pointer;
}
.check input { accent-color: var(--accent); }

.legend { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.legend .sw { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,0.3); }

.hint { font-size: 11px; color: var(--text-dim); line-height: 1.5; margin-top: 4px; }

/* Infobox rechts */
#infobox {
  top: 16px;
  right: 16px;
  width: 240px;
  padding: 16px 18px;
}
#infobox h3 { font-size: 17px; margin-bottom: 10px; padding-right: 20px; }
#infobox dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
#infobox dt { color: var(--text-dim); }
#infobox dd { text-align: right; }
.close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; color: var(--text-dim);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.close:hover { color: var(--text); }

.center {
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  padding: 14px 22px; font-size: 14px; color: var(--text-dim);
}

.hidden { display: none !important; }

.badge-est {
  font-size: 10px; color: #ffd479;
  border: 1px solid #6a5a2a; border-radius: 5px;
  padding: 1px 5px; margin-left: 6px;
}
