body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background: #f5f5f5;
}

.container {
  display: flex;
  gap: 50px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 20px;
}

/* Common styles for all items */
.hover-text-container, .popup-item {
  position: relative;
  width: 240px;
  height: 240px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: visible;
}

.hover-text-container img, .popup-item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s;
  padding: 10px;
}

.hover-text-container:hover img, .popup-item:hover img {
  transform: scale(1.05);
}

.hover-text {
  position: absolute;
  bottom: -45px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 24px;
  border-radius: 15px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  font-size: 24px;
  z-index: 10;
}

.hover-text-container:hover .hover-text, .popup-item:hover .hover-text {
  opacity: 1;
} 