* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #4a6fa5, #3a5a86);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
}

/* Header Container */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 1rem;
}

/* Logo Styling */
.header-logo {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    padding: 8px;
}

.header-logo img {
    width: 120%;
    height: 120%;
    object-fit: contain;
    filter: brightness(0.9);
}

.left-logo {
    margin-right: 2rem;
}

.right-logo {
    margin-left: 2rem;
}

/* Header Text */
.header-text {
    flex: 1;
    text-align: center;
}

.header-text h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.header-text p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Navigation Styles */
nav {
    background-color: #3a5a86;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

nav li {
    margin: 0 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
}

nav a:hover {
    color: #ffd166;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #ffd166;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Active navigation item */
nav a.active {
    color: #ffd166;
}

nav a.active::after {
    width: 100%;
}

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    width: 100%;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Featured Hero Section */
.featured-hero {
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.1), rgba(58, 90, 134, 0.1));
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.featured-hero .hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.featured-hero h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.featured-hero p {
    font-size: 1.2rem;
    color: #5a6c7d;
    line-height: 1.6;
}

/* Stats Section */
.featured-stats {
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-item {
    background: white;
    padding: 2rem 1rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.stat-item i {
    font-size: 2.5rem;
    color: #4a6fa5;
    margin-bottom: 1rem;
}

.stat-item h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: #7f8c8d;
    font-size: 1rem;
}

/* Filter Section */
.filter-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    max-width: 1200px;
}

.filter-section h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    font-weight: 600;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.filter-group select {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #4a6fa5;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
}

.filter-btn, .reset-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.5rem;
}

.filter-btn {
    background: linear-gradient(135deg, #4a6fa5, #3a5a86);
    color: white;
    border: none;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 111, 165, 0.3);
}

.reset-btn {
    background: transparent;
    border: 2px solid #e74c3c;
    color: #e74c3c;
}

.reset-btn:hover {
    background: #e74c3c;
    color: white;
}

/* Featured Books Section */
.featured-books {
    padding: 2rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-count {
    color: #718096;
    font-size: 1rem;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Book Card */
.book-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.book-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.badge-bestseller {
    background: #ffd166;
    color: #2c3e50;
}

.badge-new {
    background: #06d6a0;
    color: white;
}

.badge-award {
    background: #ef476f;
    color: white;
}

.badge-editor {
    background: #118ab2;
    color: white;
}

.book-cover {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-bottom: 1px solid #f0f0f0;
}

.book-info {
    padding: 1.5rem;
}

.book-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    line-height: 1.4;
}

.book-author {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.book-description {
    color: #5a6c7d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3; /* Standard property */
    display: -moz-box; /* Firefox fallback */
    -moz-box-orient: vertical;
    max-height: 4.5em; /* Fallback for browsers that don't support line-clamp */
}

.book-rating {
    color: #ffc107;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.book-features {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.feature-tag {
    background: #edf2f7;
    color: #4a5568;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.book-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.action-btn {
    flex: 1;
    padding: 0.6rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
}

.btn-primary {
    background: #4a6fa5;
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #3a5a86;
}

.btn-outline {
    background: transparent;
    border: 1px solid #4a6fa5;
    color: #4a6fa5;
}

.btn-outline:hover {
    background: #4a6fa5;
    color: white;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 3rem;
    color: #718096;
}

.loading-indicator i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #4a6fa5;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.no-results i {
    font-size: 3rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.no-results p {
    color: #718096;
    max-width: 400px;
    margin: 0 auto;
}

/* Collections Section */
.collections {
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.05), rgba(58, 90, 134, 0.05));
    margin-top: 2rem;
}

.collections h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.collection-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.collection-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.collection-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.award-collection .collection-icon {
    color: #ffd166;
}

.bestseller-collection .collection-icon {
    color: #06d6a0;
}

.editor-collection .collection-icon {
    color: #118ab2;
}

.classic-collection .collection-icon {
    color: #ef476f;
}

.collection-card h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.collection-card p {
    color: #718096;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.collection-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: #4a6fa5;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.collection-btn:hover {
    background: #3a5a86;
    transform: translateY(-2px);
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #4a6fa5, #3a5a86);
    color: white;
    text-align: center;
    margin-top: 2rem;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.cta-form input {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
}

.cta-btn {
    background: #ffd166;
    color: #2c3e50;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    background: #ffc145;
    transform: translateY(-2px);
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #3a5a86, #2c3e50);
    color: white;
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    width: 100%;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
    width: 100%;
}

.footer-links {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #ffd166;
}

.social-icons {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin: 0 0.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #ffd166;
    transform: translateY(-3px);
}

.copyright {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .header-container,
    .container,
    .footer-content {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .header-logo {
        width: 60px;
        height: 60px;
        margin: 0.5rem 0;
    }
    
    .left-logo, .right-logo {
        margin: 0.5rem 0;
    }
    
    .header-text {
        margin: 1rem 0;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    .header-text p {
        font-size: 1rem;
    }
    
    .featured-hero h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav li {
        margin: 0.5rem 0;
    }
    
    .cta-form {
        flex-direction: column;
    }
    
    .cta-btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .stats-grid,
    .collections-grid {
        grid-template-columns: 1fr;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-hero h1 {
        font-size: 1.8rem;
    }
    
    .filter-btn, .reset-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 1.8rem;
    }
    
    .book-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
}

/* ... (existing CSS code remains the same) ... */

/* Search Container */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 1.5rem auto 0;
    width: 100%;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.search-icon {
    color: #4a6fa5;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

#search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: #333;
    background: transparent;
}

#search-input::placeholder {
    color: #a0aec0;
}

.search-btn {
    background: linear-gradient(135deg, #4a6fa5, #3a5a86);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.search-btn:hover {
    background: linear-gradient(135deg, #3a5a86, #2c3e50);
    transform: scale(1.05);
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f7fafc;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-cover {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.suggestion-info {
    flex: 1;
}

.suggestion-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.suggestion-author {
    font-size: 0.85rem;
    color: #718096;
}

.no-suggestions {
    padding: 1.5rem;
    text-align: center;
    color: #a0aec0;
}

/* Search Info and Clear Button */
.search-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-results-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #edf2f7;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

#search-term-display {
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.clear-search-btn {
    background: transparent;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: #e74c3c;
    color: white;
}

/* Responsive Design for Search */
@media (max-width: 768px) {
    .search-container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .search-box {
        padding: 0.5rem 1rem;
    }
    
    #search-input {
        font-size: 0.95rem;
    }
    
    .search-suggestions {
        border-radius: 8px;
    }
    
    .search-results-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .clear-search-btn {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .search-box {
        padding: 0.5rem;
    }
    
    #search-input {
        font-size: 0.9rem;
    }
    
    #search-input::placeholder {
        font-size: 0.85rem;
    }
    
    .search-btn {
        width: 35px;
        height: 35px;
    }
}
/* ... (existing CSS code remains the same, including media queries) ... */