html, body {
  height: 100%;
  margin: 0;
  min-height: 100%;
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;   /* dark background for contrast */
  font-family: sans-serif;
  transform: scale(.8);
}

/* ===== GRID ===== */
section {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 10px;
  padding: 10px;
}

/* ===== TILE ===== */
a {
  width: 140px;
  height: 140px;
  background: #333;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;

  /* smooth background change */
  transition: background 0.7s ease;
}

/* 🔑 Spin only once, slowly */
a:hover {
  background: green; /* color change */
  animation: spinOnce 3s ease forwards; /* spin duration & easing */
}

@keyframes spinOnce {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

a i {
  color: #fff;
  font-size: 48px;
}

.tile img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}
