

body {
  background-image: url("/images/kitabg.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
}



/* FLIP BOOK */
input[name^="page"], input[id^="page"], #cover_checkbox {
  display: none;
}

input[type="checkbox"] {
  display: none;
}

.page_content ul {
  padding-left: 18px;
  margin: 4px 0;
}

.page_content li {
  font-size: 11px;
  line-height: 1.3;
  margin-bottom: 2px;
}

#flip_book {
  width: 298px;
  height: 500px;
  position: relative;
  margin: 40px auto;
  transition-duration: 1s;
  perspective: 2000px;
}


.page {
  width: 288px;
  height: 440px;
  position: absolute;
  top: 10px;
  left: 1px;
  border-radius: 0 5px 5px 0;
  background-color: #FCD9CA;
  transform-origin: left;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition-duration: 0.5s;
}

.front_page {
  width: 100%;
  height: 100%;
  position: absolute;
  backface-visibility: hidden;
}

.front_page label {
  width: 100%;
  height: 100%;
  position: absolute;
  cursor: pointer;
  z-index: 100;
}

.back_page {
  width: 100%;
  height: 100%;
  position: absolute;
  backface-visibility: hidden;
  transform: rotateY(180deg);
  z-index: 100;
}

.back_page label {
  width: 100%;
  height: 100%;
  position: absolute;
  cursor: pointer;
  z-index: 100;
}



#cover_page {
  width: 295px;
  height: 450px;
  position: absolute;
  top: 5px;
  left: 1px;
  border-radius: 2.5px 5px 5px 2.5px;
  transform-origin: left;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition-duration: 0.8s;
  z-index: 99;
}

#back_cover_page {
  width: 295px;
  height: 450px;
  position: absolute;
  top: 5px;
  left: 1px;
  border-radius: 2.5px 5px 5px 2.5px;
  transform-origin: left;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition-duration: 0.8s;
}

.cover-front {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10px;
  background-image: url("images/frontcover.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent;
  transform: translateZ(0);
}

.cover-back {
  background-color: #FCC0D7;
  backface-visibility: hidden;
}


.cover-sub {
  font-style: italic;
}

/* text-containing page content*/
.page_content {
  position: absolute;
  top: 1px;
  width: calc(100% - 50px);
  height: calc(100% - 2px);
  padding: 18px 16px;
  overflow-y: auto;
  z-index: 97;
  pointer-events: none;
}

.front_content {
  left: 1px;
  border-radius: 0 5px 5px 0;
}

.back_content {
  left: 1px;
  border-radius: 5px 0 0 5px;
}

.page_content h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.page_content p {
  margin: 10px 0;
  font-size: 0.85em;
}

.recipe-photo {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
}

.cover-text {
  font-size: 1.3em;
  font-style: italic;
  text-align: center;
  line-height: 300px;
  z-index: 10;
}

.edge_shading {
  width: 288px;
  height: 440px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 98;
  pointer-events: none;
}


/* cover opening */
#cover_checkbox:checked ~ #flip_book #cover_page {
  transform: rotateY(-180deg);
  z-index: 1;
}

#cover_checkbox:checked ~ #flip_book {
  transform: translateX(144px);
  transition: transform 0.8s ease;
}

#back_cover_checkbox:checked ~ #flip_book #back_cover_page {
  transform: rotateY(-180deg);
  z-index: 3;
}

#back_cover_checkbox:checked ~ #flip_book {
  transform: translateX(144px);
  transition: transform 0.8s ease;
}

/* resting stack order */
#cover_page{z-index: 15; }
#page1 { z-index: 12; }
#page2 { z-index: 10; }
#page3 { z-index: 8; }
#page4 { z-index: 6; }
#page5 { z-index: 4; }
#back_cover_page { z-index: 1; }

/* page flips  */
#page1_checkbox:checked ~ #flip_book #page1 { transform: rotateY(-180deg); z-index: 20; }
#page2_checkbox:checked ~ #flip_book #page2 { transform: rotateY(-180deg); z-index: 21; }
#page3_checkbox:checked ~ #flip_book #page3 { transform: rotateY(-180deg); z-index: 22; }
#page4_checkbox:checked ~ #flip_book #page4 { transform: rotateY(-180deg); z-index: 23; }
#page5_checkbox:checked ~ #flip_book #page5 { transform: rotateY(-180deg); z-index: 24; }
#back_cover_checkbox:checked ~ #flip_book #back_cover_page { transform: rotateY(-180deg); z-index: 25; }





