body {
  font-family: sans-serif;
  padding: 2rem;
  background: #f8f8f8;
}

h1 {
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  max-width: 100%;
  margin: 0 auto;
}

a {
  text-decoration: none;
  color: inherit;
}

.icon {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  aspect-ratio: 1 / 1; /* čtverec */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s ease;
  position: relative;
}

.icon:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.icon svg {
  width: 24px;
  height: 24px;
  display: block;
  stroke-width: 1.5px;
  stroke: #000; 
}

.icon-name {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.icon:hover .icon-name {
  opacity: 1;
}