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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: fadeIn 0.6s ease-in;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.search-section {
    margin-bottom: 30px;
    animation: slideDown 0.6s ease-out;
}

.search-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 15px;
    font-size: 1em;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.category-filter {
    padding: 12px 15px;
    font-size: 1em;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.category-filter:focus {
    outline: none;
    border-color: #667eea;
}

.search-button {
    padding: 12px 30px;
    font-size: 1em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.search-button:active {
    transform: translateY(0);
}

.results-info {
    text-align: center;
    color: white;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    animation: fadeIn 0.6s ease-in;
}

.book-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.book-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.book-author {
    font-size: 1em;
    color: #666;
    margin-bottom: 12px;
}

.book-category {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    margin-bottom: 15px;
    width: fit-content;
}

.book-link {
    display: inline-block;
    margin-top: auto;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-link:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: white;
    font-size: 1.2em;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .search-controls {
        flex-direction: column;
    }

    .search-input,
    .category-filter,
    .search-button {
        width: 100%;
    }

    .books-grid {
        grid-template-columns: 1fr;
    }
}
