/* =============================================== */
/* MY_LIBRARY.CSS - KİTAPLIK SAYFASI (KOMPAKT) */
/* =============================================== */

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================== */
/* HEADER - AYNI KALDI */
/* =============================================== */

.auth-buttons-header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 10px;
}

.auth-btn-header {
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid;
    white-space: nowrap;
}

.auth-btn-header.login {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.auth-btn-header.login:hover {
    background: var(--primary-color);
    color: white;
}

.auth-btn-header.register {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.auth-btn-header.register:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.user-dropdown-container {
    order: 3;
    flex-shrink: 0;
    margin-left: 10px;
}

.mobile-auth-buttons {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
    background: rgba(74, 124, 89, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-auth-btn {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid;
    width: 100%;
}

.mobile-auth-btn.login {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.mobile-auth-btn.login:hover {
    background: rgba(44, 85, 48, 0.1);
}

.mobile-auth-btn.register {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.mobile-auth-btn.register:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.mobile-user-dropdown-container {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
    background: rgba(74, 124, 89, 0.05);
}

/* =============================================== */
/* TOOLBAR - TEK SATIR, KAYBOLAN */
/* =============================================== */

.library-toolbar {
    background: white;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: sticky;
    top: 60px;
    z-index: 900;
    padding: 8px 0;
    transition: transform 0.3s ease;
}

/* Kaybolma efekti */
.library-toolbar.hide {
    transform: translateY(-100%);
}

.toolbar-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 4px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.toolbar-content::-webkit-scrollbar {
    height: 3px;
}

.toolbar-content::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 3px;
}

/* Dil filtreleri - TEK SATIR */
.language-filters {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* Okuma durumu filtreleri - TEK SATIR */
.filter-buttons {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-btn i {
    font-size: 0.8em;
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--primary-color);
    background: rgba(143, 185, 150, 0.05);
}

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

.filter-btn.active:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Sıralama - DARALTILMIŞ */
.sort-wrapper {
    flex-shrink: 0;
    margin-left: auto;
}

.sort-select {
    padding: 6px 10px;
    padding-right: 28px;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' 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") no-repeat right 8px center;
    color: var(--text-dark);
    font-size: 0.85em;
    cursor: pointer;
    min-width: 120px;
    appearance: none;
}

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

/* =============================================== */
/* İSTATİSTİK KARTLARI - KOMPAKT */
/* =============================================== */

.stats-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 16px 0 20px 0;
}

.stat-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-soft);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.stat-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(44, 85, 48, 0.1), rgba(74, 124, 89, 0.1));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 1.1em;
    color: var(--primary-color);
}

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

.stat-value {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.7em;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
}

/* =============================================== */
/* KİTAP BÖLÜMÜ */
/* =============================================== */

.books-section {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.section-header h2 {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

/* Görünüm değiştirme - KÜÇÜK */
.view-toggle {
    display: flex;
    gap: 2px;
    background: #f8f9fa;
    padding: 2px;
    border-radius: 6px;
    border: 1px solid var(--border-light);
}

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

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

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

/* =============================================== */
/* KOMPAKT KİTAP KARTI (INDEX'TEKİ GİBİ) */
/* =============================================== */

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    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: 12px;
    opacity: 1;
    visibility: visible;
}

/* Grid Kart - KOMPAKT */
.book-card-grid {
    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;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

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

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

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

.cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.cover-placeholder i {
    font-size: 2em;
    margin-bottom: 5px;
}

.cover-placeholder span {
    font-size: 0.7em;
    opacity: 0.9;
}

/* Dil Badge - KÜÇÜK */
.language-badge-grid {
    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;
}

/* Seviye Badge - KÜÇÜK */
.level-badge {
    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.beginner { background: rgba(76, 175, 80, 0.9); }
.level-badge.intermediate { background: rgba(255, 152, 0, 0.9); }
.level-badge.advanced { background: rgba(244, 67, 54, 0.9); }

/* İlerleme çubuğu - İNCE */
.book-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0,0,0,0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Kitap bilgileri - KOMPAKT */
.book-info-grid {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.book-author-grid {
    font-size: 0.7em;
    color: var(--text-light);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* İstatistikler - KOMPAKT */
.book-stats-grid {
    margin-top: auto;
    border-top: 1px solid var(--border-light);
    padding-top: 6px;
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
    font-size: 0.7em;
}

.stat-left {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-light);
}

.stat-left i {
    width: 12px;
    font-size: 0.7em;
    color: var(--primary-color);
}

.stat-right {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.75em;
}

/* Durum badge - KÜÇÜK */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.65em;
    font-weight: 600;
    margin-top: 6px;
    width: fit-content;
}

.status-reading {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.status-completed {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

/* =============================================== */
/* LİSTE KARTI - DAHA KOMPAKT */
/* =============================================== */

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

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

.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));
    position: relative;
}

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

.cover-placeholder-list {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.cover-placeholder-list i {
    font-size: 1.5em;
    margin-bottom: 3px;
}

.language-badge-list {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.55rem;
}

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

.book-title-list {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.book-stats-list {
    display: flex;
    gap: 12px;
    margin-top: 5px;
}

.stat-item-list {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75em;
}

.stat-icon-list {
    color: var(--primary-color);
    font-size: 0.7em;
    width: 14px;
}

.book-actions-list {
    display: flex;
    gap: 6px;
    margin-top: 5px;
}

.action-btn {
    padding: 4px 10px;
    border: 1px solid var(--border-light);
    border-radius: 15px;
    background: white;
    color: var(--text-dark);
    font-size: 0.75em;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn i {
    font-size: 0.7em;
}

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

/* =============================================== */
/* BOŞ DURUM - DAHA KÜÇÜK */
/* =============================================== */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

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

.empty-icon {
    font-size: 3.5em;
    color: var(--accent-color);
    margin-bottom: 15px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 1.3em;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.9em;
}

.browse-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
}

/* =============================================== */
/* LOADING - KÜÇÜK */
/* =============================================== */

.loading-state {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

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

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

/* =============================================== */
/* MODAL - AYNI KALDI */
/* =============================================== */

.book-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.book-detail-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    animation: fadeIn 0.3s ease;
}

.modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

/* =============================================== */
/* RESPONSIVE - MOBİL */
/* =============================================== */

@media (max-width: 1024px) {
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    .library-toolbar {
        top: 56px;
        padding: 6px 0;
    }
    
    .toolbar-content {
        gap: 6px;
    }
    
    .filter-btn {
        padding: 4px 8px;
        font-size: 0.75em;
    }
    
    .filter-btn i {
        font-size: 0.7em;
    }
    
    .sort-select {
        padding: 4px 8px;
        padding-right: 24px;
        font-size: 0.75em;
        min-width: 90px;
        background-size: 12px;
    }
    
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin: 12px 0 15px;
    }
    
    .stat-card {
        padding: 8px;
        gap: 6px;
    }
    
    .stat-icon {
        width: 28px;
        height: 28px;
    }
    
    .stat-icon i {
        font-size: 0.9em;
    }
    
    .stat-value {
        font-size: 1.1em;
    }
    
    .stat-label {
        font-size: 0.6em;
    }
    
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .book-card-list {
        padding: 8px;
        gap: 10px;
    }
    
    .book-cover-list {
        width: 45px;
        height: 60px;
    }
    
    .book-stats-list {
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .book-actions-list {
        flex-wrap: wrap;
    }
    
    .action-btn {
        padding: 3px 6px;
        font-size: 0.7em;
    }
}

@media (max-width: 480px) {
    .filter-text {
        display: inline;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .book-title-grid {
        font-size: 0.8em;
    }
}

/* Scroll takip için */
body {
    scroll-behavior: smooth;
}

/* Dark mode uyumluluğu */
body.dark-mode .library-toolbar,
body.dark-mode .stat-card,
body.dark-mode .books-section,
body.dark-mode .book-card-grid,
body.dark-mode .book-card-list {
    background: #2a2a2a;
    border-color: #404040;
}

body.dark-mode .stat-value,
body.dark-mode .book-title-grid,
body.dark-mode .book-title-list {
    color: #e0e0e0;
}

body.dark-mode .stat-label,
body.dark-mode .book-author-grid,
body.dark-mode .book-author-list {
    color: #b0b0b0;
}

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

/* "Sayfa Dili" yazısını içeren her şeyi gizle */
.mobile-menu-section {
    display: none !important;
}

/* Tüm dil seçicileri gizle */
select[id*="Language"],
select[id*="language"],
select[class*="language"],
select[class*="Language"] {
    display: none !important;
}