body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
    background-color: #f8f9fa;
    line-height: 1.6;
}

.book-page {
    background: white;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #e9ecef;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.book-page:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.page-image {
    max-height: 75vh;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.page-image:hover {
    transform: scale(1.02);
}

.page-image.enlarged {
    max-height: none;
    cursor: zoom-out;
    transform: scale(1.1);
}

.book-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.book-cover {
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid #dee2e6;
}

.no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
}

.pagination .page-link {
    margin: 0 3px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    color: #495057;
    font-weight: 500;
}

.pagination .page-link:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.card {
    border-radius: 12px;
    overflow: hidden;
}

.alert {
    border-radius: 10px;
    border: none;
}

.alert-info {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #495057;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
}

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #6c757d;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* تنسيقات الإدارة */
.admin-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.upload-area {
    border: 2px dashed #007bff;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    background-color: #e9ecef;
    border-color: #0056b3;
}

.upload-area.dragover {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .book-cover {
        height: 200px;
    }
    
    .page-image {
        max-height: 60vh;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        margin-bottom: 5px;
    }
}

/* تأثيرات تحميل */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

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