.container {
            font-family: 'Lotus Linotype' !important;
            background: #f5f5f7;
            margin: 0;
            padding: 0;
            color: #111827;
        }
        .container {
            max-width: 1200px;
            margin: 16px auto;
            padding: 0 12px 40px;
        }

        /* شريط علوي ثابت */
        .toolbar-wrapper {
            position: sticky;
            top: 0;
            z-index: 30;
            background: linear-gradient(to bottom, #f5f5f7 0, rgba(245,245,247,0) 100%);
            padding-top: 4px;
            margin-bottom: 8px;
        }

        .toolbar {
            background: #ffffff;
            border-radius: 12px;
            padding: 12px 16px;
            margin-bottom: 8px;
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            align-items: center;
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
        }
        .toolbar label {
            font-size: 16px;
            margin-right: 4px;
        }
        .toolbar select,
        .toolbar input,
        .toolbar button {
            padding: 6px 10px;
            border-radius: 8px;
            border: 1px solid #d1d5db;
            font-size: 13px;
        }
        .toolbar button {
            background: #2563eb;
            color: #ffffff;
            border-color: #2563eb;
            cursor: pointer;
        }
        .toolbar button.secondary {
            background: #ffffff;
            color: #111827;
        }

        .toolbar button,
        .nav-buttons button,
        .search-result-item button {
            transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
        }
        .toolbar button:hover,
        .nav-buttons button:hover,
        .search-result-item button:hover {
            opacity: 0.95;
            transform: translateY(-1px);
            box-shadow: 0 4px 10px rgba(37, 99, 235, 0.18);
        }

        .book-viewer {
            background: #f8fafc;
            border-radius: 16px;
            box-shadow: 0 14px 35px rgba(15, 23, 42, 0.09);
            padding: 18px;
            position: relative;
        }
        .book-title {
            font-size: 18px;
            text-align: center;
            font-weight: 600;
            margin-bottom: 4px;
        }
        #book-status {
            text-align: center;
            font-size: 17px;
            color: #6b7280;
            margin-bottom: 6px;
        }

        .pages-wrapper {
            display: flex;
            gap: 12px;
            justify-content: center;
            align-items: stretch;
            margin-top: 8px;
            position: relative;
        }

        /* عمود الفاصل في منتصف الكتاب (شكل الكتاب الحقيقي) */
        .pages-wrapper::before {
            content: '';
            position: absolute;
            top: 10px;
            bottom: 10px;
            width: 2px;
            background: linear-gradient(to bottom, #e5e7eb, #cbd5f5, #e5e7eb);
            left: 50%;
            transform: translateX(-50%);
            opacity: 0.7;
            pointer-events: none;
        }

        .page-card {
            background: #e5e7eb;
            border-radius: 8px;
            padding: 4px;
            width: 48%;
            display: flex;
            flex-direction: column;
            box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.4);
        }
        .page-inner {
            background: #ffffff;
            border-radius: 4px;
            flex: 1;
            overflow: hidden;
            position: relative;
        }

        .page-tiles-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            grid-template-rows: repeat(5, 1fr);
            width: 100%;
            height: 0;
            padding-bottom: 140%;
            direction: ltr;
        }
        .page-tiles-grid img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            user-select: none;
            pointer-events: none;
        }

        .page-footer {
            font-size: 17px;
            padding: 4px 6px;
            text-align: center;
            color: #4b5563;
            border-top: 1px dashed #e5e7eb;
            background: #f9fafb;
        }

        .nav-buttons {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 12px;
        }
        .nav-buttons button {
            min-width: 80px;
        }

        .search-result-info {
            text-align: center;
            font-size: 17px;
            color: #6b7280;
            margin-top: 4px;
        }

        #search-panel {
            margin-bottom: 12px;
        }

        .search-results-list {
            margin-top: 8px;
            max-height: 220px;
            overflow-y: auto;
            background: #f9fafb;
            border-radius: 10px;
            border: 1px solid #e5e7eb;
            padding: 6px 8px;
        }
        .search-result-item {
            border-bottom: 1px dashed #e5e7eb;
            padding: 6px 4px;
            font-size: 17px;
        }
        .search-result-item:last-child {
            border-bottom: none;
        }
        .search-result-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 6px;
            margin-bottom: 4px;
        }
        .search-result-title {
            font-weight: 600;
            color: #111827;
            font-size: 17px;
        }
        .search-result-meta {
            font-size: 13px;
            color: #6b7280;
        }
        .search-result-snippet {
            font-size: 17px;
            color: #4b5563;
            line-height: 1.5;
        }
        .search-result-item button {
            padding: 3px 8px;
            border-radius: 6px;
            border: 1px solid #2563eb;
            background: #2563eb;
            color: #ffffff;
            font-size: 15px;
            cursor: pointer;
            white-space: nowrap;
        }
        .search-result-item.active {
            background: #e0ecff;
            border-radius: 8px;
            border: 1px solid #bfdbfe;
        }

        /* موبايل: صفحة واحدة فقط + ترتيب أجمل */
        @media (max-width: 768px) {
            .container {
                padding: 0 8px 24px;
            }

            .toolbar {
                flex-direction: column;
                align-items: stretch;
            }
            .toolbar > div,
            #search-form {
                width: 100%;
            }

            .pages-wrapper {
                display: block;
                margin-top: 4px;
            }
            .pages-wrapper::before {
                display: none; /* لا نحتاج الفاصل في صفحة واحدة */
            }

            .page-card {
                width: 100%;
                margin-bottom: 12px;
            }

            /* إخفاء الصفحة اليسرى بالكامل */
            .leftpage {
                display: none !important;
            }

            /* الصفحة اليمنى فقط */
            .rightpage {
                width: 100%;
            }

            .nav-buttons {
                margin-top: 4px;
            }
        }