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


/* Body Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8c4f8, #a1c4fd);
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}


/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    width: 100%;
    max-width: 1000px;
    padding: 30px;
    border-radius: 10px;
    background-color: transparent;
}


h1 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 3px;
    color: #5470b9;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}


/* Search Bar Styles */
input[type="text"] {
    padding: 14px 25px;
    width: 75%;
    border: 2px solid rgba(149, 117, 205, 0.5);
    border-radius: 50px;
    font-size: 1.1rem;
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}


input[type="text"]:focus {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(149, 117, 205, 0.3);
    border-color: #7e57c2;
}


/* Search Button Styles */
button {
    padding: 14px 30px;
    background-color: #9575cd;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}


button:hover {
    background-color: #7e57c2;
    box-shadow: 0 0 15px rgba(149, 117, 205, 0.5);
}


/* Popular Books Section */
#popular-books {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 50px;
    padding: 30px;
    background-color: transparent;
    border-radius: 10px;
}


#popular-books h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: #5c6bc0;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}


/* Changed to grid layout */
#popular-books-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 20px;
    width: 100%;
}


/* Book List Styles */
#book-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin-top: 30px;
}


/* Book Cards Specific Styling */
.book-item {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    height: 400px;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}


.book-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(149, 117, 205, 0.3);
}


.book-item .cover-container {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
}


.book-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}


.book-item .no-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}


/* Book card variations for books without covers - purple theme */
.book-item .no-cover.color-1 { background: linear-gradient(45deg, #9c27b0, #ce93d8); }
.book-item .no-cover.color-2 { background: linear-gradient(45deg, #673ab7, #9575cd); }
.book-item .no-cover.color-3 { background: linear-gradient(45deg, #5c6bc0, #90caf9); }
.book-item .no-cover.color-4 { background: linear-gradient(45deg, #7e57c2, #b39ddb); }
.book-item .no-cover.color-5 { background: linear-gradient(45deg, #ba68c8, #f8bbd0); }
.book-item .no-cover.color-6 { background: linear-gradient(45deg, #7986cb, #bbdefb); }


.book-item .book-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    background-color: white;
}


.book-item h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}


.book-item .author {
    font-size: 0.9rem;
    color: #5c6bc0;
    margin-bottom: 10px;
    font-style: italic;
    text-align: center;
}


.book-item .read-btn {
    padding: 8px 20px;
    background-color: #9575cd;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0 auto;
    text-align: center;
    width: auto;
    min-width: 80px;
}


.book-item .read-btn:hover {
    background-color: #7e57c2;
    transform: scale(1.05);
}


/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 10px;
    flex-wrap: wrap;
}


.pagination button {
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    color: #5c6bc0;
    border: 1px solid rgba(149, 117, 205, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}


.pagination button:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    border-color: rgba(149, 117, 205, 0.6);
}


.pagination button.active {
    background-color: #9575cd;
    color: white;
    font-weight: bold;
}


.pagination button:disabled {
    background-color: rgba(224, 224, 224, 0.7);
    color: #9e9e9e;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
    border-color: transparent;
}


/* Mobile Responsiveness */
@media (max-width: 1200px) {
    #popular-books-list, #book-list {
        grid-template-columns: repeat(3, 1fr);
    }
}


@media (max-width: 900px) {
    #popular-books-list, #book-list {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 600px) {
    #popular-books-list, #book-list {
        grid-template-columns: 1fr;
    }
   
    header {
        padding: 20px;
    }
   
    h1 {
        font-size: 2rem;
    }
   
    input[type="text"] {
        width: 100%;
        margin-bottom: 15px;
    }
   
    button {
        width: 100%;
        margin-left: 0;
    }
}

