body {
  font-family: "Arial", sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  height: 100vh;
  overflow: hidden; /* Prevent body scrollbars */
  background-color: #f0f0f0;
}

#cy {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: grab;
}

#cy:active {
  cursor: grabbing;
}

#litegraph-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#litegraph-canvas:active {
  cursor: grabbing;
}

.cytoscape-container {
  flex-grow: 1; /* Takes up all available space */
}

#controls {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 180px;
}

#controls h3 {
  margin-top: 0;
  text-align: center;
}

#controls button,
#controls select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  background-color: #fff;
  transition: background-color 0.2s;
}

#controls button:hover,
#controls select:hover {
  background-color: #e9e9e9;
}

#controls .info {
  font-size: 0.8em;
  color: #555;
  margin: 5px 0 0 0;
}

/* Physics controls styling */
.physics-controls {
  font-size: 0.9em;
}

.physics-controls label {
  display: block;
  margin: 5px 0;
  color: #555;
}

.physics-controls input[type="checkbox"] {
  margin-right: 5px;
}

.physics-controls input[type="range"] {
  width: 100px;
  margin: 0 5px;
}

.physics-controls span {
  font-weight: bold;
  color: #2c3e50;
}

/* Flexible Node Editor styling */
.node {
  cursor: pointer;
  transition: all 0.2s ease;
}

.node:hover {
  transform: scale(1.05);
}

.node.active {
  filter: drop-shadow(0 0 10px rgba(243, 156, 18, 0.5));
}

/* Port styling */
.port {
  transition: all 0.2s ease;
}

.port:hover {
  transform: scale(1.2);
}

.port circle {
  transition: all 0.2s ease;
}

.port:hover circle {
  stroke-width: 3;
}

/* Connection styling */
.links line {
  stroke: #34495e;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
}

.links line.principal {
  stroke: #34495e;
  stroke-width: 4;
}

.links line.auxiliary {
  stroke: #95a5a6;
  stroke-width: 2;
}

/* Temporary connection styling */
.temp-connection {
  stroke: #e74c3c;
  stroke-width: 2;
  stroke-dasharray: 5,5;
  fill: none;
  opacity: 0.8;
}
