* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  width: 100%;
  object-fit: cover;
  user-select: none;
}

body {
  min-height: 100vh;
  background-color: #000;

  display: flex;
  justify-content: center;
  align-items: center;
}

.galleries {
  position: relative;
  
  width: 200px;
  height: 200px;

  transform-style: preserve-3d;
  transform: perspective(1000px) rotateY(0);
  transition: 1.5s;
}

.galleries span {
  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;
  
  transform: rotateY(calc(var(--i) * 45deg)) translateZ(300px);
  -webkit-box-reflect: below 0px linear-gradient(transparent, transparent, #0004);
}

.arrows {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  column-gap: 30px;

  color: #fff;
}

.arrows .arrow {
  width: 60px;
  height: 60px;
  border: 2px solid #fff;
  border-radius: 50%;
  
  display: flex;
  justify-content: center;
  align-items: center;

  cursor: pointer;
}
.arrows .arrow::before {
  content: "";

  width: 15px;
  height: 15px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
  
  transform: rotate(45deg) translate(-2.5px, 2.5px);
}
.arrows .arrow.prev::before {
  transform: rotate(-135deg) translate(-2.5px, 2.5px);
}

.arrows .arrow:active {
  background-color: #fff;
}
.arrows .arrow:active::before {
  border-color: #000;
}


@media screen and (max-width: 768px) {
  .galleries {
    width: 150px;
    height: 150px;
  }
  
  .galleries span {
    transform: rotateY(calc(var(--i) * 45deg)) translateZ(250px);
  }

  .arrows {
    bottom: 1vh;
  }
}
