@import url("https://fonts.googleapis.com/css2?family=Playfair+Display&family=Poppins:wght@300;400;500;600&display=swap");
/* 
font-family: 'Playfair Display', serif; */

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Playfair Display", serif;
  background-image: url("https://wallpaper.dog/large/969704.jpg");
  background-position: cover;
  background-repeat: no-repeat;
}

input {
  display: none;
}

img {
  width: 100%;
  height: 100%;
}

.book {
  display: flex;
  margin-right: -195px;
}

#cover {
  width: 350px;
  height: 500px;
}

.flip-book {
  width: 350px;
  height: 500px;
  position: relative;
  perspective: 1500px;
}

.flip {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: left;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: 0.5s;
  color: #000;
}

.front {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;

  background-color: #fff;
  box-sizing: border-box;
  padding: 0 10px;
  box-shadow: inset 20px 0 50px rgba(0, 0, 0, 0, 5) 0 2px 5px rgba(0, 0, 0, 0.5);
}

.back {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;

  z-index: 99;
  transform: rotateY(180deg);
  backface-visibility: hidden;
  background-color: #000;
}

.next-btn {
  position: absolute;
  bottom: 13px;
  right: 13px;
  cursor: pointer;
  color: #000;
}

.back-btn {
  position: absolute;
  bottom: 13px;
  right: 13px;
  cursor: pointer;
  color: #fff;
}

#p1 {
  z-index: 3;
}

#p2 {
  z-index: 2;
}

#p3 {
  z-index: 1;
}

#c1:checked ~ .flip-book #p1 {
  transform: rotateY(-180deg);
  z-index: 1;
}

#c2:checked ~ .flip-book #p2 {
  transform: rotateY(-180deg);
  z-index: 2;
}

#c3:checked ~ .flip-book #p3 {
  transform: rotateY(-180deg);
  z-index: 3;
}
