.slideshow {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
  overflow: hidden;
}

.slide {
  position: absolute;
  width: 100%;
  left: 0;
  top: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: block; /* Always display but with 0 opacity when not active */
}

.slide img {
  width: 100%;
  height: auto;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

/* First slide needs to be positioned relatively to set the height of the container */
.slideshow .slide:first-child {
  position: relative;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 24px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.slide-number {
  position: absolute;
  bottom: 10px;
  right: 10px;
  color: white;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 3px;
  z-index: 2;
}

.audio-controls {
  text-align: center;
  margin: 15px auto;
}

.audio-btn {
  background: #333;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 5px;
  font-size: 16px;
}

.audio-btn:hover {
  background: #555;
}

.volume-control {
  width: 100px;
  margin: 0 10px;
  vertical-align: middle;
}

.autoplay-notice {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-bottom: 10px;
  padding: 5px;
  background-color: #f8f8f8;
  border-radius: 4px;
  display: none;
}

.autoplay-notice.show {
  display: block;
}

.slideshow-controls {
  text-align: center;
  margin: 10px auto;
}

.slideshow-btn {
  background: #333;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 5px;
  font-size: 16px;
}

.slideshow-btn:hover {
  background: #555;
}