
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    background-image: url('https://cdn.pixabay.com/photo/2024/04/19/12/13/ai-generated-8706226_640.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed; 
    background-position: center center; 
    height: 100vh; 
}

header {
    background-color: rgba(51, 51, 51, 0.8); 
    color: #fff;
    padding: 20px;
    text-align: center;
    position: relative; 
    z-index: 10; 
}

.hidden {
    display: none;
}

.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 100; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #d5d6e9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 90%;
    max-width: 400px;
}

.modal-content input {
    width: calc(100% - 20px);
    padding: 10px;
    margin: 10px 0;
    font-size: 16px;
    border-radius: 6px;
    outline: none;
}


.modal-content button {
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
}

.search-container {
    display: flex;
    justify-content: center;
    margin: 10px;
}

input[type="text"] {
    width: 70%;
    padding: 10px;
    font-size: 16px;
    outline: none;
    border-radius: 8px;
}

button {
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    margin-left: 10px;
    border-radius: 8px;
}

main {
    padding: 20px;
    position: relative; 
    z-index: 5; 
}
.book-grid, .author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.book-card, .author-card {
    background-color: #d8b2b2;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.book-card h3, .author-card h3 {
    margin-top: 0;
}

@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
    }

    input[type="text"] {
        width: 100%;
        margin-bottom: 10px;
    }

    button {
        width: 100%;
        margin-left: 0;
    }

    .book-grid, .author-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 90%;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        font-size: 14px;
    }

    button {
        font-size: 14px;
    }
}

/* @media (max-width: 768px) {
    .book-card {
        padding: 10px;
    }

    .book-card h3 {
        font-size: 18px;
    }

    .book-card p {
        font-size: 14px;
    }
} */

/* @media (max-width: 480px) {
    .book-card {
        padding: 8px;
        text-align: center;
    }

    .book-card h3 {
        font-size: 16px;
    }

    .book-card p {
        font-size: 12px;
    }

    .book-card img {
        width: 80%;
        margin: 0 auto;
    }
} */


/* General styling for the book card image */
.book-card img {
    width: 100%; /* Make the image take up the full width of the container */
    height: auto; /* Maintain the aspect ratio */
    border-radius: 8px; /* Add some rounded corners */
    margin-bottom: 10px; /* Add space below the image */
}

/* Media query for screens smaller than 768px */
@media (max-width: 768px) {
    .book-card img {
        width: 80%; /* Slightly reduce the width to fit better in smaller screens */
        margin: 0 auto; /* Center the image horizontally */
    }
}

/* Media query for screens smaller than 480px */
@media (max-width: 480px) {
    .book-card img {
        width: 70%; /* Further reduce the width for very small screens */
        margin: 0 auto; /* Center the image horizontally */
    }
}
