   body { font-family: 'Vazirmatn', sans-serif; background-color: #f0f2f5; color: #2c3e50; margin: 0; padding: 20px; height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; }
        .header { text-align: center; margin-bottom: 15px; }
        .header h1 { margin: 0; font-size: 22px; color: #34495e; }
        
        .editor-container { display: flex; gap: 20px; flex: 1; height: 100%; min-height: 0; }
        .pane { flex: 1; background: #ffffff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #e0e0e0; }
        
        /* استایل نوار ابزار */
        .toolbar { background: #ecf0f1; padding: 10px 15px; border-bottom: 1px solid #e0e0e0; display: flex; justify-content: space-between; align-items: center; }
        .pane-title { font-weight: bold; font-size: 14px; color: #7f8c8d; }
        .btn-group { display: flex; gap: 8px; }
        button { font-family: inherit; font-size: 12px; padding: 6px 12px; border: none; border-radius: 6px; cursor: pointer; transition: 0.2s; background: #bdc3c7; color: #2c3e50; font-weight: bold; }
        button:hover { background: #95a5a6; color: white; }
        button.primary { background: #3498db; color: white; }
        button.primary:hover { background: #2980b9; }
        button.success { background: #2ecc71; color: white; }
        button.success:hover { background: #27ae60; }
        button.danger { background: #e74c3c; color: white; }
        button.danger:hover { background: #c0392b; }

        textarea { flex: 1; width: 100%; border: none; resize: none; padding: 20px; font-family: 'Vazirmatn', monospace; font-size: 15px; line-height: 1.8; outline: none; box-sizing: border-box; direction: ltr; text-align: right; }
        .output-content { flex: 1; padding: 20px 30px; overflow-y: auto; line-height: 2; font-size: 16px; }
        
        mjx-container { direction: ltr !important; }
        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: #f1f1f1; }
        ::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
        
        /* استایل جداول */
        .output-content table { width: auto; min-width: 50%; margin: 25px auto; border-collapse: collapse; background-color: #ffffff; box-shadow: 0 3px 10px rgba(0,0,0,0.08); border-radius: 8px; overflow: hidden; }
        .output-content th, .output-content td { border: 1px solid #dcdde1; padding: 12px 20px; text-align: center; }
        .output-content th { background-color: #f1f2f6; border-bottom: 2px solid #a4b0be; }
        .output-content tr:nth-child(even) { background-color: #fbfbfb; }

        /* تنظیمات اختصاصی برای پرینت و ذخیره PDF */
        @media print {
            body { padding: 0; background-color: white; height: auto; }
            .header, .pane:first-child, .toolbar { display: none !important; }
            .editor-container { display: block; }
            .pane:last-child { border: none; box-shadow: none; overflow: visible; display: block; }
            .output-content { padding: 0; overflow: visible; height: auto; }
            table, mjx-container { page-break-inside: avoid; }
        }
        
        @media (max-width: 768px) { .editor-container { flex-direction: column; } }