*, *::after, *::before {
    box-sizing: border-box;
}

* {
    margin: 0;
}

body {
    font-family: "Roboto", sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background-color: #e8eae7;
    position: relative;
}


h2 {
    font-size: 1.5rem;
}

p {
    font-size: 1.1rem;
    color: #3c3c3c;
}

span {
    color: #000;
    font-weight: 600;
}

input, label, legend {
    font-family: inherit;
}


.header {
    width: 100%;
    box-shadow: 0px 1px 4px rgb(182, 181, 181);
    background-color: #ffffff;
    margin-bottom: 1rem;
}


h1 {
    font-family: "Bungee", sans-serif;
    margin: 1rem 3.5rem; 
    font-size: 2.5rem;
    text-transform: lowercase;
}


.library__container {
    width: 90vw;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.book {
    background-color: #fff;
    padding: 1rem 1rem 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: start;
    border-radius: 10px;
    box-shadow: 1px 2px 4px rgb(159, 157, 157);
    cursor: pointer;
    transition: transform ease-in .3s;
}

.book:hover {
    transform: scale(1.05);
}

.remove-book-btn {
    text-transform: uppercase;
    align-self: end;
    background-color: inherit;
    border: none;
}

ion-icon {
    cursor: pointer;
    font-size: 24px;
    color: rgb(57, 57, 57);
}

ion-icon:hover {
    color: #d71717;
}

.toggle-read-btn {
    border: none;
    border-radius: 10px;
    padding: .5rem 1rem;
    cursor: pointer;
    color: #fff;
}

.read__text--green {
    background-color: #0c8143;
    font-weight: 600;
}
.read__text--green:hover {
    background-color: transparent;
    outline: 2px solid #0c8143;
    color: #0c8143;
}

.read__text--red {
    background-color: #c3250c;
    font-weight: 600;
}
.read__text--red:hover {
    background-color: transparent;
    outline: 2px solid #c3250c;
    color: #c3250c;
}

.btn{
    margin: 1rem 0 2rem 0 ;
    padding: 1.1rem 3.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    background-color: #121212;
    color: #fff;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 1px 2px 4px rgb(159, 157, 157);
    transition: transform ease-in-out .2s;
}

.btn:hover {
    background-color: #116c48;
    transform:translateY(-5px);
}


.overlay {
    display: none;
    position: fixed;
    border: 2px solid;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 0;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.426);
}


.form {
    display: none; 
    z-index: 1;
    max-width: 500px;
    width: 90%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #e8eae7;
    border-radius: 10px;
    color: #000;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.389);
}

.closed-btn {
    color: #000;
    margin: 1rem;
    align-self: end;
    cursor: pointer;
    font-size: 1.8rem;
    font-weight: 800;
    border: none;
    background: none;
}

.closed-btn:hover {
    color:#d71717;
}

.form__container {
    margin: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    justify-content: start;
    text-align: center;
}

fieldset {
    border: none;
}

legend {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

label {
    margin: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.title,
.author,
.pages {
    display: flex;
    align-items: center;
    border-radius: 10px;
    max-width: 20rem;
    width: 100%;
    height: 2.2rem;
    background-color: #fff;
    color: #5d5d5d;
}


input {
    border-radius: 10px;
    width: 90%;
    height: 100%; 
    border:none;
    outline: none;
    font-size: 1.1rem;
}

.read__container {
    display: flex;
    gap: 3rem;
}

.read,
.unread {
    display: flex;
}

input[type='radio'] {
    width: 1.1rem;
}


.submit-btn {
    background-color: #116c48;
    box-shadow: none;
    padding: .8rem 5rem;
}

.submit-btn:hover {
    background-color: #0e5a3c;
}