
* {
  box-sizing: border-box;
}
body {
  font-family: Sans-serif;
}
/* @import url(https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,300italic,700); */
.shelf-wrap {
  display: block;
  margin: 30px auto;
  width: 590px;
  height: 308px;
  padding: 8px;
  background: #ccc;
  background-image: url(http://www.puntoinformaticofree.it/pagine_tutorial/scaffale/immagini/scaffale_scuro.jpg);
}
.shelf {
  width: 100%;
  height: 100%;
  padding: 5px;
  background: #ddd;
  background-image: url(http://www.puntoinformaticofree.it/pagine_tutorial/scaffale/immagini/scaffale_scuro.jpg);
}
.books {
  text-align: center;
  width: 100%;
  padding: 0 10px;
}
#book1 .front-cover,
#book1 .back-cover {
  background-color: black;
}
#book2 .front-cover,
#book2 .back-cover {
  background-color: #0000FF;
}
#book3 .front-cover,
#book3 .back-cover {
  background-color: #9999FF;
}
#book4 .front-cover,
#book4 .back-cover {
  background-color: #6AB;
}
#book5 .front-cover,
#book5 .back-cover {
  background-color: #006600;
}
#book6 .front-cover,
#book6 .back-cover {
  background-color: #D66;
}
#book7 .front-cover,
#book7 .back-cover {
  background-color: #668;
}
#book8 .front-cover,
#book8 .back-cover {
  background-color: #C53;
}
#book9 .front-cover,
#book9 .back-cover {
  background-color: #CC6600;
}
#book10 .front-cover,
#book10 .back-cover {
  background-color: #3399CC;
}
#book11 .front-cover,
#book11 .back-cover {
  background-color: #CC00FF;
}
#book12 .front-cover,
#book12 .back-cover {
  background-color: #3366FF;
}
#book13 .front-cover,
#book13 .back-cover {
  background-color: #666600;
}
#book14 .front-cover,
#book14 .back-cover {
  background-color: #990033;
}
#book15 .front-cover,
#book15 .back-cover {
  background-color: #009966;
}
#book16 .front-cover,
#book16 .back-cover {
  background-color: #999900;
}
.book {
  display: inline-block;
  position: relative;
  height: 125px;
  width: 105px;
  margin: 10px 5px;
  color: #FFF;
  text-align: left;
  font-family: 'Open Sans Condensed', sans-serif;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.8em;
  line-height: 1.25;
  -webkit-transition: all 0.33s ease-in-out;
  -webkit-perspective: 800px;
  transform: translateX(-8.925px);
  border-radius: 1px;
}
.book:hover {
  box-shadow: 0px 0px 0px 3px rgba(255, 225, 40, 0.9), 0px 1px 10px 3px rgba(0, 0, 0, 0.7);
}
.book .front-cover,
.book .back-cover,
.book .colophon {
  -webkit-transition: all 0.33s ease-in-out;
  border-radius: 1px;
}
.book .back-cover {
  position: relative;
  display: block;
  float: left;
  width: 17.85px;
  line-height: 17.85px;
  height: 100%;
  background-color: #DDD;
  background-size: 6000% 100%;
  background-position: left center;
  background-repeat: no-repeat;
  box-shadow: inset 0px 0px 0px 100px rgba(0, 0, 0, 0.03);
  box-shadow: inset -10px 0px 10px -10px rgba(255, 255, 255, 0.2);
  transform: rotateY(-90deg);
  transform-origin: right;
  font-size: 70%;
}
.book .back-cover .container {
  padding: 0px 0px;
  height: 17.85px;
  width: 125px;
  float: left;
  position: absolute;
  bottom: 0;
  top: 100%;
  left: 0;
  right: 100%;
  display: block;
  transform: rotate(-90deg);
  transform-origin: 0 0;
  padding: 0px 6px;
  vertical-align: middle;
}
.book .back-cover .title {
  float: left;
  width: 70%;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.book .back-cover .author {
  float: left;
  text-align: right;
  width: 30%;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.book .front-cover {
  float: left;
  position: relative;
  width: 87.15px;
  height: 100%;
  background-color: #DDD;
  background-size: 100% 100%;
  background-position: center center;
  background-repeat: no-repeat;
  transform: rotateY(0deg);
  transform-origin: left;
  transform-style: preserve-3d;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
  display: flex;
  flex-flow: row;
  align-items: center;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  box-shadow: 0px 2px 4px 1px rgba(0, 0, 0, 0.1);
}
.book .front-cover .container {
  padding: 10.5px;
  position: relative;
}
.book .front-cover .container * {
  width: 57.15px;
}
.book .title {
  font-size: 88%;
  font-weight: 600;
  margin-bottom: .2em;
  text-transform: uppercase;
}
.book .subtitle {
  font-size: 75%;
  font-weight: 400;
  font-style: italic;
  margin-bottom: .2em;
}
.book .author {
  font-size: 90%;
  font-weight: 200;
  margin-top: .2em;
  margin-bottom: .2em;
}
.book .publisher {
  font-size: 75%;
  font-weight: 600;
  margin-top: 12.5px;
  margin-bottom: 0;
  align-self: flex-end;
}
.book .colophon {
  width: 87.15px;
  height: 125px;
  float: left;
  display: block;
  color: #554F49;
  background-color: #FAF6F3;
  color: #FFF;
  background-color: rgba(0, 0, 0, 0.2);
  position: absolute;
  top: 0;
  left: 0;
  text-align: center;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
  opacity: 0;
  transform: translateX(100%);
}
.book .colophon .container {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 10.5px;
}
.book:hover .back-cover {
  transform: rotateY(0deg);
}
.book:hover .front-cover {
  transform: rotateY(92.5deg);
}
.book:hover .colophon {
  opacity: 1;
  transform: translateX(17.85px);
}
.img-cover .front-cover * {
  display: none;
}
.spines:active .book {
  width: 17.85px;
  margin-left: 2px;
  margin-right: 2px;
}
.spines:active .book .front-cover {
  transform: rotateY(110deg);
  width: 0;
  opacity: 0;
}
.spines:active .book .back-cover {
  transform: rotateY(0deg);
  z-index: 1;
}
.spines:active .book .colophon {
  width: 0;
  opacity: 0;
}
