/* =========================
   RIWAYA PDF READER PRO
   ========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    transition: 0.3s;
}

/* LIGHT MODE */
body.light {
    background: #f4f6f9;
    color: #111;
}

/* DARK MODE */
body.dark {
    background: #0f172a;
    color: #e5e7eb;
}
/* prevent text selection */
body {
    user-select: none;
}
/* prevent text selection */
body {
    user-select: none;
}
/* PAGE STRUCTURE */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================= HEADER ================= */
.reader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 18px;

    background: white;

    border-bottom: 1px solid #e5e7eb;

    position: sticky;
    top: 0;
    z-index: 10;
}

/* DARK HEADER */
body.dark .reader-header {
    background: #111827;
    border-bottom: 1px solid #1f2937;
}

/* TITLE */
.reader-header h2 {
    font-size: 16px;
    text-align: center;
}

/* BUTTONS */
.back-btn,
.mode-btn {
    border: none;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
}

/* BACK */
.back-btn {
    background: #3b82f6;
    color: white;
}

/* MODE */
.mode-btn {
    background: #e5e7eb;
}

/* ================= PDF ================= */
.reader-container {
    width: 100%;
    height: 90vh;

    padding: 10px;
}

/* IFRAME */
.reader-container iframe {
    width: 100%;
    height: 100%;

    border: none;

    border-radius: 12px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ================= PROGRESS ================= */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;

    width: 100%;
    height: 4px;

    background: rgba(0,0,0,0.1);
}

#progress {
    height: 100%;
    width: 0;
    background: #3b82f6;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

    .reader-header {
        flex-direction: column;
        gap: 8px;
    }

    .reader-container {
        height: 85vh;
        padding: 5px;
    }

    .back-btn,
    .mode-btn {
        width: 100%;
    }
}