body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-color: #f0f0f0;
}

.container {
  text-align: center;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}

.dragging {
  opacity: 0.8;
  cursor: grabbing;
  z-index: 10; /* Brings the piece on top */
}

.puzzle-piece {
  width: 193px;
  height: 193px;
  position: relative;
  cursor: grab;
  user-select: none;
  overflow: visible;
}

.piece-image {
  width: 250px !important;  
  height: 250px !important;
  display: block;
  position: absolute;
  bottom: 0;
  right: 0;
  pointer-events: none;  /* Make sure drag is handled by the div, not the img */
  transform-origin: center center;  /* Set rotation origin to the center */
}

body.grabbing {
  cursor: grabbing !important;
}

#controls { /*top left button bar */
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
}

.piece-number {
  position: absolute;
  top: 80px;/*50%;*/
  left: 80px; /*50%;*/
  transform: translate(-50%, -50%) rotate(0deg);  /* Ensure the number stays centered and upright */
  font-size: 24px;
  color: white;
  text-shadow: 1px 1px 2px black;
  pointer-events: none;  /* Ensure the number doesn't interfere with drag events */
}

.hidden-number {
  display: none;  /* Used for toggling visibility of the numbers */
}

#grid-container {
  position: relative;
  width: 768px; 
  height: 768px; 
  border: 2px solid #ccc; 
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.8); /* Optional: background for visibility */
  
}

.grid-cell {
  width: 192px;
  height: 192px;
  border: 1px dashed #aaa; /* Dashed lines for grid cells */
  box-sizing: border-box; /* Include padding and border in width/height */
  position: absolute;
  font-size: 50px;
  color: #aaa;
  padding-top: 60px; /*center the cell label without affecting the display property*/
}
