*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
   font-family: 'Montserrat', sans-serif;
   font-size: 16px;
   color: #005595;
   background-color: #FCF7D8;
   margin: 0;
   padding: 0;
   cursor: none;
}

#handwashGame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 30px auto;
  text-align: center;
}

#grid {
  display: grid;
  grid-template-columns: repeat(3, 140px);
  grid-template-rows: repeat(3, 140px);
  gap: 12px;
  margin: 20px auto;
  justify-content: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 140px);
  grid-template-rows: repeat(3, 140px);
  gap: 10px;
  justify-content: center;
  margin: 20px auto;
}

.cell {
  width: 140px;
  height: 140px;
  background-color: #dff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: 80px;
  background-repeat: no-repeat;
  background-position: center;
}

#playerHand {
  width: 40px;
  height: 40px;
  background-image: url('kez1.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: fixed;
  pointer-events: none; /* hogy ne zavarja a kattintást */
  z-index: 1000;
  transform: translate(-50%, -50%);
}

.cell:hover {
  transform: scale(1.05);
}

.cell img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.restart-btn {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 1rem;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease;
}

.restart-btn:hover {
  background-color: #388e3c;
}

.hidden {
  display: none;
}

.scoreboard {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
@media screen and (max-width: 600px) {
  #grid,
  .grid {
    grid-template-columns: repeat(3, 90px);
    grid-template-rows: repeat(3, 90px);
    gap: 8px;
  }

  .cell {
    width: 90px;
    height: 90px;
    background-size: 50px;
  }

  .cell img {
    width: 50px;
    height: 50px;
  }

  #playerHand {
    width: 30px;
    height: 30px;
  }

  .scoreboard {
    font-size: 1rem;
  }

  h2 {
    font-size: 1.4rem;
  }
}
