.canvas {
  width: 80%;
  height: 500px;
  background-color: #0f0f0f;
  background-image: radial-gradient(#333 1px, transparent 1px);
  background-size: 30px 30px; /* The dot grid */
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.card-stack {
  width: 200px;
  height: 250px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 15px;
  padding: 20px;
  color: #ccc;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Centers the initial stack */
  cursor: grab;
  user-select: none;
  touch-action: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card-stack:active { cursor: grabbing; }

.index {
  position: absolute;
  bottom: 15px;
  right: 15px;
  font-size: 12px;
  opacity: 0.5;
}

.reset-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: transparent;
  border: 1px solid #333;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}