body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-image: url("images_library/background sharkhack (1).png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.container {
  text-align: center;
  position: relative;
  z-index: 1; /* Ensure the content stays above sidebar */
}

.close-sidebar-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: transparent;
  font-size: 30px;
  color: white;
  border: none;
  cursor: pointer;
}

.close-sidebar-btn:hover {
  color: #f44336; /* Change color on hover */
}

/* Button to open the saved memes sidebar */
.open-library-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #6200ea;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.open-library-btn:hover {
  background-color: #3700b3;
}

/* Sidebar for saved memes */
.saved-memes-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 20px;
  overflow-y: auto;
  display: none; /* Hidden by default */
  box-shadow: -4px 0 6px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.saved-memes-sidebar h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

.saved-images-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
  align-items: center;
  overflow-y: scroll;
}

.saved-image {
  width: 80%;
  height: 200px;
  margin: 10px;
  cursor: pointer;
  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.saved-image:hover {
  transform: scale(1.05);
}

/* Form and meme generator styles */
input {
  padding: 10px;
  width: 300px;
  margin-bottom: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

button {
  padding: 10px 20px;
  background-color: #6200ea;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #3700b3;
}

#meme-container {
  position: relative;
  margin-top: 20px;
}

#meme {
  margin-top: 5vh;
  max-height: 50vh;
}

.caption {
  position: absolute;
  width: 100%;
  text-align: center;
  color: white;
  font-size: 20px;
  font-weight: bold;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

#top-caption {
  top: 10%;
}

#downloadBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #3700b3;
  border: none;
  margin: 20px auto;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
}

.download-icon {
  width: 20px;
  height: 20px;
  filter: invert(1);
}
