*{
  --first-highlight-color: thistle;
  --main-bg-color: #f5f3f0;
  --text-color: black;
  --second-highlight-color: bisque;
  --active-color:#b8b8b8;
  --uni-blue: #153268;
  --uni-logo-dark: #005f9b;
  --uni-logo-medium: #0091c8;
  --uni-logo-light:#50a5d2;

}
body {
	display: grid;
    grid-template-columns: auto;
    grid-template-rows: auto  auto 4em;
    gap: 1em 1em;
    grid-template-areas:
      "header"
      "main"
      "footer";
    margin: 50px;
    background-color: var(--main-bg-color);
    font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

}
header{
	/* background-image: url(header.png); */
  background:linear-gradient(to left, var(--uni-logo-medium), rgba(0, 0, 0, 0));
}
header,footer{
	display:inline-flex;
	justify-content: space-between;
	align-items: center;
}
header,main,footer{
	/* border: 1px solid black; */
	padding: 0.5em;
}
.books{
  width: auto;
  margin-bottom: 1em;
}
ul{
  display:flex;
  flex-direction: column;
  list-style-type: none;
}
li{
  margin: 0.5em;
}
.books#cover_view{
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}
  .book#cover_view,.list#cover_view,.book#modal,#fav_img{
    justify-content: center;
    align-items: center;
    transition-property: transform, box-shadow;
    transition-duration: 0.4s;
  }
  .book#cover_view,.list#cover_view{
    width: 100px;
    height: 140px;
    overflow: scroll;
    border: 0.5px solid black;
    border-radius: 2px 4px 4px 2px;
  }
  .list#cover_view{
    width:70px;
    height: 100px;
  }
  .book:hover{
    cursor: pointer;
  }
  .book#modal{
    border: 1.5px solid black;
    border-radius: 4px 6px 6px 4px;
    width:230px;
    height:310px;
    }
  .book#cover_view:hover,.list#cover_view:hover ,.book#modal:hover,#fav_img:hover{
    transform: perspective(800px) rotateY(-30deg) ;
  }
  .book#cover_view:hover,.list#cover_view:hover, .book#modal:hover,#fav_img:hover{
    box-shadow: #625d6166 5px 5px, #625e604d 10px 10px, #a9a9a933 15px 15px, #d4d4d41a 20px 20px, #dddddd0d 25px 25px;
    cursor: pointer;
  }
  .book#list_view{
    display: flex;
    gap: 0.5em;
  }
.modal-content{
    position: relative;
    display: grid; 
    grid-template-columns: auto 1fr 1fr; 
    grid-template-rows: 0.5fr repeat(4, auto); 
    gap: 0.1em 0.1em; 
}
.modal-content  p{
  margin-top: 0em;
  margin-bottom: 0.5em;
}
.grid_item {
  /* border: 1px solid red; */
  padding: 0.5em;

}
#title_authors{
  grid-area: 1 / 2 / 2 / 4; 
}
#subtitle{
  font-size: large;
}
#title{
  font-size: x-large;
}
#author{
  background-color: var(--first-highlight-color);
  display: inline;

}
.list#title{
  font-size: large;
  margin-top: 0px;
  margin-bottom: 0.3em;
  max-width: 600px;
  overflow: hidden;
white-space: nowrap;

  text-overflow: ellipsis;
}
.list#subtitle{
  font-size: medium;
  margin-top: 0px;

  margin-bottom: 0.3em;
  max-width: 300px;
  overflow: hidden;
white-space: nowrap;

  text-overflow: ellipsis;
}
.list#authors{
  margin-bottom: 0.5em;
}

#cover{
  grid-area: 1 / 1 / 6 / 2;
  margin-inline-end: 1em;
}
#description_container{
  grid-area: 2 / 2 / 3 / 4;
}
#details{
  grid-area: 3 / 2 / 6 / 4; 
  display: flex;
  flex-direction: column;
  align-items: baseline;
}
#description{
  height:20px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#description.more{
  height:auto;
  overflow: auto;
  white-space: normal;
}
.stat{
  display: flex;
  gap: 0.6em;
  align-items: baseline;

}
.statname{
  font-variant: small-caps;
  background-color: var(--second-highlight-color);
}
.pill{
  height: fit-content;
  padding: 0.3em 0.5em;
  border: 1px solid black;
  border-radius: 25px;
  margin: auto;
  display: inline;
}
#close{
  position:absolute;
  top: 0;
  right: 0;
  cursor: pointer;
  border-radius: 30%;
  background-color:white;
  transition: background-color 0.5s;
}
#close:hover{
  background-color:gainsboro;
}
p.title {
    font-family: monospace;
    font-size: 10px;
    text-align: center;
    text-shadow: -1px 1px 0px #000;
    color: #fff;
    width: 92%;
    margin-left: 4%;
    margin-top: 20px;
}
p.author {
  font-family: monospace;
  font-size: 8px;
  text-align: center;
  text-shadow: -1px 1px 0px #000;
  color: #eee;
  width: 90%;
  margin-left: 5%;
  padding-top: 20px;
}
#information{
	display:flex;
	text-align: left;
  flex-direction: column;
  gap: 0.3em;
}
#book_cover{
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
}

