/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Luckiest Guy', cursive, sans-serif;
}

body {
    background: radial-gradient(circle at top, #8e44ad, #f39c12);
    color: #fff;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    background-attachment: fixed;
    position: relative;
}

/* Header Styles */
header {
    margin-bottom: 40px;
}

h1 {
    font-size: 4rem;
    color: #f39c12;
    text-transform: uppercase;
    letter-spacing: 5px;
    text-shadow: 5px 5px 15px rgba(255, 255, 255, 0.3);
    animation: fadeIn 2s ease-in-out;
    font-family: 'Impact', sans-serif;
}

/* Search Bar Styles */
#search-form {
    margin-bottom: 30px;
}

#search-input {
    padding: 10px;
    font-size: 1.5rem;
    width: 70%;
    border-radius: 25px;
    border: 3px solid #f39c12;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    transition: all 0.4s ease;
    box-shadow: 0 0 15px #f39c12;
}

#search-input:focus {
    outline: none;
    border-color: #8e44ad;
    box-shadow: 0 0 20px #8e44ad;
}

/* Dropdown Styles */
select {
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.6);
    border: 3px solid #f39c12;
    padding: 10px;
    border-radius: 25px;
    color: white;
    transition: all 0.4s ease;
    box-shadow: 0 0 15px #f39c12;
}

select:focus {
    outline: none;
    border-color: #8e44ad;
    box-shadow: 0 0 20px #8e44ad;
}

/* Books Container */
#results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    justify-items: center;
    padding: 20px;
    animation: fadeIn 2s ease-in-out;
}

.book {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.book:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.book h3 {
    font-size: 2rem;
    color: #f39c12;
    margin-bottom: 10px;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.book p {
    font-size: 1.1rem;
    color: #ecf0f1;
    font-family: 'Comic Sans MS', cursive, sans-serif;
}

.book img {
    width: 100%;
    max-width: 180px;
    border-radius: 8px;
    transition: transform 0.4s ease;
}

.book img:hover {
    transform: rotate(5deg);
}

/* Add to Library Button */
button {
    padding: 12px 25px;
    font-size: 1.2rem;
    background-color: #8e44ad;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 50px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    margin-top: 10px;
}

button:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    background-color: #f39c12;
}

/* Floating Effects */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Book Element Floating Effect */
.book {
    animation: float 3s ease-in-out infinite;
}

/* Fading In Animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glowing Book */
.book.glowing {
    animation: glowing 1.5s infinite alternate;
}

@keyframes glowing {
    0% {
        box-shadow: 0 0 10px #f39c12;
    }
    100% {
        box-shadow: 0 0 25px #8e44ad;
    }
}

/* Media Queries */
@media (max-width: 768px) {
    #search-input {
        width: 80%;
    }

    .book {
        padding: 15px;
    }
}
