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

body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(69,72,77,1) 0%,rgba(0,0,0,1) 100%);
}

.gallery {
  position: relative;
  width: 95%;
  height: 100%;
  perspective: 500px;
  display: flex;
  overflow: hidden;
}

.gallery .item {
  position: absolute;
  top: calc(50% - 150px);
  left: calc(50% - 100px);
  width: 200px;
  height: 300px;
  transition: 0.8s ease;
  transform-origin: bottom;
  cursor: pointer;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.6);
  -webkit-box-reflect: below 1px linear-gradient(transparent, transparent, #0002);
}

.gallery .item:nth-child(1) { transform: translate3d(-250px, 0, 0) scale(0.8) rotateY(25deg); z-index: 1; }
.gallery .item:nth-child(2) { transform: translate3d(-250px, 0, 0) scale(0.8) rotateY(25deg); z-index: 2; }
.gallery .item:nth-child(3) { transform: translate3d(-150px, 0, 0) scale(0.9) rotateY(15deg); z-index: 3; }
.gallery .item:nth-child(4) { transform: scale(1) rotateY(0deg); z-index: 4; }
.gallery .item:nth-child(5) { transform: translate3d(150px, 0, 0) scale(0.9) rotateY(-15deg); z-index: 3; }
.gallery .item:nth-child(6) { transform: translate3d(250px, 0, 0) scale(0.8) rotateY(-25deg); z-index: 2; }
.gallery .item:nth-child(7) { transform: translate3d(250px, 0, 0) scale(0.8) rotateY(-25deg); z-index: -1; }

.item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.buttons {
  position: absolute;
  bottom: 75px;
  display: flex;
  gap: 20px;
}

.buttons span {
  position: relative;
  width: 80px;
  height: 40px;
  border: 2px solid #d0d0d0;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.6;
}

.buttons span:hover {
  opacity: 1;
}

.modal {
  display: none;
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal img {
  max-width: 90%;
  max-height: 90%;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 30px;
  cursor: pointer;
}
