:root {
    --normal-grey: rgba(175, 175, 175, 0.5);
    --hover-grey: rgba(175, 175, 175, 0.65);
    --light-red: rgba(250, 0, 0, 0.5);
    --hover-light-red: rgba(250, 0, 0, 0.6);
    --light-green: rgba(0, 250, 0, 0.6);
    --hover-light-green: rgba(0, 250, 0, 0.75);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

button:hover,
input[type="checkbox"]:hover {
    cursor: pointer;
}

body {
    background-color: rgb(205, 205, 205);

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header {
    width: 100%;
    padding: 2rem clamp(1rem, 5vw, 5rem);
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;

    background-color: white;
    display: flex;
    justify-content: space-between;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 650;
}

.header button {
    padding: 0rem clamp(1.5rem, 2.5vw, 2rem);
    border: none;
    border-radius: 4px;
    background-color: var(--normal-grey);

    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 575;
}

.header button:hover {
    background-color: var(--hover-grey);
    transition: 0.2s ease-out;
}

.container {
    padding: 2rem clamp(3rem, 5vw, 5rem);

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.book-card {
    min-height: 250px;
    border-radius: 18px;
    box-shadow: rgba(33, 35, 38, 0.1) 0px 10px 10px -10px;
    background-color: white;

    display: block;
}

.book-card .book-info {
    height: 85%;
    padding: 1rem 2rem;

    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.book-card .card-banner {
    position: relative;
    width: 100%;
    height: 35px;
    border-radius: 18px 18px 0px 0px;
    background-color: rgb(225, 90, 90);
}

.book-card .card-banner::before {
    content: "";
    position: absolute;
    bottom: -50px;
    
    width: 100%;
    height: 50px;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -25px 0 0 rgb(225, 90, 90);
    background-color: transparent;
}

.book-card h2 {
    font-size: 1.75rem;
    font-weight: 575;
}

.book-card h3 {
    font-size: 1.25rem;
    color: rgb(100, 100, 100);
}

.book-card h4 {
    font-size: 1rem;
    color: rgb(125, 125, 125);
}

.book-card .card-buttons {
    padding: 1rem 0rem 1rem 0rem;
    display: flex;
    gap: 1rem;
}

.book-card button {
    padding: 0.75rem clamp(1rem, 2vw, 1.5rem);
    border: none;
    border-radius: 4px;
    background-color: var(--light-red);
    font-size: 1rem;
    font-weight: 575;
}

.book-card button:hover {
    background-color: var(--hover-light-red);
}

.book-card .toggle.read {
    background-color: var(--light-green);
}

.book-card .toggle.read:hover {
    background-color: var(--hover-light-green);
}

dialog {
    margin: auto; 
    border: none;
    border-radius: 8px;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    transform: scale(0.75);
    transition: 0.3s ease;
    opacity: 0;
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

dialog.open {
    transition: 0.3s ease;
    transform: scale(1);
    opacity: 1;
}

.form-container {
    width: 350px; 
    height: 410px;
    padding: 2rem;

    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-container label {
    font-size: 1.2rem;
    font-weight: 500;
}

.form-container input {
    width: 100%;
    padding: 8px 6px;
    background-color: transparent;
    border: 1.5px solid rgb(150, 150, 150);
    border-radius: 4px;
    outline: none;

    color: black;
    font-size: 1rem;
    text-align: left;
}

.form-container input:focus {
    border: 2px solid rgb(0, 160, 213);
}

.form-container .form-checkbox {
    display: flex; 
    padding-left: 4.25rem; 
    align-items: center;
    gap: 1rem;
}

.form-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: rgb(0, 135, 0);
}

.form-container input[type="checkbox"]:checked {
    background-color: green;
}

.form-container .form-buttons {
    display: flex;
    justify-content: space-between;
}

.form-container .submit {
    padding: 0.75rem 3.75rem;
    border: none;
    border-radius: 4px;
    background-color: rgb(33, 133, 255);

    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.form-container .submit:hover {
    background-color: rgb(42, 129, 236);
}

.form-container .cancel {
    padding: 0.75rem 1.1rem;
    border: none;
    border-radius: 4px;
    background-color: rgb(175, 175, 175);

    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.form-container .cancel:hover {
    background-color: rgb(161, 161, 161);
}