body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  text-align: center;
  background: #f0f0f0;
}

header {
  background: #222;
  color: white;
  padding: 10px 0;
}

#pixel-wall {
  display: grid;
  grid-template-columns: repeat(1000, 10px); /* 500.000 pixel = 1000 x 500 */
  gap: 1px;
  justify-content: center;
  margin: 20px auto;
  width: 100%;
  max-width: 100vw;
  height: 80vh;
  overflow: auto;
  border: 2px solid #333;
}

.pixel {
  width: 10px;
  height: 10px;
  background: #ddd;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

/* Hover normale */
.pixel:hover {
  outline: 1px solid red;
  opacity: 0.8;
}

/* Pixel liberi evidenziati */
.pixel.free:hover {
  outline: 2px solid green;
  box-shadow: 0 0 10px 3px green;
  transform: scale(1.2);
}

/* Animazione pixel acquistato/selezionato */
@keyframes flashPixel {
  0% { box-shadow: 0 0 5px 2px yellow; transform: scale(1); }
  50% { box-shadow: 0 0 15px 5px yellow; transform: scale(1.2); }
  100% { box-shadow: 0 0 5px 2px yellow; transform: scale(1); }
}

.pixel.flash {
  animation: flashPixel 0.5s ease-in-out;
}

#buy-section {
  margin: 20px auto;
}