body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #fafafa;
  color: #222;
  text-align: center;
  margin: 0;
  padding: 2em;
}

#canvas {
  position: relative;
  width: 800px;
  height: 500px;
  margin: 2em auto;
  border: 1px dashed #ccc;
  background-color: #fff;
  border-radius: 10px;
}

.pair {
  position: absolute;
  width: 160px;
  height: 110px;
  border: 2px solid #444;
  border-radius: 12px;
  background: #f9f9f9;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 0.5em;
}

/* Align the "Recipient" and "Donor" labels evenly */
.pair div {
  display: flex;
  justify-content: space-between; /* pushes label and select apart */
  align-items: center;
  margin: -2px 0;
}

.pair div select {
  width: 60px; /* make all selects the same width */
  text-align: center;
}

#pair1 {
  top: 50px;
  left: 320px;
}

#pair2 {
  top: 320px;
  left: 150px;
}

#pair3 {
  top: 320px;
  left: 510px;
}

.arrow {
  stroke-width: 3px;
  stroke: #888;
  marker-end: url(#arrowhead);
  transition: stroke 0.3s ease;
}

#arrows {
  position: absolute;
  top: 0;
  left: 0;
  /* z-index: 1; arrows behind boxes */
  pointer-events: none;
}



select {
  margin: 4px;
  padding: 2px;
}

button {
  margin-top: 20px;
  padding: 0.8em 1.5em;
  background: #b00;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
}

button:hover {
  background: #900;
}

#result {
  margin-top: 1em;
  font-weight: bold;
  font-size: 1.2em;
}
