/* Custom styles for OpenLibrary */
:root {
    --primary-color: #4361ee;
    --secondary-color: #f5f9ff;
    --success-color: #4cc9f0;
    --light-color: #ffffff;
    --dark-color: #212529;
    --border-radius: 6px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333;
}

header {
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.navbar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.5rem;
    color: white !important;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    transition: var(--transition);
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: white !important;
    background-color: rgba(200, 229, 177, 0.2);
    border-radius: 4px;
}

.search-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 1.2rem 0;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    color: #333;
    box-shadow: var(--box-shadow);
    border: 1px solid #e9ecef;
}

.search-section h2 {
    font-weight: 500;
    font-size: 1.3rem;
    color: #333;
}

.form-control-lg {
    height: calc(2rem + 0.5rem + 2px);
    padding: 0.4rem 0.8rem;
    font-size: 0.95rem;
    border-radius: 50px;
    border: 1px solid #ced4da;
    background-color: white;
    color: #333;
}

.btn-lg {
    padding: 0.4rem 1.4rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    border: none;
    background-color: #e9cf8d;
    color: white;
}

.btn-lg:hover {
    background-color: #cfbb86;
    transform: scale(1.02);
}

.book-card {
    transition: var(--transition);
    height: 100%;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background-color: #fafafa;
    padding: 0.8rem;
}

.book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    border-color: #bbdefb;
}

.book-cover {
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-bottom: 1px solid #eee;
    border-radius: 4px;
    background-color: white;
}

.card-title {
    font-weight: 500;
    font-size: 0.95rem;
    height: 2.2rem;
    overflow: hidden;
    margin-bottom: 0.3rem;
    color: #222;
}

.card-text {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.text-muted {
    color: #6c757d !important;
}

.results-section {
    min-height: 250px;
}

#loading,
#no-results {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

footer {
    margin-top: auto;
    background-color: #f8f9fa !important;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    padding: 0.8rem 0 !important;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-section {
        padding: 1rem 0;
    }

    .form-control-lg {
        height: calc(1.8rem + 0.4rem + 2px);
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
    }

    .btn-lg {
        padding: 0.3rem 1rem;
        font-size: 0.9rem;
    }

    .book-cover {
        height: 110px;
    }

    .card-title {
        font-size: 0.9rem;
        height: auto;
    }

    h2 {
        font-size: 1.2rem;
    }

    .book-card {
        padding: 0.6rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a5a5a5;
}

/* Animation for book cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-card {
    animation: fadeInUp 0.3s ease forwards;
}