* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

:root {
    --primary-color: #b61412; /* اللون الأحمر */
    --primary-color-light: #ff4d4d;
    --dark-bg: #000;
    --dark-card: #121212;
    --dark-text: #f5f5f5;
    --search-border: #333;
    --search-bg: rgba(255, 255, 255, 0.1);
    --modal-bg: rgba(0, 0, 0, 0.9);
    --border-radius: 10px;
}

body {
    background: var(--dark-bg);
    color: var(--dark-text);
    min-height: 100vh;
    direction: ltr; /* اتجاه من اليسار لليمين */
    padding: 20px 0 0 0; /* إزالة padding-top السابق للهيدر */
}

/* ==================== شريط البحث والعودة ==================== */
.search-header {
    max-width: 800px;
    margin: 20px auto 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 20px;
}

/* كلمة Search على يسار شريط البحث */
.search-label {
    font-size: 1rem;
    color: var(--primary-color);
    white-space: nowrap;
    margin-right: 10px;
    font-weight: 600;
    min-width: 70px;
}

/* حاوية شريط البحث */
.search-container {
    flex: 1;
    position: relative;
}

/* شريط البحث نفسه */
.search-bar {
    width: 100%;
    display: flex;
    background: var(--search-bg);
    border-radius: 25px;
    overflow: hidden;
    height: 44px;
    border: 1px solid var(--search-border);
    transition: border-color 0.3s ease;
}

.search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(182, 20, 18, 0.2);
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: transparent;
    color: var(--dark-text);
    outline: none;
    font-size: 0.95rem;
    text-align: left;
}

.search-bar input::placeholder {
    color: #888;
    font-size: 0.9rem;
}

/* إيقونة البحث */
.search-bar button {
    background: transparent;
    border: none;
    padding: 0 15px;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.search-bar button:hover {
    color: var(--primary-color-light);
}

/* زر العودة للرئيسية */
.back-to-home {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    white-space: nowrap;
    padding: 8px 15px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 70px;
    justify-content: center;
    border: 1px solid var(--primary-color);
}

.back-to-home:hover {
    color: var(--primary-color-light);
    background: rgba(182, 20, 18, 0.1);
}

.back-to-home i {
    margin-right: 5px;
    font-size: 1.2rem;
}

/* ==================== سجل البحث ==================== */
.search-history {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-card);
    border-radius: var(--border-radius);
    margin-top: 8px;
    padding: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid var(--search-border);
}

.search-history.show {
    display: flex;
    flex-direction: column;
}

/* إخفاء عنوان سجل البحث */
.history-header {
    display: none;
}

#history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
}

#history-list li {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

#history-list li:hover {
    background: rgba(255, 255, 255, 0.05);
}

#history-list li:last-child {
    border-bottom: none;
}

.history-item-text {
    flex: 1;
    text-align: left;
    font-size: 0.9rem;
    word-break: break-word;
    color: var(--dark-text);
}

.delete-history-item {
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 5px;
    margin-left: 10px;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.delete-history-item:hover {
    color: var(--primary-color);
    background: rgba(182, 20, 18, 0.1);
}

/* زر حذف الكل في الأسفل */
.history-footer {
    padding: 12px 15px;
    border-top: 1px solid var(--search-border);
    text-align: center;
    display: none;
}

.history-footer.show {
    display: block;
}

#clear-history-bottom {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    width: 100%;
    padding: 8px;
    transition: color 0.3s ease;
    border-radius: 5px;
}

#clear-history-bottom:hover {
    color: var(--primary-color);
    background: rgba(182, 20, 18, 0.05);
}

/* ==================== نتائج البحث ==================== */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* بطاقات الكتب في نتائج البحث */
.results-grid .book-card {
    background: var(--dark-card);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    border: 1px solid #222;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.results-grid .book-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(182, 20, 18, 0.2);
}

.results-grid .book-cover {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #222, #333);
}

.results-grid .book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.results-grid .book-card:hover .book-cover img {
    transform: scale(1.05);
}

.results-grid .book-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    height: 2.5em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    color: var(--primary-color);
}

.results-grid .book-author {
    font-size: 0.75rem;
    color: #aaa;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* حالة لا توجد نتائج */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 1rem;
}

.no-results i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.5;
    display: block;
}

