/* Books Page Specific Styles */
.books {
    background: #141414;
    padding: 100px 0;
    min-height: 100vh;
}

.books__container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 50px;
    color: #fff;
}

.books__container h1 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ff0844 0%, #fe5196 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.books__container > p {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #ccc;
}

.books__search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
    gap: 2rem;
}

.books__search-bar {
    display: flex;
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.books__search-bar:focus-within {
    border-color: #ff0844;
    background: rgba(255, 255, 255, 0.15);
}

.books__search-bar input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 1rem;
}

.books__search-bar input::placeholder {
    color: #ccc;
}

.books__search-bar button {
    background: #ff0844;
    border: none;
    color: #fff;
    padding: 0 1.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    min-width: 60px;
}

.books__search-bar button:hover {
    background: #fe5196;
    transform: scale(1.05);
}

.books__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 800px;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #ff0844;
    border-radius: 25px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: #ff0844;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 8, 68, 0.3);
}

.books__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.book__card {
    background: #1a1a1a;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

.book__card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(255, 8, 68, 0.2);
    border-color: #ff0844;
}

.book__card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book__card:hover img {
    transform: scale(1.05);
}

.book__card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book__card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #fff;
    line-height: 1.3;
}

.book__card .author {
    color: #ff0844;
    font-style: italic;
    margin-bottom: 1rem;
    font-weight: 500;
}

.book__card .rating {
    color: #ffd700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-stars {
    color: #ffd700;
}

.rating-text {
    color: #ccc;
    font-size: 0.9rem;
}

.book__card .description {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book__actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.book__actions .btn {
    flex: 1;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(45deg, #ff0844, #fe5196);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #fe5196, #ff0844);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #333;
}

.btn-secondary:hover {
    background: #333;
    border-color: #ff0844;
    transform: translateY(-2px);
}

.audiobook-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ff0844;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.book__card {
    position: relative;
}

.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

#load-more-btn {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    border-radius: 50px;
    background: linear-gradient(45deg, #ff0844, #fe5196);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

#load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 8, 68, 0.3);
}

/* Category badges */
.category-badge {
    display: inline-block;
    background: rgba(255, 8, 68, 0.2);
    color: #ff0844;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    border: 1px solid #ff0844;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .books__container {
        padding: 0 20px;
    }
    
    .books__grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .books__filters {
        flex-direction: column;
        align-items: stretch;
        max-width: 100%;
    }
    
    .filter-btn {
        text-align: center;
        margin: 0;
    }
    
    .books__search-container {
        gap: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .books__container h1 {
        font-size: 2.5rem;
    }
    
    .books__grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .book__card img {
        height: 280px;
    }
    
    .book__actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .books__search-bar {
        flex-direction: column;
    }
    
    .books__search-bar button {
        padding: 1rem;
    }
}