/* Position figure relative */
figure {
  position: relative;
  margin: 0;
}

/* Button container */
.button-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 10px; /* Space between buttons */
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 10;
  width: 80%; /* Stretch the buttons but leave 10% padding on each side */
  justify-content: space-evenly; /* Distribute buttons evenly */
}

/* Buttons */
.download-btn,
.share-btn {
  flex-grow: 1; /* Allow buttons to stretch */
  padding: 10px 0; /* Add height to buttons */
  background: linear-gradient(90deg, #3a3a3a, #7a7a7a);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.3s, transform 0.2s;
  white-space: nowrap; /* Prevent text from breaking into a new line */
}

/* Hover effects */
.download-btn:hover,
.share-btn:hover {
  background: linear-gradient(90deg, #5a5a5a, #9a9a9a);
  transform: scale(1.05);
}

/* Show buttons on hover */
figure:hover .button-container {
  opacity: 1;
}

/* Notification styles */
.clipboard-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 16px;
  text-align: center;
  z-index: 1000;
  opacity: 1;
  animation: fadeOut 3s forwards;
}

/* Notification fade-out effect */
@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
