.carousel {
  width: 80%;
  margin: 16px auto;
}

.container {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  display: flex;
  transition: transform 0.3s;
}

li {
  height: 100%;
  min-width: 100%;
}

li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#prev,
#next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0, 0, 0, .8);
  color: #fff;
  font-size: 24px;
  padding: 0 8px 4px;
  cursor: pointer;
}

#prev:hover,
#next:hover {
  opacity: .8;
}

#prev {
  left: 0;
}

#next {
  right: 0;
}

.hidden {
  display: none;
}

nav {
  margin-top: 16px;
  text-align: center;
}

nav button + button {
  margin-left: 8px;
}

nav button {
  border: none;
  width: 16px;
  height: 16px;
  background: #ddd;
  border-radius: 50%;
  cursor: pointer;
}

nav .current {
  background: #999;
}