/* =============================================== */
/* EXPLORE.CSS - SON VERSİYON */
/* =============================================== */

.explore-page {
    background: var(--background-light);
    min-height: 100vh;
}

.explore-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* =============================================== */
/* LAYOUT - 2 SÜTUNLU */
/* =============================================== */
.explore-layout {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

/* SOL TARAF - FİLTRELER */
.filter-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    padding: 1.2rem;
    height: calc(100vh - 120px);
    position: sticky;
    top: 80px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* FİLTRE İÇERİĞİ - KAYDIRILABİLİR */
.filter-content-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.3rem;
    margin-bottom: 0.5rem;
    scrollbar-width: thin;
}

.filter-content-scroll::-webkit-scrollbar {
    width: 4px;
}

.filter-content-scroll::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 4px;
}

.filter-content-scroll::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

.filter-content-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* UYGULA BUTONU KONTEYNERİ - SABİT */
.filter-apply-container {
    flex-shrink: 0;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--border-light);
    background: white;
    width: 100%;
}

/* SAĞ TARAF */
.explore-content {
    flex: 1;
    min-width: 0;
}

/* =============================================== */
/* FİLTRE HEADER */
/* =============================================== */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.filter-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.clear-filters-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.clear-filters-btn:hover {
    background: rgba(44, 85, 48, 0.1);
}

/* =============================================== */
/* AKTİF FİLTRELER */
/* =============================================== */
.active-filters {
    background: rgba(143, 185, 150, 0.1);
    border-radius: 8px;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(143, 185, 150, 0.3);
    flex-shrink: 0;
}

.active-filters-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: white;
    border: 1px solid var(--primary-light);
    border-radius: 20px;
    padding: 0.2rem 0.5rem 0.2rem 0.8rem;
    font-size: 0.75rem;
    color: var(--text-dark);
    white-space: nowrap;
    max-width: 200px;
}

.filter-badge span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-badge button {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
    padding: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.filter-badge button:hover {
    color: var(--primary-color);
}

.active-filters-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0 1rem 0;
    padding: 0.5rem;
    background: rgba(143, 185, 150, 0.1);
    border-radius: 8px;
}

/* =============================================== */
/* FİLTRE BÖLÜMLERİ */
/* =============================================== */
.filter-section {
    margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.filter-section-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.filter-reset {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.filter-reset:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.filter-options {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.3rem;
}

/* =============================================== */
/* DİL FİLTRESİ - STATİK GÖRÜNÜM */
/* =============================================== */
.filter-info-message.static-language {
    background: rgba(44, 85, 48, 0.08);
    border-radius: 8px;
    padding: 12px 15px;
    margin: 5px 0;
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-info-message.static-language i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.filter-info-message.static-language span {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.filter-info-message.static-language strong {
    color: var(--primary-color);
}

/* =============================================== */
/* KATEGORİ HİYERARŞİSİ */
/* =============================================== */
.filter-category-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-category-parent {
    margin-top: 0.5rem;
    font-weight: 600;
}

.filter-category-parent:first-child {
    margin-top: 0;
}

.filter-category-parent .filter-checkbox {
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 1px dashed var(--border-light);
    padding-bottom: 0.3rem;
}

.filter-category-children {
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    border-left: 2px dotted var(--border-light);
}

.filter-category-child {
    margin-bottom: 0.3rem;
}

.filter-category-child .filter-checkbox {
    font-size: 0.8rem;
}

/* =============================================== */
/* CHECKBOX ve RADIO GRUPLARI */
/* =============================================== */
.filter-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-medium);
    cursor: pointer;
    padding: 0.2rem 0;
}

.filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.filter-checkbox .count {
    color: var(--text-light);
    font-size: 0.7rem;
    margin-left: auto;
    white-space: nowrap;
}

.filter-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-medium);
    cursor: pointer;
    padding: 0.2rem 0;
}

.filter-radio input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 0.3rem;
}

.filter-loading,
.filter-empty {
    color: var(--text-light);
    font-size: 0.8rem;
    padding: 0.5rem 0;
    text-align: center;
}

/* =============================================== */
/* UYGULA BUTONU */
/* =============================================== */
.apply-filters-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.apply-filters-btn:disabled {
    background: var(--border-medium);
    color: var(--text-light);
    opacity: 0.6;
    cursor: not-allowed;
}

