/* =============================================== */
/* BOOK_DETAILS.CSS - KİTAP DETAY SAYFASI (KOMPAKT) */
/* =============================================== */

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

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

/* =============================================== */
/* BACK NAVIGATION - KOMPAKT */
/* =============================================== */

.back-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 10px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 25px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.2s;
}

.back-button:hover {
    border-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateX(-3px);
}

.back-button i {
    font-size: 0.9em;
}

.book-actions-header {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.book-actions-header .action-btn {
    padding: 8px 15px;
    border: 1px solid var(--border-light);
    border-radius: 25px;
    background: white;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.book-actions-header .action-btn i {
    font-size: 0.9em;
}

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

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

.book-actions-header .action-btn.primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* =============================================== */
/* KİTAP DETAY CONTAINER - KOMPAKT */
/* =============================================== */

.book-details-container {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
}

/* =============================================== */
/* KİTAP BAŞLIK ve KAPAK - KOMPAKT */
/* =============================================== */

.book-header-details {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.book-cover-details {
    width: 140px;
    height: 180px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

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

.cover-placeholder-details {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 10px;
}

.cover-placeholder-details i {
    font-size: 2.5em;
    margin-bottom: 8px;
}

.book-info-details {
    flex: 1;
    min-width: 200px;
}

.book-title-details {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1.2;
}

.book-author-details {
    font-size: 0.95em;
    color: var(--text-light);
    margin-bottom: 12px;
    font-weight: 500;
}

.book-meta-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.meta-item-details {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8em;
    color: var(--text-light);
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 20px;
}

.meta-item-details i {
    color: var(--primary-color);
    font-size: 0.8em;
}

/* İlerleme - KOMPAKT */
.progress-container-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid var(--border-light);
}

.progress-header-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-dark);
}

.progress-bar-large-details {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill-details {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-details-details {
    font-size: 0.75em;
    color: var(--text-light);
}

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

.stats-cards-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card-details {
    background: linear-gradient(135deg, rgba(44, 85, 48, 0.05), rgba(74, 124, 89, 0.05));
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid var(--border-light);
}

.stat-value-details {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 3px;
    line-height: 1;
}

.stat-label-details {
    font-size: 0.65em;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
}

/* =============================================== */
/* BÖLÜM BAŞLIKLARI */
/* =============================================== */

.section-details {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

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

.section-header-details {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.section-header-details i {
    color: var(--primary-color);
    font-size: 1.1em;
}

.section-title-details {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

/* =============================================== */
/* BOOKMARK LİSTESİ - KOMPAKT */
/* =============================================== */

.bookmarks-list-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bookmark-item-details {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.bookmark-item-details:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transform: translateX(2px);
}

.bookmark-header-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.page-badge-details {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
}

.bookmark-date-details {
    font-size: 0.7em;
    color: var(--text-light);
}

/* NOT ALANI - TIKLANABİLİR */
.bookmark-note-details {
    background: rgba(143, 185, 150, 0.08);
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    padding: 10px;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.bookmark-note-details:hover {
    background: rgba(143, 185, 150, 0.12);
}

.note-header-details {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
    color: var(--primary-color);
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}

.bookmark-note-details p {
    margin: 0;
    color: var(--text-dark);
    line-height: 1.4;
    font-size: 0.85em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bookmark-note-details p.expanded {
    -webkit-line-clamp: unset;
}

/* NOT YOK */
.bookmark-no-note-details {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    color: var(--text-light);
    font-size: 0.8em;
    margin-top: 6px;
    cursor: pointer;
    border: 1px dashed var(--border-light);
}

.bookmark-no-note-details i {
    color: var(--accent-color);
    font-size: 0.8em;
}

/* ATLANAN SAYFALAR */
.skipped-pages-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skipped-page-badge-details {
    background: #fff3cd;
    color: #856404;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75em;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #ffeaa7;
    display: flex;
    align-items: center;
    gap: 4px;
}

.skipped-page-badge-details i {
    font-size: 0.7em;
}

.skipped-page-badge-details:hover {
    background: #ffeaa7;
    transform: translateY(-2px);
}

/* =============================================== */
/* LOADING ve ERROR */
/* =============================================== */

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

.loading-state.active,
.error-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 15px;
}

.error-icon {
    font-size: 3em;
    color: #f44336;
    margin-bottom: 15px;
    opacity: 0.7;
}

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

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

.retry-btn,
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85em;
    margin: 0 5px;
}

.retry-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
}

.back-btn {
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

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

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    .back-nav {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 0;
    }
    
    .book-actions-header {
        justify-content: stretch;
    }
    
    .book-actions-header .action-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 10px;
        font-size: 0.8em;
    }
    
    .book-header-details {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .book-cover-details {
        width: 120px;
        height: 160px;
    }
    
    .book-meta-details {
        justify-content: center;
    }
    
    .stats-cards-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-value-details {
        font-size: 1.1em;
    }
    
    .book-details-container {
        padding: 15px;
    }
    
    .section-header-details {
        margin-bottom: 10px;
    }
    
    .section-title-details {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .book-title-details {
        font-size: 1.3em;
    }
    
    .book-cover-details {
        width: 100px;
        height: 140px;
    }
    
    .stats-cards-details {
        gap: 5px;
    }
    
    .stat-card-details {
        padding: 8px 4px;
    }
    
    .stat-value-details {
        font-size: 1em;
    }
    
    .stat-label-details {
        font-size: 0.6em;
    }
    
    .bookmark-item-details {
        padding: 10px;
    }
    
    .page-badge-details {
        padding: 3px 8px;
        font-size: 0.7em;
    }
}

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

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

/* Dark mode */
body.dark-mode .book-details-container,
body.dark-mode .stat-card-details,
body.dark-mode .bookmark-item-details,
body.dark-mode .back-button,
body.dark-mode .book-actions-header .action-btn {
    background: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
}

body.dark-mode .progress-container-details {
    background: #333;
    border-color: #404040;
}

body.dark-mode .bookmark-note-details {
    background: rgba(143, 185, 150, 0.15);
}

body.dark-mode .bookmark-no-note-details {
    background: #333;
    color: #b0b0b0;
}

body.dark-mode .meta-item-details {
    background: #333;
    color: #b0b0b0;
}

/* =============================================== */
/* BOOKMARK MODAL - STILLER */
/* =============================================== */

.bookmark-confirm-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;
}

.bookmark-confirm-modal.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.bookmark-confirm-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 380px;
    padding: 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

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

.bookmark-confirm-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.bookmark-confirm-header i {
    font-size: 1.3em;
    color: var(--primary-color);
}

.bookmark-confirm-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.bookmark-confirm-body {
    margin-bottom: 20px;
    text-align: center;
}

.bookmark-confirm-page {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1em;
    margin-bottom: 12px;
}

.bookmark-confirm-message {
    font-size: 0.9em;
    color: var(--text-medium);
    margin: 0 0 10px 0;
}

.bookmark-note-preview {
    background: rgba(143, 185, 150, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    text-align: left;
}

.bookmark-note-text {
    font-style: italic;
    color: var(--text-dark);
    margin: 0;
    font-size: 0.9em;
}

.bookmark-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.bookmark-confirm-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    border: 1px solid;
    min-width: 80px;
    text-align: center;
    transition: all 0.2s;
}

.bookmark-confirm-cancel {
    background: white;
    border-color: var(--border-light);
    color: var(--text-medium);
}

.bookmark-confirm-cancel:hover {
    background: #f5f5f5;
}

.bookmark-confirm-goto {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.bookmark-confirm-goto:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Dark mode */
body.dark-mode .bookmark-confirm-content {
    background: #2a2a2a;
}

body.dark-mode .bookmark-confirm-title {
    color: #e0e0e0;
}

body.dark-mode .bookmark-confirm-message {
    color: #b0b0b0;
}

body.dark-mode .bookmark-note-preview {
    background: rgba(143, 185, 150, 0.15);
}

body.dark-mode .bookmark-note-text {
    color: #e0e0e0;
}

/* Mobil */
@media (max-width: 480px) {
    .bookmark-confirm-content {
        padding: 20px;
    }
    
    .bookmark-confirm-actions {
        flex-direction: column;
    }
    
    .bookmark-confirm-btn {
        width: 100%;
    }
}