* {
    box-sizing: border-box;
    margin: 0; 
    padding: 0; 
}

:root {
    font-size: 10px;
    
    h1 {
        font-size: 5rem; 
    }

    svg {
        height: 4rem;
        cursor: pointer;
    }

    dialog {
        height: 50vh; 
        width: 30vw; 
        /* display: grid;  */
        /* place-items: center; */
        grid-template-rows: 3fr 1fr; 
        justify-items: center;
        place-self: center;
        background-color: rgba(155,155,155, .9);
        padding: 2rem; 

        #form {
            display: grid; 
            grid-template-rows: repeat(4, 1fr); 
            justify-items: center;
            /* border: 1px solid red;   */
            width: 85%; 

            label {
                width: 100%; 
                font-size: 2rem; 
            }

            input {
                width: 65%;
                height: 2.5rem; 
            }

            #title {
                grid-row: 1/2; 
                /* width: 65%;
                height: 2rem;  */
            }
            #author {
                grid-row: 2/3; 
            }
            #pageCount {
                grid-row: 3/4; 
            }
            #checkbox {
                display: grid; 
                grid-template-columns: 2fr 1fr;
                grid-row: 4/5; 
                width: 100%; 

                #read {
                    grid-column: 1/2; 
                } 

                #submit {
                    grid-column: 2/3; 
                }
            }
        }
    }

    .close-button {
        background: none; 
    }
}

.title {
    margin: 0 auto; 
}

.container {
    display: grid; 
    grid-template: 1fr 6fr / 3fr 1fr; 
    /* background-color: pink; */
    height: 100vh; 
    padding: 2rem 2rem; 
    column-gap: 2rem;
}

.title {
    grid-area: 1/1/2/3;
    /* background-color: green; */
}

.library {
    grid-area: 2/1/3/2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* grid-template-columns: repeat(auto-fit, clamp(200px, 40rem, 1fr)); */
    /* grid-template-rows: repeat(auto-fit, minmax(250px, 40rem)); */
    grid-template-rows: repeat(auto-fit, clamp(250px, 40rem, 1fr));
    grid-auto-flow: row;
    grid-auto-rows: minmax(30rem, 1fr); 
    /* background-color: blue; */
    gap: 20px; 
    overflow: auto;  

    .add-book { 
        display: grid; 
        place-items: center;
        border: 1px solid purple; 
        height: 30rem; 
        cursor: pointer; 
        border-radius: .75rem .75rem; 
        /* width: 200px;  */

        svg {
            height: 15rem; 
        }

        p {
            font-size: 2.5rem; 
        }
        
    }

    .book {
        /* border: 1px solid red;  */
        background-color: beige;
        border-radius: .75rem .75rem; 
        display: grid; 
        padding: 1.5rem; 
        font-size: 2.5rem; 
        height: 30rem; 
        
        .book-info {
            grid-area: 1/1/5/3; 
            display: grid; 
            grid-template-columns: 1fr 1fr; 

            .book-title {
                grid-area: 1/1/2/3; 
            }

            .book-author {
                grid-area: 2/1/3/3; 
            }

            .book-pages {
                grid-area: 3/1/4/3; 
            }

            .read-delete {
                display: grid; 
                grid-template-columns: 2fr 1fr;
                grid-area: 4/1/5/3; 
                
                .read {
                    grid-area: 1/1/2/2; 
                }
                .delete {
                    grid-area: 1/2/2/3; 
                }
            }
        }
    }
}

.information {
    display: grid; 
    grid-area: 2/2/3/3; 

    .data {
        display: grid; 
        justify-content: center;
        align-content: start;
        row-gap: 5rem; 
    }
}

body {
    font-family: Arial, sans-serif;
    background-color: #f7f7f7;
}

.container {
    display: grid;
    grid-template-columns: 3fr 1fr;
    grid-gap: 2rem;
    padding: 2rem;
}

.title {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

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

.add-book {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #666;
    padding: 2rem;
    text-align: center;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-book:hover {
    background-color: #f0f0f0;
}

.add-book svg {
    width: 6rem;
    height: 6rem;
    fill: #666;
    margin-bottom: 1rem;
}

.book {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.book:hover {
    transform: translateY(-5px);
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
}

.book-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.book-title,
.book-author,
.book-pages {
    margin-bottom: 1rem;
}

.read-button {
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.read-button:hover {
    background-color: #0056b3;
}

.delete svg {
    width: 2rem;
    height: 2rem;
    fill: #666;
    cursor: pointer;
    transition: fill 0.3s ease;
}

.delete svg:hover {
    fill: #ff0000;
}

.information {
    background-color: #fff;
    padding: 2rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
}

.data {
    text-align: center;
}

.datapoint {
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: #333;
}

.total-books,
.total-pages,
.total-books-read,
.total-books-unread {
    font-weight: bold;
}

.container {
    background-image: linear-gradient(to bottom right, #e0e0e0, #f0f0f0);
}

/* Style the dialog background */
.dialog {
    background-color: rgba(255, 255, 255, 0.9);
}

/* Style the form inputs */
input[type="text"],
input[type="number"],
input[type="checkbox"] {
    border: 1px solid #ccc;
    border-radius: 0.3rem;
    padding: 0.5rem;
    margin-bottom: 1rem;
}

/* Style the submit button */
#submit {
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 0.3rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#submit:hover {
    background-color: #218838;
}

/* Style the close button */
#close-button {
    fill: #666;
    transition: fill 0.3s ease;
}

#close-button:hover {
    fill: #ff0000;
}

/* Improve the hover effect on books */
.book:hover {
    transform: translateY(-5px);
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
}

/* Style the book info */
.book-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.book-title,
.book-author,
.book-pages {
    margin-bottom: 0.5rem;
    color: #333;
}

/* Style the read button */
.read-button {
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 0.3rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.read-button:hover {
    background-color: #0056b3;
}

/* Style the delete button */
.delete svg {
    fill: #666;
    cursor: pointer;
    transition: fill 0.3s ease;
}

.delete svg:hover {
    fill: #ff0000;
}