body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top, #0c3e68 0%, #10172d 45%, #03040a 100%);
  color: #f4f4f8;
  display: flex;
  justify-content: center;
  align-items: center;
}

.game-wrapper {
  width: 95%;
  max-width: 980px;
  text-align: center;
  padding: 25px;
}

h1 {
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #b9fff0, #78a8ff, #ffb7e8, #ffffff);
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 22px rgba(125, 210, 255, 0.25);
}

h2 {
  color: #e7f6ff;
}

.level-menu {
  margin: 20px 0;
}

.level-menu a {
  display: inline-block;
  margin: 5px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  color: #06111c;
  background: linear-gradient(145deg, #dffff8, #7bdcff, #ffc5ef);
  font-weight: bold;
  box-shadow: 0 0 16px rgba(160, 235, 255, 0.45);
}

.level-menu a.active {
  background: linear-gradient(145deg, #ffffff, #76ffc8, #ffaadf);
  box-shadow: 0 0 28px rgba(255, 185, 235, 0.9);
}

#puzzle {
  width: 560px;
  height: 560px;
  margin: 25px auto;
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 24px;
  background: linear-gradient(145deg, #c8fff4, #236fb0, #ffb2e6);
  box-shadow:
    0 0 40px rgba(77, 205, 255, 0.65),
    0 0 80px rgba(255, 160, 225, 0.28),
    inset 0 0 24px rgba(255, 255, 255, 0.35);
}

.piece {
  cursor: grab;
  border-radius: 12px;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 0 12px rgba(255,255,255,0.38),
    inset 0 0 26px rgba(0,0,0,0.42),
    0 5px 12px rgba(0,0,0,0.42);
  transition: transform 0.15s, box-shadow 0.15s;
}

.piece:hover {
  transform: scale(1.025);
  box-shadow:
    0 0 18px rgba(255, 190, 235, 0.95),
    inset 0 0 18px rgba(255,255,255,0.55);
}

.piece.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

button {
  border: none;
  padding: 12px 24px;
  margin: 8px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: bold;
  color: #06111c;
  background: linear-gradient(145deg, #ffffff, #83e8ff, #ffb6e7);
  box-shadow: 0 0 18px rgba(180, 235, 255, 0.5);
}

button:hover {
  filter: brightness(1.12);
}

#message {
  margin-top: 18px;
  min-height: 30px;
  font-size: 1.25rem;
  color: #f2fbff;
  text-shadow: 0 0 12px rgba(130, 220, 255, 0.75);
}

@media (max-width: 650px) {
  #puzzle {
    width: 90vw;
    height: 90vw;
  }
}
