/* ── Board background ── */
#board-container {
  background: linear-gradient(135deg, #8ec5fc 0%, #e0c3fc 40%, #a8edea 70%, #fed6e3 100%);
}

/* ── Pill-shaped path tiles (rotated along path tangent) ── */
.space {
  position: absolute;
  width: 46px;
  height: 28px;
  border-radius: 14px;
  border: 2.5px solid rgba(255,255,255,0.75);
  box-shadow: 0 2px 6px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  will-change: transform;
  /* transform is set inline: translate(-50%,-50%) rotate(Xdeg) */
}

/* Color fills */
.space-red    { background: linear-gradient(135deg, #f44336, #d32f2f); }
.space-purple { background: linear-gradient(135deg, #9c27b0, #7b1fa2); }
.space-yellow { background: linear-gradient(135deg, #ffeb3b, #f9a825); }
.space-blue   { background: linear-gradient(135deg, #2196f3, #1565c0); }
.space-orange { background: linear-gradient(135deg, #ff9800, #e65100); }
.space-green  { background: linear-gradient(135deg, #4caf50, #2e7d32); }

/* Start tile */
.space-start {
  width: 54px;
  height: 34px;
  background: linear-gradient(135deg, #fff, #ffe0f0);
  border-color: #ff6ec7;
  border-width: 3px;
}

/* Win tile (castle) */
.space-win {
  width: 62px;
  height: 38px;
  background: linear-gradient(135deg, #ffd700, #ff9800);
  border-color: #fff;
  border-width: 3.5px;
  box-shadow: 0 0 16px rgba(255,215,0,0.7), 0 3px 8px rgba(0,0,0,0.3);
}

/* Special spaces: larger pill with gold glow */
.space.special {
  width: 56px;
  height: 34px;
  border-width: 3px;
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255,215,0,0.65), 0 2px 6px rgba(0,0,0,0.3);
}

/* Special space icon — counter-rotated so it stays upright */
.space.special .special-icon {
  position: absolute;
  top: -26px;
  left: 50%;
  width: 36px;
  height: 36px;
  object-fit: contain;
  transform: translateX(-50%) rotate(calc(-1 * var(--tile-angle, 0deg)));
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  pointer-events: none;
}

.space.special .special-emoji {
  position: absolute;
  top: -28px;
  left: 50%;
  font-size: 22px;
  transform: translateX(-50%) rotate(calc(-1 * var(--tile-angle, 0deg)));
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

/* Label counter-rotated below the tile */
.space.special .special-label {
  position: absolute;
  bottom: -17px;
  left: 50%;
  transform: translateX(-50%) rotate(calc(-1 * var(--tile-angle, 0deg)));
  font-size: 8px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  white-space: nowrap;
  font-family: 'Bubblegum Sans', cursive;
  pointer-events: none;
}

/* Start label */
.start-text {
  font-size: 9px;
  color: #ff6ec7;
  font-family: 'Bubblegum Sans', cursive;
  text-align: center;
  pointer-events: none;
  line-height: 1;
}

.win-icon {
  font-size: 20px;
  line-height: 1;
}

/* ── Art placeholder frames ── */
.art-frame {
  position: absolute;
  border: 2px dashed rgba(255,255,255,0.45);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-family: 'Bubblegum Sans', cursive;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  white-space: pre-line;
  line-height: 1.5;
  pointer-events: none;
  z-index: 0;
}
