@font-face {
    font-family: nullish;
    src: url(Merienda/Merienda-VariableFont_wght.ttf) format(truetype);
    font-size: normal;
    font-weight: normal;
}
@font-face {
    font-family: titleFont;
    src: url(GreatVibes-Regular.ttf) format(truetype);
    font-size: normal;
    font-weight: normal;
}
:root {
    --size: clamp(300px, 50vw, 600px);
}
* {
    padding: 0px;
    margin: 0px;
    box-sizing: content-box;
}
body {
    background-color: #969696;
}


.head {
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 10px;
    display: grid;
    grid-template: 100% / 1fr max-content;
    background-color: rgba(56, 142, 77, 0.259);
    border-radius: 5px;
}
.name {
    font-family: nullish;
    font-size: 16px;
    color: rgb(61, 25, 102);
}
.add button {
    font-family: monospace;
    font-size: 18px;
    color: rgb(61, 25, 102);
    background-color: gray;
    border: 1px solid rgb(60, 76, 60);
    border-radius: 5px;
    width: 50px;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 5px;
    display: grid;
    grid-template-rows: repeat(Auto-fit, 150px);
    grid-template-columns: repeat(Auto-fit, 120px);
    gap: 10px;
    justify-content: center;
    box-sizing: border-box;
}



.book {
    width: 120px;
    height: 150px;
    background-color: #f0e4cc;
    border-radius: 1px 5px 5px 1px ;
    border: 1px solid gray;
    display: grid;
    grid-template: 1fr 0.8fr 0.5fr 1fr 0.5fr 0.5fr / 2fr 1.2fr;
    box-sizing: border-box;
    padding: 2px;
}
.book p {
    text-align: center;
    text-wrap: wrap;
}
.book .title {
    font-family: titleFont;
    font-size: 1rem;
    color: #2e4053;
    grid-column-start: 1;
    grid-column-end: 3;
    grid-row-start: 1;
    grid-row-end: 3;
}
.book span {
    grid-area: 3 / 1 / 4 / 3 ;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    text-align: center;
    font-size: 0.5rem;
    font-weight: 500;
}
.book .author {
    grid-column: 1 / 3;
    grid-row: 4 / 5;
    font-size: 0.5rem;
    color: #754975;
    font-family: nullish;
    font-weight: 600;
}
.book .page {
    color: #8b0a1a;
    grid-column: 1 / 2;
    grid-row: 5 / 6;
    font-family: monospace;
    font-size: 0.6rem;
}
.book .status {
    grid-area: -2 / -3 / -1 / -2 ;
    font-family: monospace;
    font-size: 0.6rem;
}
.book .delete {
    grid-column: span;
    grid-row: span 2;
    border-radius: 5px;
    background-color: transparent;
    border: none;
}
.book p, button, span {
    display: flex;
    justify-content: center;
    align-items: center;
}
button svg {
    fill: #115769e5;
    width: 15px;
    height: 15px;
}
.delete:active {
    box-shadow: 1px 1px 3px 1px rgba(128, 128, 128, 0.964);
}
.delete:hover {
    background-color: rgba(128, 128, 128, 0.255);
}


dialog {
    width: var(--size);
    border: none;
    box-shadow: 1px 1px 5px 2px rgba(72, 62, 62, 0.478);
    background-color: #545454b2;
    right: 0%;
    bottom: 0%;
    top: 40%;
    left: 24vw;
}
form {
    height: 220px;
    padding: 10%;
    display: grid;
    grid-template-rows: 1fr 1fr 1fr 1.2fr;
    grid-template-columns: 120px 1fr;
    align-items: center;
}
form div {
    width: 100%;
}
.title-2 {
    grid-area: 1 / 1 / 2 / 3;
}
.author-2{
    grid-area: 2 / 1 / 3 / 3;
}
.page-2 {
    grid-area: 3 / 1 / 4 / 3;
}
.status-2  {
    grid-area: 4 / 1 / 5 / 2;


}
.btn-2 {
    grid-area: 4 / 2 / 5 / 3;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}


label {
    display: block;
    font-family: monospace;
    margin: 0px 0px 5px 0px;
}
input {
    border: 1px solid gray;
    border-radius: 5px;
    padding-left: 2px;
    width: calc(100% - 2px);
    height: 20px;
    font-family: nullish, monospace, sans-serif;
}
select {
    width: 100px;
    font-family: monospace;
    font-weight: 700;
    outline: none;
}
.btn-2 button {
    width: 80px;
    height: 20px;
    border-radius: 5px;
    border: 1px solid gray;
    font-family: monospace;
    font-weight: 700;
}
input:focus:invalid {
    outline-color: red;
}
input:focus:valid {
    outline-color: green;
}
input:focus {
    outline-style: solid;
    outline-width: 1px;
    border: none;
}
input:valid {
    border-color: green;
}
::backdrop {
    background-color: rgba(128, 128, 128, 0.655);
}