body {
  font-family: sans-serif;
  text-align: center;
  background: #fafafa;
  margin-top: 20px;
}

h1 {
  font-size: 2em;
  margin-bottom: 20px;
}

.puzzle-container {
  width: 300px;
  height: 300px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-template-rows: repeat(3, 100px);
  gap: 2px;
}

.tile {
  width: 100px;
  height: 100px;
  background-color: #ddd;
  cursor: grab;
  box-shadow: inset 0 0 5px #0005;
  transition: transform 0.1s ease;
  background-repeat: no-repeat;
  background-size: 300px 300px; /* Ukuran total gambar puzzle */
}

.tile.empty {
  background: #eee;
  cursor: default;
}

.tile:active {
  transform: scale(0.98);
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;
  margin: auto;
}

.menu button {
  padding: 10px;
  font-size: 16px;
  border-radius: 10px;
  border: none;
  background: #1e90ff;
  color: white;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: 0.2s;
}

.menu button:hover {
  background: #187bcd;
}
.box-animation {
  width: 100px;
  height: 100px;
  margin: 20px auto;
  background: url('https://i.imgur.com/Z2aRKeQ.gif') center center no-repeat;
  background-size: contain;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}

#gacha-result img {
  max-width: 100px;
  margin-top: 0.5rem;
}
