.mo-widget-container { font-family: iranyekan, tahoma, sans-serif; direction: rtl; text-align: right; margin: 20px 0; }

/* Banner */
.mo-banner { 
    background-color: #fcf4d9; 
    border-radius: 30px; 
    padding: 40px; 
    border: 1px solid #f2e4b3; 
    position: relative;
    overflow: hidden;
}

.mo-top-left-badge {
    position: absolute;
    top: 30px;
    left: 40px;
    font-size: 24px;
    font-weight: 900;
    color: rgba(49, 49, 49, 0.15);
    letter-spacing: 2px;
    pointer-events: none;
}

.mo-banner-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.mo-banner-content { flex: 1.5; z-index: 2; }
.mo-banner-visual { flex: 1; display: flex; justify-content: center; align-items: center; z-index: 1; }

.mo-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.mo-logo { max-height: 50px; }
.mo-logo-text { font-size: 26px; font-weight: 900; color: #313131; margin: 0; }
.mo-version { background-color: #fff; color: #555; padding: 4px 12px; border-radius: 50px; font-size: 13px; font-weight: bold; border: 1px solid #eee; }
.mo-title { font-size: 26px; font-weight: 900; color: #313131; margin-bottom: 15px; line-height: 1.4; }
.mo-desc { font-size: 15px; color: #555; line-height: 1.8; margin-bottom: 30px; }

/* Actions */
.mo-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mo-btn { text-decoration: none; padding: 12px 24px; border-radius: 50px; font-weight: bold; font-size: 14px; cursor: pointer; border: none; transition: 0.3s; display: inline-block; text-align: center;}
.mo-btn-dark { background-color: #313131; color: #fff; }
.mo-btn-dark:hover { background-color: #000; color: #fff; }
.mo-btn-outline { background-color: transparent; border: 2px solid #313131; color: #313131; }
.mo-btn-outline:hover { background-color: #313131; color: #fff; }

.mo-github-link { display: inline-flex; align-items: center; justify-content: center; color: #666; text-decoration: underline; background: none; transition: 0.3s; }
.mo-github-icon { width: 36px; height: 36px; transition: transform 0.3s; }
.mo-github-link:hover .mo-github-icon { transform: scale(1.1); }

/* =======================================
   المان سه‌بعدی مکعب (Pure CSS)
======================================= */
.mo-css-cube-wrapper { perspective: 800px; }
.mo-css-cube {
    width: 140px; height: 140px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 12s infinite linear;
}
.mo-css-cube .face {
    position: absolute; width: 140px; height: 140px;
    background: rgba(255, 255, 255, 0.4);
    border: 3px solid rgba(49, 49, 49, 0.2);
    border-radius: 16px;
    display: flex; justify-content: center; align-items: center;
    font-size: 50px; font-family: monospace; font-weight: bold; color: #313131;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.05);
    backdrop-filter: blur(4px);
}
.mo-css-cube .front  { transform: translateZ(70px); background: rgba(252, 213, 53, 0.3); }
.mo-css-cube .back   { transform: rotateY(180deg) translateZ(70px); }
.mo-css-cube .right  { transform: rotateY(90deg) translateZ(70px); }
.mo-css-cube .left   { transform: rotateY(-90deg) translateZ(70px); }
.mo-css-cube .top    { transform: rotateX(90deg) translateZ(70px); }
.mo-css-cube .bottom { transform: rotateX(-90deg) translateZ(70px); }

@keyframes rotateCube {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

/* Feedback Form */
.mo-feedback-box { background: #fff; padding: 25px; border-radius: 20px; border: 1px solid #eee; margin-top: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.03); }
.mo-feedback-box h4 { margin-top: 0; margin-bottom: 15px; color: #313131; font-size: 16px; font-weight: bold; }
.mo-form { display: flex; gap: 10px; flex-wrap: wrap; }
.mo-form input { flex: 1; min-width: 200px; padding: 12px; border: 1px solid #ddd; border-radius: 10px; font-family: inherit; font-size: 13px; }
.mo-form textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 10px; font-family: inherit; font-size: 13px; resize: none; }
.mo-form button { flex-shrink: 0; }

/* Modal */
.mo-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 999999; display: none; justify-content: center; align-items: center; }
.mo-modal-overlay.active { display: flex; }
.mo-modal-box { background: #fff; width: 90%; max-width: 950px; height: 80vh; border-radius: 20px; position: relative; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.mo-close-modal { position: absolute; top: 15px; left: 15px; background: none; border: none; font-size: 24px; cursor: pointer; color: #888; z-index: 10; transition: 0.2s;}
.mo-close-modal:hover { color: #000; transform: scale(1.1); }
.mo-modal-layout { display: flex; height: 100%; overflow: hidden; }
.mo-sidebar { width: 260px; background: #f9f9f9; border-left: 1px solid #eee; padding: 25px 15px; overflow-y: auto; flex-shrink: 0;}
.mo-sidebar-title { font-size: 13px; color: #999; margin-bottom: 12px; }
.mo-tab-btn { width: 100%; text-align: right; padding: 12px 15px; background: none; border: none; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 14px; color: #555; font-weight: bold; margin-bottom: 5px; transition: 0.2s;}
.mo-tab-btn.active, .mo-tab-btn:hover { background: #eefbe3; color: #313131; }
.mo-content { flex: 1; padding: 40px; overflow-y: auto; }
.mo-tab-content { display: none; }
.mo-tab-content.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.mo-content h2 { margin-top: 0; color: #313131; font-size: 24px; margin-bottom: 15px; }
.mo-content p { color: #555; line-height: 1.8; font-size: 15px; }
.mo-feature-grid { display: flex; gap: 20px; margin-top: 25px; flex-wrap: wrap; }
.mo-feature-card { flex: 1; min-width: 250px; background: #fdfdfd; padding: 20px; border-radius: 15px; border: 1px solid #eee; }
.mo-list { padding-right: 20px; }
.mo-list li { margin-bottom: 12px; line-height: 1.8; color: #555; }

/* حل مشکل بیرون زدن کدهای طولانی */
.mo-code-block { 
    background: #2b2b2b; 
    color: #d4d4d4; 
    padding: 20px; 
    border-radius: 12px; 
    direction: ltr; 
    text-align: left; 
    font-family: monospace; 
    font-size: 14px; 
    margin-top: 15px; 
    line-height: 1.6; 
    overflow-x: auto; /* اسکرول افقی برای کدهای طولانی */
    white-space: pre; 
}

/* =======================================
   تنظیمات ریسپانسیو (موبایل و تبلت)
======================================= */
@media (max-width: 992px) {
    .mo-banner-layout { flex-direction: column-reverse; text-align: center; gap: 30px; }
    .mo-banner-content { width: 100%; }
    .mo-header { justify-content: center; }
    .mo-actions { justify-content: center; }
    
    .mo-top-left-badge { position: relative; top: 0; left: 0; display: block; text-align: center; margin-bottom: 20px; }
    
    /* کوچک کردن مکعب در موبایل */
    .mo-css-cube-wrapper { transform: scale(0.8); margin-top: 10px; }

    /* ریسپانسیو فرم فیدبک */
    .mo-form { flex-direction: column; }
    .mo-form input, .mo-form textarea, .mo-form button { width: 100%; }

    /* ریسپانسیو مودال آموزش - رفع کامل باگ‌ها */
    .mo-modal-box { 
        width: 95%; 
        height: 90vh; 
    }
    
    /* دکمه بستن مشخص‌تر روی موبایل */
    .mo-close-modal {
        background: #fff;
        border-radius: 50%;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        top: 10px;
        left: 10px;
        z-index: 99;
    }

    .mo-modal-layout { flex-direction: column; }
    
    .mo-sidebar { 
        width: 100%; 
        height: auto; 
        border-left: none; 
        border-bottom: 1px solid #eee; 
        padding: 15px 15px 10px 15px; 
        flex-shrink: 0; /* جلوگیری از فشرده شدن منو */
    }
    
    /* افقی کردن اسکرول تب‌ها در موبایل با تاچ روان */
    .mo-sidebar-scroll { 
        display: flex; 
        overflow-x: auto; 
        gap: 10px; 
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch; /* اسکرول نرم در آیفون/اندروید */
    }
    
    /* مخفی کردن نوار اسکرول زشت پایین تب‌ها */
    .mo-sidebar-scroll::-webkit-scrollbar { height: 3px; }
    .mo-sidebar-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }
    
    .mo-tab-btn { 
        white-space: nowrap; 
        margin-bottom: 0; 
        padding: 8px 16px; 
        width: auto; 
    }
    
    .mo-content { padding: 20px 15px; }
    .mo-content h2 { font-size: 20px; }
}