#bookcase {
    margin: var(--std-margin);
    display: flex;
    flex-flow: column wrap;
    box-shadow: var(--shadow);
}

.shelf {
    background-image: url(/i/reviews/b/wood.png);
    height: 250px;
    background-size: cover;

    border: 15px transparent solid;
    border-bottom: 0px transparent solid;
    border-image: radial-gradient(#281305, #482515) 1;

    display: flex;
    align-items: end;
    justify-content: space-evenly;
}

#last.shelf {
    border-bottom: 15px transparent solid;
}

 /* ======= Modal Styling ======= */
.modal {
    display: none;
    position: fixed;
    z-index: 99;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal.link {
    background-color: transparent;
}

/* Actual content box */
.modal > div {
    background-color: #fefefe;
    margin: 15vh auto;
    padding: 20px;
    width: 33%;
    max-height: 375px;
    overflow: scroll;
}

.modal h2 {
    font-family: "Home Video", monospace;
    color: var(--accent);
    font-size: 1.2em;
}

.modal p {
    font-family: Courier, monospace;
    text-indent: 25px;
}

.modal a:hover {
    font-family: Courier, monospace;
    color: var(--text-color-invert);
    background-color: var(--accent);
}

/* Close button */
.close {
    color: #aaa;
    float: right;
    font-size: 16px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: url('/i/cursor2.png'), pointer;
} 

/* The following CSS was adapted from
    omer cetin - https://codepen.io/omercetin/pen/abOKPjo 
*/

.book {
    width: 145px;
    height: 90%;
    position:relative;
    box-shadow: var(--shadow);
    margin-bottom: 5px;
}

.book-cover {
    position: absolute;
    z-index:1;
    width: 100%;
    height: 100%;
    transform-origin: 0 50%;
    -webkit-transform-origin: 0 50%;
    border-radius: 3px;
    box-shadow: 
    inset 4px 1px 3px #ffffff60,
    inset 0 -1px 2px #00000080;
    transition: all .5s ease-in-out;
    -webkit-transition: all .5s ease-in-out;
}

.book:hover .book-cover {
    cursor: url('/i/cursor2.png'), pointer;
    transform: perspective(2000px) rotateY(-30deg);
    -webkit-transform: perspective(2000px) rotateY(-30deg);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    box-shadow: 
    inset 4px 1px 3px #ffffff60,
    inset 0 -1px 2px #00000080,
    10px 0px 10px -5px #00000030
}

.book-inside{
    width: calc(100% - 2px);
    height:96%;
    position:relative;
    top: 2%;
    border: 1px solid grey;
    border-radius:3px;
    background: white;
    box-shadow: 
    10px 40px 40px -10px #00000030,
    inset -2px 0 0 grey,
    inset -3px 0 0 #dbdbdb,
    inset -4px 0 0 white,
    inset -5px 0 0 #dbdbdb,
    inset -6px 0 0 white,
    inset -7px 0 0 #dbdbdb,
    inset -8px 0 0 white,
    inset -9px 0 0 #dbdbdb;
}

/* ========= MOBILE FORMATTING ========= */
@media screen and (max-width: 1200px) {
    .modal > div {
        width: 75%;
    }

    .shelf {
        height: 145px;
    }

    .book {
        width: 80px
    }
}