/***** MODAL DIALOG ****/
	#book_detail {
	/* Underlay covers entire screen. */
	position: fixed;
	top:0px;
	bottom: 0px;
	left:0px;
	right:0px;
	background-color:rgba(0,0,0,0.5);
	z-index:1000;

	/* Flexbox centers the .modal-content vertically and horizontally */
	display:flex;
	flex-direction:column;
	align-items:center;

	/* Animate when opening */
	animation-name: fadeIn;
	animation-duration:150ms;
	animation-timing-function: ease;
}
#book_detail > .modal-underlay {
	/* underlay takes up the entire viewport. This is only
	required if you want to click to dismiss the popup */
	position: absolute;
	z-index: -1;
	top:0px;
	bottom:0px;
	left: 0px;
	right: 0px;
}
#book_detail > .modal-content {
	/* Position visible dialog near the top of the window */
	margin-top:10vh;
	margin-bottom:10vh;

	/* Sizing for visible dialog */
	width:80%;
	max-width:800px;

	/* Display properties for visible dialog*/
	border:solid 1px #999;
	border-radius:8px;
	box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.3);
	background-color:white;
	padding:10px;
	overflow: scroll;
  max-height: 800px;

	/* Animate when opening */
	animation-name:zoomIn;
	animation-duration:150ms;
	animation-timing-function: ease;
}
#book_detail.closing {
	/* Animate when closing */
	animation-name: fadeOut;
	animation-duration:150ms;
	animation-timing-function: ease;
}
#book_detail.closing > .modal-content {
	/* Animate when closing */
	animation-name: zoomOut;
	animation-duration:150ms;
	animation-timing-function: ease;
}
.current_page{
  background-color: var(--active-color);
}
#search,#sort,#pagination{
  border: 1px solid black;
  padding: 5px;
  height: 28px;
  border-radius: 5px;
  outline: none;
  box-shadow: 2px 2px 0px 0px black;
}
input[type="radio"]{
  position:absolute;
  opacity: 0;
}
.radio-label{
  display: flex;
  align-items: center;
  gap: 0.2em;
}
.radio-label:hover{
  cursor:pointer;
}
input[type="radio"]:checked + label{
  background-color: var(--active-color);
}
form{
  display:flex;
  gap:0.5em;
}

main{
  display: flex;
  flex-direction: column;
  align-items: baseline;
  gap: 0.5em;
}

#more, #link {
  text-decoration-line: underline;
  text-decoration-style: wavy;
  cursor: pointer;
}
#banner{
  max-width: 100%;
}
#banners{
  display: inline-flex;
  flex-direction: row;
  gap: 0.2em;
  flex-wrap: wrap;
}
#fav_covers{
  aspect-ratio: 0.58;
  width: 100%;
  display: inline-flex;
  flex-direction: column;
  gap: 0.2em;
  flex-wrap: wrap;
}
#fav {
  width: calc(100%/4);
}
#fav_img{
  width: 100%;
}
.arrows{
  display: flex;
  color: #000;
}
#pagination{
  display: inline-flex;
  gap: 0.3em;
  align-items: center;
}
#page_number{
  color: #000;
  text-decoration: none;
}
#categories{
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em;
}
.category{
  max-width: 300px;
  hyphens: auto;
  font-size: 12px;
}
footer a{
  font-variant: small-caps;
  background-color: var(--second-highlight-color);
  text-decoration: none;
  font-size: large;
}
:visited{
  color: var(--text-color);
}
footer{
  align-items: flex-start;
  justify-content: flex-end;
  gap: 1em;
}
footer a:active{
  background-color: color-mix(in srgb, var(--second-highlight-color) 80%, black 20%);
}
h4{
  font-variant: small-caps;
}
a {
  text-decoration: none;
  color: var(--text-color);
}
h1{
  font-family: "Terminal Grotesque";
  font-size: 60px;
  margin-block: 0px;
  padding: 0px;
  font-weight: normal;
}
h2{
  font-family: "Terminal Grotesque open";
  margin-block: 0px;
  padding: 0px;
  font-weight: normal;

}
header{
  border: 1px solid black;
  border-radius: 25px;
  box-shadow: 2px 2px 0px 0px black;

}

@keyframes fadeIn {
	0% {opacity: 0;}
	100% {opacity: 1;}
}

@keyframes fadeOut {
	0% {opacity: 1;}
	100% {opacity: 0;}
}

@keyframes zoomIn {
	0% {transform: scale(0.9);}
	100% {transform: scale(1);}
}

@keyframes zoomOut {
	0% {transform: scale(1);}
	100% {transform: scale(0.9);}
}
@keyframes scale-up-center {
	0% {
		opacity: 0.7;
	}
	25% {
		opacity: 1;
    background-position: center;
	}
	100% {
		opacity: 0.9;

	}
}
@keyframes close{
  0%{
      background-color: gainsboro;
  }
  100%{
      background-color: #999;
  }
}

.book {
  -ms-overflow-style: none;  /* Internet Explorer 10+ */
  scrollbar-width: none;  /* Firefox */
}
.book::-webkit-scrollbar { 
  display: none;  /* Safari and Chrome */
}