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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    padding: 20px;
}

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

/* Suchfeld Styling */
.add-button-container {
    display: flex;
    align-items: center;
    gap: 8px;
}
.category-dropdown {
    position: relative;
    width: 100%;
}

.category-dropdown-toggle {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
}

.category-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding: 10px;
    z-index: 999;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.category-dropdown.open .category-dropdown-menu {
    display: block;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.category-select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}
.search-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.search-box h1 {
    margin-bottom: 20px;
    color: #333;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #4285f4;
}

.search-button {
    padding: 12px 30px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-button:hover {
    background: #3367d6;
}

/* Kartenlayout */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.book-card {
    background: white;
    border-radius: 10px;
    overflow: visible;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

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

.book-cover {
    /*width: 100%;*/
    height: auto;
    object-fit: cover;
    background: #e0e0e0;
}

.book-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.book-authors {
    color: #666;
    margin-bottom: 8px;
    font-size: 14px;
}

.book-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #888;
}

.book-description {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.name-categories {
    font-size: 14px;
}

.no-results {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 10px;
    color: #666;
}
/* Runder Plus-Button */
.add-button-round {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #2196f3;
    color: white;
    border: none;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.4);
}

/* Disabled State - GRÜN */
.add-button-round:disabled {
    background: #28a745;
    cursor: default;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

 /* Filter-Styles */
.filter-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid #f0f0f0;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.filter-group input,
.filter-group select {
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Checkbox-Gruppe für Kategorien und Ratings */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
}

.checkbox-group::-webkit-scrollbar {
    width: 6px;
}

.checkbox-group::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.checkbox-group::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
    user-select: none;
}

.checkbox-label:hover {
    background: rgba(102, 126, 234, 0.1);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
    margin: 0;
}

.checkbox-label span {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Checked State Highlight */
.checkbox-label:has(input:checked) {
    background: rgba(102, 126, 234, 0.15);
    font-weight: 500;
}

.filter-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-filter {
    /*padding: 12px 20px;  */
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    flex-wrap: wrap;
    gap: 15px;
}

.sort-section {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.sort-section label {
    font-weight: 600;
    color: #333;
}

.sort-section select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
}
.filter-dropdown {
    position: relative;
    width: 100%;
}

.filter-dropdown-toggle {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-dropdown-toggle:hover {
    border-color: #667eea;
}

.filter-dropdown-toggle:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.filter-dropdown.open .filter-dropdown-menu {
    display: block;
}

.filter-dropdown .checkbox-group {
    margin: 0;
    border: none;
    border-radius: 8px;
    background: white;
    max-height: 220px;
}
/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border: 2px solid #667eea;
    border-radius: 6px;
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}

.pagination a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.pagination .active {
    background: #667eea;
    color: white;
}

.filter-toggle {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    transition: all 0.2s;
}

.filter-toggle:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.filter-toggle:active {
    transform: translateY(0);
}
.search-filters {
    display: flex;
    gap: 1.2rem;
    margin: 0.6rem 0;
    justify-content: center;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: #555;
}

.filter-label input[type="checkbox"] {
    accent-color: #4a90e2;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .checkbox-group {
        max-height: 150px;
    }

    .filter-actions {
        justify-content: center;
    }

    .btn-filter {
        width: 100%;
        text-align: center;
    }
}

/* Animation für Filter-Section */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-section[style*="display: block"] {
    animation: slideDown 0.3s ease-out;
}

/* Leere State wenn keine Kategorien */
.checkbox-group p {
    margin: 0;
    padding: 20px;
    text-align: center;
}
