/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f4f8; /* Fallback color */
    background-image: url('../images/background.jpg'); /* Background image */
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    color: #fcac7d;
}

/* Header Styling */
header {
    background-color: #444;
    color: #fff;
    padding: 15px 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

/* Logo Styling */
header #logo {
    width: 120px;
    height: auto;
    margin-right: 20px;
    transition: transform 0.3s ease-in-out;
}

header #logo:hover {
    transform: scale(1.1);
}

/* Header Text */
header h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Button Styling */
button {
    padding: 10px 20px;
    background-color: #eb63a7de;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
}

button:hover {
    background-color: #7e0a51;
    transform: scale(1.05);
}

/* List Styling */
#bookList {
    padding: 30px;
    text-align: center;
}

#books {
    list-style: none;
    padding: 0;
}

#books li {
    margin: 15px 0;
    background-color: #f05c5c4d;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #ebffa0;
}

#books li:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    padding-top: 60px;
    animation: fadeIn 0.5s ease-in-out;
}

.modal-content {
    background-color: #e9ffb7b2;
    margin: 5% auto;
    padding: 20px;
    border: none;
    width: 70%;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    animation: scaleUp 0.3s ease-in-out forwards;
    color: #192401;
}

.close {
    color: #333;
    float: right;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s ease-in-out;
}

.close:hover,
.close:focus {
    color: #e74c3c;
    cursor: pointer;
}

/* Input Fields */
#bookForm input[type="text"],
#bookForm input[type="file"] {
    width: calc(100% - 20px);
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    outline: none;
    transition: border-color 0.3s ease;
}

#bookForm input[type="text"]:focus,
#bookForm input[type="file"]:focus {
    border-color: #3498db;
}

/* Submit Button */
#bookForm button {
    background-color: #3498db;
    border: none;
    padding: 10px 20px;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

#bookForm button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.9);
    }
    to {
        transform: scale(1);
    }
}

/* Additional Styles for Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    #logo {
        margin-right: 0;
        margin-bottom: 10px;
    }

    header h1 {
        font-size: 20px;
    }

    button {
        width: 100%;
        margin-top: 10px;
    }

    #books li {
        padding: 10px;
    }

    .modal-content {
        width: 90%;
    }
}
