main {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.content {
  max-width: 1280px;
  width: 100%;
  background: rgba(17, 22, 32, 0.75);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.content-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#puzzle-area {
  position: relative;
  background: #fff;
  border-radius: 12px;
  min-height: 780px;
  border: 3px dashed #d4d4d8;
  overflow: hidden;
}

.piece {
  position: absolute;
  cursor: grab;
  user-select: none;
  transition: box-shadow 0.2s ease;
  will-change: transform, left, top;
}

.piece:active {
  cursor: grabbing;
}

.piece img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

#restart {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #4f46e5;
  color: #fff;
  border: none;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 15px 35px rgba(79, 70, 229, 0.35);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#restart.visible {
  opacity: 1;
  pointer-events: auto;
}

.debug-button {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #0f172a;
  color: #fff;
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  opacity: 0.85;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.debug-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

@keyframes glide-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-150vw);
  }
}

.piece.animate {
  animation: glide-left 3s ease-in-out forwards;
}