.apply-filters-btn:not(:disabled) {
    background: var(--accent-color);
    color: var(--text-dark);
    box-shadow: 0 4px 12px rgba(230, 180, 80, 0.3);
}

.apply-filters-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 180, 80, 0.4);
}

/* =============================================== */
/* TOOLBAR */
/* =============================================== */
.explore-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-wrapper {
    flex: 1;
    position: relative;
    min-width: 250px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.9rem;
}

.search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    border: 1px solid var(--border-light);
    border-radius: 30px;
    background: white;
    color: var(--text-dark);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.search-clear:hover {
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.05);
}

.sort-wrapper {
    min-width: 150px;
}

.sort-select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 30px;
    background: white;
    color: var(--text-dark);
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a5a5a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.view-toggle {
    display: flex;
    gap: 2px;
    background: #f8f9fa;
    padding: 2px;
    border-radius: 6px;
    border: 1px solid var(--border-light);
}

.view-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 4px;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.view-btn:hover {
    background: rgba(44, 85, 48, 0.1);
    color: var(--primary-color);
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

/* =============================================== */
/* KİTAP GRID ve KARTLAR */
/* =============================================== */
.books-container {
    min-height: 400px;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.books-list {
    display: none;
    opacity: 0;
    visibility: hidden;
}

.books-grid.active {
    display: grid;
    opacity: 1;
    visibility: visible;
}

.books-list.active {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    opacity: 1;
    visibility: visible;
}

.book-card-compact {
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.book-card-compact:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    border-color: var(--accent-color);
}

.book-cover-compact {
    aspect-ratio: 3/4;
    width: 100%;
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.book-cover-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cover-placeholder-compact {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.language-badge-compact {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    backdrop-filter: blur(2px);
    z-index: 2;
}

.level-badge-compact {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    color: white;
    z-index: 2;
}

.level-badge-compact.beginner { background: rgba(76, 175, 80, 0.9); }
.level-badge-compact.intermediate { background: rgba(255, 152, 0, 0.9); }
.level-badge-compact.advanced { background: rgba(244, 67, 54, 0.9); }

.book-info-compact {
    padding: 0.75rem 0.6rem 0.6rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title-compact {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2rem;
}

.book-author-compact {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-progress-compact {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: auto;
}

.progress-bar-compact {
    flex: 1;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill-compact {
    height: 100%;
    background: var(--accent-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-text-compact {
    font-size: 0.65rem;
    color: var(--text-medium);
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

.read-button-compact {
    width: 100%;
    padding: 0.5rem 0;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    transition: background 0.2s;
}

.read-button-compact:hover {
    background: var(--primary-dark);
}

/* Liste kartı */
.book-card-list {
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.book-card-list:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.book-cover-list {
    width: 60px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.book-cover-list img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-info-list {
    flex: 1;
    min-width: 0;
}

.book-title-list {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.2rem;
}

.book-author-list {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.book-meta-list {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-medium);
    flex-wrap: wrap;
}

.book-meta-list i {
    color: var(--primary-color);
    width: 14px;
    margin-right: 0.2rem;
}

/* =============================================== */
/* SAYFALAMA */
/* =============================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: white;
    color: var(--text-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.page-number {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: white;
    color: var(--text-medium);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0 0.3rem;
}

.page-number:hover {
    background: rgba(44, 85, 48, 0.1);
    border-color: var(--primary-color);
}

.page-number.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-dots {
    display: flex;
    align-items: center;
    color: var(--text-light);
    padding: 0 0.3rem;
}

/* =============================================== */
/* MOBİL FİLTRE BAR */
/* =============================================== */
.mobile-filter-bar {
    display: none;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.mobile-filter-btn {
    flex: 1;
    padding: 0.8rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 30px;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.mobile-filter-btn i {
    color: var(--primary-color);
}

.mobile-filter-btn .filter-badge {
    position: absolute;
    top: -5px;
    right: 5px;
    background: var(--accent-color);
    color: var(--text-dark);
    font-size: 0.6rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-sort-wrapper {
    flex: 1;
}

/* =============================================== */
/* MOBİL FİLTRE MODAL */
/* =============================================== */
.mobile-filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
}

.mobile-filter-modal.active {
    display: flex;
}

.mobile-filter-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

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

.mobile-filter-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    flex-shrink: 0;
}

.mobile-filter-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.close-filter-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.close-filter-modal:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}

.mobile-filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem;
    max-height: calc(85vh - 120px);
}

.mobile-filter-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 1rem;
    background: #f8f9fa;
    flex-shrink: 0;
}

.filter-btn {
    flex: 1;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.filter-btn.primary {
    background: var(--primary-color);
    color: white;
}

.filter-btn.primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.filter-btn.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--border-medium);
}

.filter-btn.secondary {
    background: white;
    color: var(--text-medium);
    border: 1px solid var(--border-light);
}

.filter-btn.secondary:hover {
    background: #f5f5f5;
}

/* =============================================== */
/* LOADING ve EMPTY STATE */
/* =============================================== */
.loading-state {
    text-align: center;
    padding: 3rem 1rem;
    display: none;
}

.loading-state.active {
    display: block;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #e74c3c;
    display: none;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    display: none;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* =============================================== */
/* RESPONSIVE */
/* =============================================== */
@media (max-width: 1024px) {
    .filter-sidebar {
        width: 240px;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .explore-container {
        padding: 1rem;
    }
    
    .explore-layout {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-sidebar {
        display: none;
    }
    
    .mobile-filter-bar {
        display: flex;
    }
    
    .explore-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }
    
    .search-wrapper {
        width: 100%;
    }
    
    .sort-wrapper.desktop {
        display: none;
    }
    
    .view-toggle {
        align-self: flex-end;
    }
    
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .active-filters-mobile {
        display: flex;
    }
    
    .filter-apply-container {
        display: none;
    }
}

@media (min-width: 1400px) {
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* =============================================== */
/* DARK MODE */
/* =============================================== */
body.dark-mode .filter-sidebar,
body.dark-mode .book-card-compact,
body.dark-mode .book-card-list,
body.dark-mode .mobile-filter-content {
    background: #2a2a2a;
    border-color: #404040;
}

body.dark-mode .filter-section-header h4 {
    color: #e0e0e0;
}

body.dark-mode .filter-checkbox,
body.dark-mode .filter-radio {
    color: #ccc;
}

body.dark-mode .search-input,
body.dark-mode .sort-select {
    background: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
}

body.dark-mode .view-toggle {
    background: #333;
    border-color: #404040;
}

body.dark-mode .page-number {
    background: #2a2a2a;
    border-color: #404040;
    color: #ccc;
}

body.dark-mode .page-number.active {
    background: var(--primary-color);
    color: white;
}

body.dark-mode .mobile-filter-header,
body.dark-mode .mobile-filter-footer {
    background: #2a2a2a;
    border-color: #404040;
}

body.dark-mode .mobile-filter-header h3 {
    color: #fff;
}

body.dark-mode .filter-info-message.static-language {
    background: rgba(143, 185, 150, 0.15);
    border-left-color: var(--primary-light);
}

body.dark-mode .filter-info-message.static-language span {
    color: var(--text-light-dark);
}

body.dark-mode .filter-info-message.static-language strong {
    color: var(--primary-light);
}

/* =============================================== */
/* KİTAP KARTLARI - KATEGORİ ve SEVİYE ARKA PLAN */
/* =============================================== */

.book-category-compact {
    font-size: 0.65rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-category-compact i {
    color: var(--primary-color);
    width: 12px;
    margin-right: 0.2rem;
    font-size: 0.6rem;
}

/* Giriş yapmamış kullanıcı için gizlenecek linkler */
.auth-required,
.auth-required-mobile {
    transition: opacity 0.3s ease;
}

/* Demo butonu sadece giriş yapmamış kullanıcılar için */
body.user-logged-in .demo-button {
    display: none !important;
}

/* Seviye badge arka plan renkleri - !important ile güçlendir */
.level-badge-compact.beginner { 
    background: rgba(76, 175, 80, 0.9) !important; 
}
.level-badge-compact.intermediate { 
    background: rgba(255, 152, 0, 0.9) !important; 
}
.level-badge-compact.advanced { 
    background: rgba(244, 67, 54, 0.9) !important; 
}

/* Liste görünümü için kategori */
.book-meta-list span i.fa-tag {
    color: var(--accent-color);
}

/* Dark mode */
body.dark-mode .book-category-compact {
    color: #aaa;
}

body.dark-mode .book-category-compact i {
    color: var(--primary-light);
}