.no-results p {
    margin: 0;
    line-height: 1.5;
}

/* ==================== مودال تأكيد الحذف ==================== */
.delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-bg);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.delete-modal.show {
    display: flex;
}

.modal-content {
    background: #1c1c1e;
    border-radius: 14px;
    width: 85%;
    max-width: 300px;
    overflow: hidden;
    border: 1px solid #333;
}

.modal-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #333;
}

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

.modal-body {
    padding: 15px 20px;
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.4;
}

.modal-actions {
    display: flex;
    border-top: 1px solid #333;
}

.modal-btn {
    flex: 1;
    padding: 16px;
    border: none;
    background: transparent;
    color: var(--dark-text);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.modal-btn.cancel {
    border-right: 1px solid #333;
}

.modal-btn.delete {
    color: var(--primary-color);
    font-weight: 600;
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ==================== زر العودة للبحث ==================== */
.back-to-search {
    background: none;
    border: none;
    color: var(--primary-color) !important;
    font-size: 0.95rem;
    padding: 8px 15px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.back-to-search:hover {
    color: var(--primary-color-light) !important;
    background: rgba(182, 20, 18, 0.1);
}

/* ==================== زر العودة للتفاصيل ==================== */
.back-to-details {
    background: none !important;
    border: none !important;
    color: var(--primary-color) !important;
    font-size: 0.95rem;
    padding: 8px 15px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: none !important;
    order: 1;
}

.back-to-details:hover {
    color: var(--primary-color) !important;
    background: none !important;
}

/* ==================== تفاصيل الكتاب ==================== */
.book-details-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    background: transparent;
    overflow: hidden;
    padding: 20px;
}

.book-details-header {
    padding: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 2rem;
}

.book-details-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.book-cover-section {
    flex: 1;
    min-width: 280px;
    max-width: 320px;
}

.book-info-section {
    flex: 2;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.details-book-cover {
    height: 380px;
    width: 100%;
    max-width: 300px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--primary-color);
    margin: 0 auto;
}

.details-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.book-meta-top {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.book-author-top {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.meta-label {
    color: var(--primary-color);
    font-weight: 600;
    min-width: 70px;
}

.meta-value {
    color: var(--dark-text);
    font-weight: 500;
}

.book-details-title {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 0;
    text-shadow: 0 0 10px rgba(182, 20, 18, 0.3);
    line-height: 1.2;
}

.book-description-section {
    margin-bottom: 0;
}

.book-details-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-text);
    text-align: justify;
}

.action-buttons {
    text-align: center;
    margin-top: 2rem;
    width: 100%;
}

.start-reading-btn {
    background: var(--primary-color) !important;
    color: #000 !important;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: none !important;
    margin: 0 auto;
    min-width: 200px;
}

.start-reading-btn:hover {
    background: var(--primary-color-light) !important;
}

/* ==================== الكتب ذات الصلة في صفحة التفاصيل ==================== */
.related-books-details {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(182, 20, 18, 0.3);
    width: 100%;
    position: relative;
}

.related-title-details {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: none !important;
    display: block;
}

.related-scroll-container {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 50px;
}

.related-scroll-wrapper-details {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
}

.related-scroll-wrapper-details::-webkit-scrollbar {
    display: none;
}

/* سهم الاقتراحات - نفس تصميم الصفحة الرئيسية */
.related-scroll-arrow {
    background: rgba(0, 0, 0, 0.9) !important;
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.8);
    transition: all 0.3s;
}

.related-scroll-arrow:hover {
    background: rgba(182, 20, 18, 0.3) !important;
    transform: translateY(-50%) scale(1.1);
}

.related-scroll-arrow.left {
    left: -45px;
}

.related-scroll-arrow.right {
    right: -45px;
}

/* بطاقات الكتب ذات الصلة - نفس تصميم الصفحة الرئيسية */
.related-scroll-wrapper-details .book-card {
    background-color: transparent !important;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    border: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    width: 180px;
    padding: 10px;
    transition: none !important;
}

.related-scroll-wrapper-details .book-cover {
    height: 220px !important;
    width: 160px !important;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(182, 20, 18, 0.3) !important;
    margin: 0 auto;
}

.related-scroll-wrapper-details .book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.related-scroll-wrapper-details .book-title {
    font-size: 1rem !important;
    margin-top: 10px;
    color: var(--primary-color);
    font-weight: 600;
    text-align: center;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    height: auto !important;
    display: block !important;
    -webkit-line-clamp: initial !important;
    line-height: normal !important;
}

.related-scroll-wrapper-details .book-author {
    font-size: 0.8rem !important;
    color: #aaa;
    margin-top: 5px;
    text-align: center;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-related {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    padding: 20px;
    grid-column: 1 / -1;
}

/* ==================== قسم القراءة ==================== */
.reading-container {
    display: none;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    background: transparent;
    overflow: hidden;
    padding: 20px;
}

.reading-header {
    padding: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.reading-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    text-align: center;
    flex-grow: 1;
    order: 2;
}

.reading-content {
    padding: 1.5rem;
    line-height: 1.8;
    font-size: 1rem;
    min-height: 400px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.page-text {
    margin-top: 15px;
    line-height: 1.7;
    text-align: justify;
    font-size: 1.1rem;
    padding: 0 10px;
    color: var(--dark-text);
}

/* الإعلانات في صفحات القراءة - نفس تنسيق الصفحة الرئيسية */
.ad-section {
    text-align: center;
    margin: 20px 0;
    padding: 10px 0;
    border-radius: 8px;
    background: transparent;
    border: none;
}

.ad-top {
    margin-top: 0;
}

.ad-middle {
    margin: 25px 0;
}

.ad-bottom {
    margin-bottom: 0;
}

.adsbygoogle {
    display: block !important;
    margin: 0 auto !important;
    border: none !important;
    border-radius: 8px;
    overflow: hidden;
    background: transparent !important;
}

/* Page Navigation Simple */
.page-navigation-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    background: transparent;
    border-radius: 0;
    border: none;
    margin-top: 2rem;
}

.nav-btn-simple {
    background: none !important;
    border: none !important;
    color: var(--primary-color) !important;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: bold;
}

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

.nav-btn-simple:hover:not(:disabled) {
    background: rgba(182, 20, 18, 0.1) !important;
}

.page-indicator {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0 20px;
}

/* ==================== استعلامات الوسائط (Responsive) ==================== */
@media (max-width: 1200px) {
    .related-scroll-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
    
    .related-scroll-arrow.left {
        left: -40px;
    }
    
    .related-scroll-arrow.right {
        right: -40px;
    }
}

@media (max-width: 992px) {
    .related-scroll-container {
        margin: 0 40px;
    }
    
    .related-scroll-arrow {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
    
    .related-scroll-arrow.left {
        left: -38px;
    }
    
    .related-scroll-arrow.right {
        right: -38px;
    }
}

@media (max-width: 768px) {
    .search-header {
        flex-wrap: wrap;
        gap: 12px;
        margin: 15px auto 25px;
    }
    
    .search-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .search-container {
        order: 2;
        width: 100%;
    }
    
    .back-to-home {
        order: 3;
        margin-left: auto;
        min-width: 60px;
        padding: 6px 12px;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
        padding: 0 15px 30px;
    }
    
    .book-details-content {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .book-cover-section {
        width: 100%;
        max-width: 320px;
        display: flex;
        justify-content: center;
    }
    
    .book-info-section {
        width: 100%;
    }
    
    .details-book-cover {
        height: 300px;
        width: 100%;
        max-width: 280px;
    }
    
    .book-details-title {
        font-size: 1.7rem;
        text-align: center;
    }
    
    .book-author-top {
        justify-content: center;
        text-align: center;
    }
    
    .book-details-description {
        text-align: center;
        font-size: 1rem;
    }
    
    /* إظهار الأسهم في الشاشات الصغيرة */
    .related-scroll-container {
        margin: 0 45px;
    }
    
    .related-scroll-arrow {
        display: flex !important;
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        border: 2px solid var(--primary-color) !important;
    }
    
    .related-scroll-arrow.left {
        left: -36px;
    }
    
    .related-scroll-arrow.right {
        right: -36px;
    }
    
    .related-scroll-wrapper-details .book-card {
        width: 160px;
    }
    
    .related-scroll-wrapper-details .book-cover {
        height: 200px !important;
        width: 140px !important;
    }
    
    .related-scroll-wrapper-details .book-title {
        font-size: 0.95rem !important;
        max-width: 140px;
    }
    
    .related-scroll-wrapper-details .book-author {
        font-size: 0.75rem !important;
        max-width: 140px;
    }
}

@media (max-width: 576px) {
    .search-header {
        margin: 10px auto 20px;
        padding: 0 15px;
    }
    
    .search-label {
        font-size: 0.95rem;
        min-width: 60px;
    }
    
      .search-bar {
        height: 40px;
    }
    
    .search-bar input {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .search-bar button {
        padding: 0 12px;
        font-size: 0.9rem;
    }
    
    .back-to-home {
        font-size: 0.9rem;
        padding: 5px 10px;
        min-width: 50px;
    }
    
    .back-to-home span {
        display: none;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
        padding: 0 10px 20px;
    }
    
    .results-grid .book-title {
        font-size: 0.8rem;
    }
    
    .results-grid .book-author {
        font-size: 0.7rem;
    }
    
    .details-book-cover {
        height: 280px;
        max-width: 240px;
    }
    
    .book-details-title {
        font-size: 1.5rem;
    }
    
    .book-details-description {
        font-size: 0.95rem;
    }
    
    .start-reading-btn {
        padding: 12px 25px;
        font-size: 1.1rem;
        width: 100%;
        max-width: 220px;
    }
    
    .related-scroll-container {
        margin: 0 40px;
    }
    
    .related-scroll-arrow {
        display: flex !important;
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    
    .related-scroll-arrow.left {
        left: -34px;
    }
    
    .related-scroll-arrow.right {
        right: -34px;
    }
    
    .related-scroll-wrapper-details .book-card {
        width: 140px;
    }
    
    .related-scroll-wrapper-details .book-cover {
        height: 180px !important;
        width: 120px !important;
    }
    
    .related-scroll-wrapper-details .book-title {
        font-size: 0.9rem !important;
        max-width: 120px;
    }
    
    .related-scroll-wrapper-details .book-author {
        font-size: 0.7rem !important;
        max-width: 120px;
    }
    
    .modal-content {
        width: 90%;
    }
}

@media (max-width: 480px) {
    .search-header {
        margin: 8px auto 15px;
    }
    
    .search-label {
        display: none; /* إخفاء كلمة Search في الشاشات الصغيرة جداً */
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    
    .details-book-cover {
        height: 260px;
        max-width: 220px;
    }
    
    .book-details-title {
        font-size: 1.4rem;
    }
    
    .book-author-top {
        font-size: 1rem;
        flex-direction: column;
        gap: 5px;
        align-items: center;
    }
    
    .meta-label {
        min-width: auto;
    }
    
    .related-scroll-container {
        margin: 0 38px;
    }
    
    .related-scroll-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .related-scroll-arrow.left {
        left: -32px;
    }
    
    .related-scroll-arrow.right {
        right: -32px;
    }
    
    .related-scroll-wrapper-details .book-card {
        width: 130px;
    }
    
    .related-scroll-wrapper-details .book-cover {
        height: 170px !important;
        width: 110px !important;
    }
    
    .related-scroll-wrapper-details .book-title {
        font-size: 0.85rem !important;
        max-width: 110px;
    }
    
    .related-scroll-wrapper-details .book-author {
        font-size: 0.65rem !important;
        max-width: 110px;
    }
}

@media (max-width: 360px) {
    .related-scroll-container {
        margin: 0 36px;
    }
    
    .related-scroll-arrow {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
    
    .related-scroll-arrow.left {
        left: -30px;
    }
    
    .related-scroll-arrow.right {
        right: -30px;
    }
    
    .related-scroll-wrapper-details .book-card {
        width: 120px;
    }
    
    .related-scroll-wrapper-details .book-cover {
        height: 160px !important;
        width: 100px !important;
    }
    
    .related-scroll-wrapper-details .book-title {
        font-size: 0.8rem !important;
        max-width: 100px;
    }
    
    .related-scroll-wrapper-details .book-author {
        font-size: 0.6rem !important;
        max-width: 100px;
    }
}

/* ==================== تأثيرات خاصة ==================== */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* تحسين أداء التمرير */
* {
    scroll-behavior: smooth;
}

/* ==================== الحالة النشطة للحقول ==================== */
.search-bar input:focus {
    background: rgba(255, 255, 255, 0.05);
}