/* Background and body */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to right, #eecda3, #ef629f);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Header section */
.bg-container {
    background-image: url("https://assets.ccbp.in/frontend/dynamic-webapps/library-management-bg.png");
    background-size: cover;
    background-position: center;
    min-height: 35vh;
    margin: 30px auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding-top: 60px;
    padding-bottom: 40px;
    transition: transform 0.3s ease;
    margin-right: 10%;
    margin-left: 10%;
}

/* Title Animation */
.bg-container h1 {
    font-size: 2.8rem;
    animation: slideDown 1s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Input Styling */
#searchInput {
    max-width: 500px;
    margin: 0 auto;
    padding: 12px;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    transition: box-shadow 0.3s ease;
}

#searchInput:focus {
    outline: none;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

/* Spinner */
#spinner {
    margin-top: 20px;
}

/* Cards Container */
.card-container {
    background-color: #fffbe7;
    border-radius: 12px;
    padding: 30px;
    margin: 30px auto;
    margin-right: 10%;
    margin-left: 10%;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    transition: background-color 0.4s ease;
}

.card-container:hover {
    background-color: #fff4d2;
}

/* Result Cards */
.card {
    background-color: #fef9ef;
    border: none;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.card img {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.card p {
    margin: 0;
    font-weight: 500;
    color: #333;
}
