:root {
  --fridge-1: #e9eef2;
  --fridge-2: #c8d2da;
  --fridge-edge: #95a3ad;
  --magnet-bg: #fdfbf3;
  --magnet-edge: #d8cfa9;
  --ink: #1c1c1c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #2a2a2a;
  color: #f0f0f0;
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: #111;
  border-bottom: 1px solid #333;
  height: 52px;
}

.toolbar h1 {
  font-size: 1rem;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.04em;
  flex: 1;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #aaa;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b33;
  box-shadow: 0 0 6px rgba(255, 80, 80, 0.6);
}
.dot.connected {
  background: #3c3;
  box-shadow: 0 0 6px rgba(80, 220, 100, 0.7);
}

#reset {
  background: #444;
  color: #f0f0f0;
  border: 1px solid #666;
  border-radius: 4px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
}
#reset:hover { background: #555; }
#reset:active { background: #333; }

#fridge {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(180deg, var(--fridge-1) 0%, var(--fridge-2) 100%);
  overflow: hidden;
}

#board {
  position: relative;
  width: 100%;
  height: 100%;
}

/* faint vertical brushed-metal stripes */
#fridge::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.03) 0 2px,
    rgba(0,0,0,0.03) 2px 4px
  );
  pointer-events: none;
}

.magnet {
  position: absolute;
  background: var(--magnet-bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  padding: 5px 9px;
  border: 1px solid var(--magnet-edge);
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 -1px 0 rgba(0, 0, 0, 0.08) inset,
    1px 2px 3px rgba(0, 0, 0, 0.25);
  cursor: grab;
  white-space: nowrap;
  touch-action: none;
  transition: box-shadow 0.12s ease;
}

.magnet:active,
.magnet.dragging {
  cursor: grabbing;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 -1px 0 rgba(0, 0, 0, 0.08) inset,
    3px 6px 10px rgba(0, 0, 0, 0.3);
}

.magnet.remote-dragging {
  outline: 1px dashed rgba(40, 100, 200, 0.5);
}
