body {
  margin: 0;
  font-family: "Patrick Hand", cursive;
  background: #fdfdf8;
  overflow: hidden;
}

/* Floating Toolbar */
.toolbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  padding: 10px;
  border-radius: 30px;
  display: flex;
  gap: 10px;
}

.toolbar button {
  background: #2563eb;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
}

.toolbar button:hover {
  background: #1d4ed8;
}

/* Canvas */
#canvas {
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* Components (Sticky Notes) */
.component {
  position: absolute;
  width: 160px;
  padding: 8px;
  border: 2px dashed #333;
  border-radius: 8px;
  transform: rotate(-1deg);
  cursor: grab;
}

.component.client { background: #fff59d; }
.component.server { background: #bbdefb; }
.component.db { background: #c8e6c9; }
.component.cache { background: #e1bee7; }
.component.cdn { background: #ffe0b2; }

.component input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 16px;
  text-align: center;
  outline: none;
}

.component textarea {
  width: 100%;
  height: 45px;
  border: none;
  background: rgba(255,255,255,0.6);
  margin-top: 4px;
  font-size: 13px;
}

/* SVG */
svg {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.flow {
  stroke-dasharray: 6;
  animation: dash 1s linear infinite;
}

@keyframes dash {
  to { stroke-dashoffset: -12; }
}

.label {
  position: absolute;
  background: white;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid #aaa;
}
