@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');
        :root {
            --primary: #1a1a2e;
            --accent: #0f3460;
            --accent-light: #16213e;
            --highlight: #e94560;
            --bg: #fafafa;
            --sidebar-bg: #0f0f23;
            --sidebar-text: #b0b0c0;
            --sidebar-active: #e94560;
            --text: #2d2d2d;
            --light-text: #777;
            --border: #e8e8e8;
            --card-bg: #fff;
            --success: #27ae60;
            --gold: #f39c12;
            --font-size: 17px;
        }
        /* Dark theme */
        body.dark {
            --primary: #e0e0f0;
            --accent: #6fa3d6;
            --accent-light: #1e2a3a;
            --highlight: #ff6b81;
            --bg: #121220;
            --sidebar-bg: #0a0a18;
            --sidebar-text: #9090a0;
            --text: #d8d8e0;
            --light-text: #888;
            --border: #2a2a3a;
            --card-bg: #1a1a2e;
            --success: #4ae080;
        }
        body.dark .left-panel { background: #1a1a2e; }
        body.dark .comment-form { border-color: #2a2a3a; }
        body.dark .form-input { background: #121220; border-color: #2a2a3a; color: #d8d8e0; }
        body.dark .panel-tabs { border-color: #2a2a3a; }
        body.dark .comment-item { border-color: #2a2a3a; }
        body.dark .donation-item { border-color: #222235; }
        body.dark .reader-bar {
            background: rgba(18, 18, 32, 0.88);
            border-color: #2a2a3a;
        }
        body.dark .rb-font-group { background: rgba(255,255,255,0.04); border-color: #333; }
        body.dark .rb-btn:hover { background: rgba(255,255,255,0.08); }
        body.dark .left-panel-close { background: #2a2a3a; color: #ccc; }
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: 'Vazirmatn', 'Tahoma', sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 2;
            font-size: var(--font-size);
            transition: background 0.3s, color 0.3s;
        }
        .layout { display: flex; min-height: 100vh; }
        .sidebar {
            width: 300px; background: var(--sidebar-bg); color: var(--sidebar-text);
            position: fixed; top: 0; right: 0; height: 100vh; overflow-y: auto;
            z-index: 100; transition: transform 0.3s ease;
            border-left: 1px solid rgba(255,255,255,0.05);
        }
        .sidebar-header {
            padding: 30px 20px; text-align: center;
            background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .sidebar-header h2 { font-size: 1.6em; color: #fff; margin-bottom: 5px; font-weight: 800; }
        .sidebar-header p { font-size: 0.8em; color: rgba(255,255,255,0.7); }
        .sidebar ul { list-style: none; padding: 15px 0; }
        .sidebar li a {
            display: block; padding: 10px 25px; color: var(--sidebar-text);
            text-decoration: none; font-size: 0.88em; transition: all 0.2s;
            border-right: 3px solid transparent;
        }
        .sidebar li a:hover {
            background: var(--accent-light); color: #fff; border-right-color: var(--highlight);
        }
        .sidebar li a.active {
            background: var(--accent-light); color: var(--highlight);
            border-right-color: var(--highlight); font-weight: 600;
        }
        .main {
            flex: 1; margin-right: 300px; margin-left: 280px;
            padding: 96px 60px 50px; max-width: 100%;
            background: var(--card-bg); min-height: 100vh;
            box-shadow: -2px 0 15px rgba(0,0,0,0.05);
        }

        /* ========== Left Panel: Comments + Donations (متمم style) ========== */
        .left-panel {
            width: 280px; position: fixed; top: 0; left: 0; height: 100vh;
            background: #fff; z-index: 50;
            overflow-y: auto; padding: 0;
            border-right: 1px solid #444;
        }
        .left-panel-header {
            padding: 28px 22px 18px;
            color: var(--text);
            border-bottom: 1px solid #f0f0f0;
        }
        .left-panel-header h3 { font-size: 1em; font-weight: 800; margin-bottom: 2px; color: var(--primary); }
        .left-panel-header p { font-size: 0.72em; color: #aaa; }
        .left-panel-body { padding: 0 22px 22px; }
        
        /* Section tabs - minimal */
        .panel-tabs {
            display: flex; gap: 0; margin-bottom: 0;
            border-bottom: 2px solid #f0f0f0;
        }
        .panel-tab {
            flex: 1; padding: 12px 8px; text-align: center;
            font-size: 0.82em; font-weight: 600; cursor: pointer;
            transition: all 0.2s; color: #bbb;
            border: none; background: transparent; font-family: inherit;
            border-bottom: 2px solid transparent;
            margin-bottom: -2px;
        }
        .panel-tab.active {
            color: var(--highlight);
            border-bottom-color: var(--highlight);
        }
        .panel-tab:hover:not(.active) {
            color: var(--text);
        }
        
        /* Tab content */
        .tab-content { display: none; padding-top: 16px; }
        .tab-content.active { display: block; }
        
        /* Comments - متمم style: NO borders, NO boxes, NO shadows, just text */
        .comment-item {
            padding: 14px 0;
            border-bottom: 1px solid #f5f5f5;
        }
        .comment-item:last-child { border-bottom: none; }
        .comment-name {
            font-size: 0.82em; font-weight: 600; color: var(--text);
            margin-left: 6px;
        }
        .comment-date {
            font-size: 0.68em; color: var(--highlight);
        }
        .comment-text {
            font-size: 0.78em; line-height: 2; color: #666;
            margin-top: 5px;
        }
        
        /* Donation section - minimal */

        .donation-item {
            display: flex; align-items: center; gap: 8px;
            padding: 8px 0;
            border-bottom: 1px solid #f8f8f8;
        }
        .donation-item:last-child { border-bottom: none; }
        .donation-name {
            font-size: 0.8em; font-weight: 500; color: var(--text);
            flex: 1;
        }
        .donation-amount {
            font-size: 0.78em; font-weight: 700; color: var(--success);
            white-space: nowrap;
        }
        .donation-date {
            font-size: 0.62em; color: #ccc;
        }
        
        /* Donate button - minimal */
        .donate-btn {
            display: block; width: 100%; padding: 10px; margin-top: 16px;
            background: var(--highlight); color: #fff; border: none;
            border-radius: 6px; font-size: 0.85em; font-weight: 600;
            cursor: pointer; font-family: inherit; transition: background 0.2s;
        }
        .donate-btn:hover {
            background: #c0392b;
        }
        
        /* ========== Forms - minimal متمم style ========== */
        .comment-form {
            padding: 14px 0 0;
            margin-bottom: 6px;
            border-bottom: 1px solid #f0f0f0;
        }
        .form-row {
            margin-bottom: 8px;
        }
        .form-input {
            width: 100%; padding: 8px 10px;
            border: 1px solid #e8e8e8; border-radius: 5px;
            font-family: inherit; font-size: 0.8em;
            color: var(--text); background: #fafafa;
            transition: border-color 0.2s;
            outline: none;
        }
        .form-input:focus {
            border-color: var(--highlight);
        }
        .form-textarea {
            resize: vertical; min-height: 60px; line-height: 1.7;
        }
        .form-submit {
            width: 100%; padding: 8px; margin-bottom: 14px;
            background: var(--highlight); color: #fff; border: none;
            border-radius: 5px; font-size: 0.82em; font-weight: 600;
            cursor: pointer; font-family: inherit; transition: background 0.2s;
        }
        .form-submit:hover {
            background: #c0392b;
        }
        .form-submit-green {
            background: var(--success);
        }
        .form-submit-green:hover {
            background: #219a52;
        }
        
        /* ========== Chapter title with reading time ========== */
        .chapter-title-wrapper {
            display: flex; align-items: center; gap: 14px;
            margin-bottom: 35px; padding-bottom: 18px;
            border-bottom: 4px solid var(--highlight);
            flex-wrap: wrap;
        }
        .chapter-title {
            font-size: 2.2em; color: var(--primary);
            font-weight: 800; line-height: 1.4; margin: 0;
        }
        .reading-time-badge {
            display: inline-flex; align-items: center; gap: 5px;
            background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
            color: var(--accent); font-size: 0.78em; font-weight: 600;
            padding: 5px 14px; border-radius: 20px;
            border: 1px solid #d0d8e8;
            white-space: nowrap;
        }
        .reading-time-badge svg {
            flex-shrink: 0;
        }
        
        .chapter-content { animation: fadeIn 0.4s ease; }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(15px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .chapter-body h2 {
            font-size: 1.5em; color: var(--accent); margin: 35px 0 15px;
            padding-right: 18px; border-right: 5px solid var(--highlight); font-weight: 700;
        }
        .chapter-body h3 {
            font-size: 1.25em; color: var(--primary); margin: 28px 0 12px; font-weight: 600;
        }
        .chapter-body p {
            margin-bottom: 18px; text-align: justify; line-height: 2.2;
        }
        .chapter-body blockquote {
            background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
            border-right: 5px solid var(--accent); padding: 18px 25px; margin: 25px 0;
            border-radius: 0 12px 12px 0; font-style: italic; color: var(--accent); line-height: 2;
        }
        .chapter-body ul, .chapter-body ol { margin: 15px 30px; padding-right: 25px; }
        .chapter-body li { margin-bottom: 10px; line-height: 2; }
        .chapter-body strong { color: var(--primary); font-weight: 700; }
        .chapter-body em { color: var(--accent); }
        .chapter-body code {
            background: #f0f0f0; padding: 2px 6px; border-radius: 4px;
            font-family: 'Vazirmatn', monospace; font-size: 0.9em;
        }
        /* English/LTR chapter styling */
        .chapter-body-ltr {
            direction: ltr; text-align: left;
        }
        .chapter-body-ltr h2 {
            padding-right: 0; padding-left: 18px;
            border-right: none; border-left: 5px solid var(--highlight);
        }
        .chapter-body-ltr p {
            text-align: justify;
        }
        .chapter-body-ltr ul, .chapter-body-ltr ol {
            margin: 15px 30px; padding-left: 25px; padding-right: 0;
        }
        .chapter-body-ltr blockquote {
            border-right: none; border-left: 5px solid var(--accent);
            border-radius: 12px 0 0 12px;
        }
        .chapter-nav {
            display: flex; justify-content: space-between; align-items: center;
            margin-top: 50px; padding-top: 25px; border-top: 2px solid var(--border);
        }
        .nav-btn {
            padding: 12px 30px; background: var(--accent); color: white;
            text-decoration: none; border-radius: 8px; font-weight: 600;
            transition: all 0.2s; font-size: 0.95em;
        }
        .nav-btn:hover { background: var(--highlight); transform: translateY(-2px); }
        .progress-bar {
            position: fixed;
            top: 0;
            left: 280px;
            right: 300px;
            height: 4px;
            background: #eee;
            z-index: 300;
            direction: ltr;
        }
        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--highlight), var(--accent));
            transition: width 0.3s ease;
            width: 0%;
        }
        @media (max-width: 1400px) {
            .progress-bar { left: 0; right: 300px; }
        }
        @media (max-width: 900px) {
            .progress-bar { left: 0; right: 0; }
        }
        /* ========== Reader top bar ========== */
        .reader-bar {
            position: fixed;
            top: 4px;
            left: 280px;
            right: 300px;
            height: 52px;
            z-index: 190;
            background: rgba(255, 255, 255, 0.82);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border-bottom: 1px solid var(--border);
            box-shadow: 0 1px 12px rgba(0, 0, 0, 0.04);
            transition: background 0.3s, border-color 0.3s, left 0.3s, right 0.3s;
        }
        .reader-bar-inner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 100%;
            padding: 0 14px;
            gap: 10px;
        }
        .reader-bar-brand {
            font-size: 0.88em;
            font-weight: 700;
            color: var(--primary);
            letter-spacing: -0.02em;
            opacity: 0.85;
            flex: 1;
            text-align: center;
            text-decoration: none;
            user-select: none;
        }
        .reader-bar-brand:hover {
            opacity: 1;
            text-decoration: none;
        }
        .reader-bar-actions {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .rb-font-group {
            display: flex;
            align-items: center;
            gap: 2px;
            padding: 3px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: rgba(0, 0, 0, 0.03);
        }
        .rb-font-size {
            font-size: 0.72em;
            font-weight: 600;
            color: var(--light-text);
            min-width: 22px;
            text-align: center;
            font-variant-numeric: tabular-nums;
        }
        .rb-font-btn { width: 32px; height: 32px; border-radius: 999px; }
        .rb-type {
            font-weight: 700;
            line-height: 1;
            color: var(--text);
        }
        .rb-type-sm { font-size: 0.72em; }
        .rb-type-lg { font-size: 1.05em; }
        .rb-btn {
            width: 36px;
            height: 36px;
            border: none;
            background: transparent;
            border-radius: 10px;
            color: var(--text);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background 0.18s, color 0.18s, transform 0.12s;
            font-family: inherit;
            flex-shrink: 0;
        }
        .rb-btn svg {
            width: 18px;
            height: 18px;
        }
        .rb-btn:hover {
            background: rgba(0, 0, 0, 0.06);
        }
        .rb-btn:active {
            transform: scale(0.94);
        }
        .rb-theme .icon-sun { display: none; }
        body.dark .rb-theme .icon-moon { display: none; }
        body.dark .rb-theme .icon-sun { display: block; }
        .rb-menu { display: none; }
        .rb-panel { display: none; }
        @media (max-width: 1400px) {
            .reader-bar { left: 0; right: 300px; }
            .rb-panel { display: inline-flex; }
        }
        @media (max-width: 900px) {
            .reader-bar { left: 0; right: 0; }
            .rb-menu { display: inline-flex; }
            .reader-bar-brand { display: block; }
            .main { padding: 88px 20px 25px !important; }
        }
        @media (min-width: 901px) {
            .reader-bar-brand { display: none; }
        }
        .close-btn {
            display: none; position: absolute; top: 15px; left: 15px; z-index: 200;
            background: var(--highlight); color: white; border: none; padding: 5px 12px;
            border-radius: 6px; font-size: 1.1em; cursor: pointer;
        }
        
        /* Scrollbar styling for left panel */
        .left-panel::-webkit-scrollbar { width: 3px; }
        .left-panel::-webkit-scrollbar-track { background: transparent; }
        .left-panel::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 2px; }
        
        @media (max-width: 1400px) {
            .left-panel {
                display: none; position: fixed; top: 0; left: 0; right: auto;
                width: 300px; height: 100vh; z-index: 150;
                border-right: 1px solid #444; border-left: none;
                box-shadow: 4px 0 20px rgba(0,0,0,0.15);
                transform: translateX(-100%); transition: transform 0.3s ease;
            }
            .left-panel.open { display: block; transform: translateX(0); }
            .main { margin-left: 0; }
            .left-panel-close { display: block; }
        }
        @media (min-width: 1401px) and (max-width: 1600px) {
            .main { padding: 40px 40px; }
        }
        @media (max-width: 900px) {
            .sidebar { transform: translateX(100%); z-index: 200; top: 56px; height: calc(100vh - 56px); }
            .sidebar.open { transform: translateX(0); }
            .left-panel {
                display: none; position: fixed; top: 56px; left: 0; right: auto;
                width: 300px; height: calc(100vh - 56px); z-index: 200;
                border-right: 1px solid #444; border-left: none;
                box-shadow: 4px 0 20px rgba(0,0,0,0.15);
                transform: translateX(-100%); transition: transform 0.3s ease;
            }
            .left-panel.open { display: block; transform: translateX(0); }
            .main { margin-right: 0; padding: 88px 20px 25px; }
            .close-btn { display: block; }
            .chapter-title-wrapper {
                flex-direction: column; align-items: flex-start; gap: 8px;
            }
        }
        
        /* Left panel close button (hidden on desktop) */
        .left-panel-close {
            display: none; position: absolute; top: 12px; right: 12px; z-index: 200;
            background: #eee; color: #555; border: none; padding: 4px 10px;
            border-radius: 4px; font-size: 1em; cursor: pointer; font-family: inherit;
        }
        .left-panel-close:hover { background: #ddd; }
        
        .hp-field {
            position: absolute;
            left: -9999px;
            width: 1px;
            height: 1px;
            overflow: hidden;
            opacity: 0;
            pointer-events: none;
        }
        .panel-empty {
            font-size: 0.82em;
            color: #999;
            text-align: center;
            padding: 20px 10px;
            line-height: 1.6;
        }
        body.dark .panel-empty { color: #777; }
        .panel-error { color: var(--highlight); }
        .form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
