body {
  font-family: Comic Sans MS, sans-serif;
  text-align: center;
  background: #f9f9f9;
}

h1 {
  color: #ff66aa;
  margin-top: 20px;
}

.selectable {
  width: 265px;
  height: 265px;
  margin: 5px;
  border: 3px solid transparent;
  cursor: pointer;
  transition: border 0.3s;
}

.selectable:hover {
  border: 3px solid #ff66aa;
}

button {
  padding: 10px 20px;
  margin: 10px;
  font-size: 1em;
  cursor: pointer;
}

#puzzle-container {
  width: 300px;
  height: 300px;
  margin: 20px auto;
  position: relative;
  border: 4px solid #aaa;
  display: flex;
  flex-wrap: wrap;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.piece {
  background-size: cover;
  position: absolute;
  cursor: grab;
  transition: box-shadow 0.2s;
}

.piece.correct {
  box-shadow: 0 0 10px green;
  transform: scale(1.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#timer {
  font-size: 1.2em;
  margin: 10px 0;
}

.hidden {
  display: none;
}

#congrats {
  margin-top: 20px;
  font-size: 2em;
  color: #4CAF50;
  text-shadow: 2px 2px 4px #ccc;
  font-weight: bold;
  animation: popIn 0.5s ease-in-out;
}

@keyframes popIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@@media screen and (max-width: 650px) {
  body {
    overflow-x: hidden; /* Megakadályozzuk a jobbra-balra scrollozást */
  }

  #puzzle-container {
    width: 300px;
    height: 300px;
    transform: none; /* Fix méret, nincs lekicsinyítés */
    margin: 20px auto;
  }

  #image-select {
    display: flex;
    flex-direction: column; /* Függőleges elrendezés */
    align-items: center;
    gap: 10px;
    padding: 0 10px;
  }

  .selectable {
    width: 80%;  /* Kisebb képméret mobilon */
    height: auto;
    max-width: 265px; /* Ne legyen nagyobb mint eredetileg */
    margin: 5px auto;
  }
}