html,
body,
#cesiumContainer {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* HUD Top Bar */
#hud-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: rgba(0, 0, 0, 0.5);
  /* Semi-transparent background */
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 5px;
  z-index: 100;
  pointer-events: auto;
  /* allow clicking cards */
  gap: 10px;
  align-items: center;
}

.patient-card {
  background: rgba(30, 30, 40, 0.9);
  border: 1px solid #444;
  border-radius: 4px;
  padding: 5px 10px;
  min-width: 150px;
  color: white;
  font-family: monospace;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

/* SVG Layer for connecting lines */
#connections-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Let clicks pass through to Cesium */
  z-index: 90;
  /* Below HUD, above Map */
}

/* Patient Detail Overlay (Bottom Right) */
#patient-detail-overlay {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 300px;
  background: rgba(20, 20, 30, 0.95);
  border: 1px solid #444;
  border-left: 5px solid cyan;
  border-radius: 8px;
  padding: 15px;
  z-index: 101;
  color: white;
  font-family: inherit;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

#patient-detail-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

#patient-detail-overlay h3 {
  margin-top: 0;
  border-bottom: 1px solid #555;
  padding-bottom: 10px;
  color: cyan;
}

#patient-detail-overlay button {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background: #444;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

#patient-detail-overlay button:hover {
  background: #555;
}

#sidebar {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#sidebar {
  position: absolute;
  top: 100px;
  right: 20px;
  width: 300px;
  background: rgba(20, 20, 30, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 12px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

#sidebar h2 {
  margin-top: 0;
  font-size: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
}

.stat-box {
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-box h3 {
  font-size: 14px;
  margin: 0;
  color: #aaa;
}

.stat-box span {
  font-size: 20px;
  font-weight: bold;
  color: #4facfe;
}

#settings {
  position: absolute;
  bottom: 30px;
  left: 20px;
  width: 250px;
  background: rgba(20, 20, 30, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 15px;
  border-radius: 12px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

#settings h3 {
  margin-top: 0;
  font-size: 16px;
}

#settings label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  cursor: pointer;
}

#settings input[type="range"],
#settings select {
  width: 100%;
  margin-top: 5px;
}

#settings select {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px;
  border-radius: 4px;
}

#entity-info.hidden {
  display: none;
}

#entity-info {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}