/* ==========================================================================
   ST LMS - EKSİKSİZ VE TEMA BASKISINI KIRAN (SHIELDED) CSS
========================================================================== */

/* 1. DOCK GİZLEME KONTROLÜ */
body:has(.st-modal-overlay[style*="display: flex"]), 
body:has(.bank-modal-overlay[style*="display: flex"]),
body:has(.st-src-modal[style*="display: flex"]) {
    #st-smart-dock { display: none; }
}

/* 2. ANA TAŞIYICI VE EKRANLAR */
#st-app-container.st-ml-app { font-family: 'Inter', sans-serif; background-color: #f1f5f9; color: #1e293b; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; position: relative; width: 100%; box-sizing: border-box; }
#st-app-container.st-ml-fullscreen { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 999999; margin: 0; padding: 0; max-width: none; border-radius: 0; }
#st-app-container.st-ml-app .st-screen { background-color: transparent; padding: 40px 20px; max-width: 800px; margin: 0 auto; width: 100%; overflow-y: auto; display: none; flex-direction: column; box-sizing: border-box; }
#st-app-container.st-ml-app .st-screen.active { display: flex; }

/* 3. BAŞLIK VE AÇIKLAMA */
#st-app-container.st-ml-app .st-course-header { text-align: center; margin-bottom: 40px; background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%); padding: 40px 20px; border-radius: 24px; color: #ffffff; box-shadow: 0 15px 30px -5px rgba(59, 130, 246, 0.4); }
#st-app-container.st-ml-app .st-course-title { font-size: 2.5rem; font-weight: 900; color: #ffffff; margin-bottom: 15px; text-shadow: 0 2px 4px rgba(0,0,0,0.15); line-height: 1.2; }
#st-app-container.st-ml-app #course-desc { color: #eff6ff; font-size: 1.05rem; line-height: 1.6; max-width: 90%; margin: 0 auto; }

/* 4. ÜNİTE VE KONU BUTONLARI (MÜFREDAT) */
#st-app-container.st-ml-app .st-unit-box { background-color: #ffffff; border: 1px solid #cbd5e1; border-radius: 20px; padding: 25px; margin-bottom: 25px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); }
#st-app-container.st-ml-app .st-unit-title { font-size: 1.25rem; font-weight: 800; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; margin-bottom: 15px; color: #1e293b; }
#st-app-container.st-ml-app button.st-topic-btn { width: 100%; text-align: left; background-color: #f8fafc; border: 2px solid #cbd5e1; padding: 15px 20px; border-radius: 12px; font-size: 1.05rem; font-weight: 700; color: #334155; cursor: pointer; transition: 0.2s; margin-bottom: 10px; display: flex; justify-content: space-between; box-shadow: 0 2px 4px rgba(0,0,0,0.02); box-sizing: border-box;}
#st-app-container.st-ml-app button.st-topic-btn:hover { background-color: #eff6ff; border-color: #3b82f6; color: #1d4ed8; transform: translateY(-2px); box-shadow: 0 4px 6px rgba(59,130,246,0.1); }
#st-app-container.st-ml-app button.st-topic-btn.active-topic { background-color: #e0e7ff; border-color: #4f46e5; color: #312e81; box-shadow: 0 0 0 3px rgba(79,70,229,0.2); transform: scale(1.02); }

/* 5. DASHBOARD KARTLARI */
#st-app-container.st-ml-app .st-dash-card { background-color: #ffffff; border: 2px solid #cbd5e1; padding: 20px; border-radius: 16px; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; }
#st-app-container.st-ml-app .st-list-card { background-color: #ffffff; border: 2px solid #cbd5e1; padding: 20px; border-radius: 16px; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap:15px; }
#st-app-container.st-ml-app .st-list-card:hover { border-color: #3b82f6; box-shadow: 0 5px 15px rgba(59,130,246,0.1); }

/* 6. DASHBOARD BUTONLARI */
#st-app-container.st-ml-app button.st-dash-btn { padding: 10px 15px; border-radius: 10px; font-weight: bold; border: none; cursor: pointer; transition: 0.2s; font-size:0.9rem; font-family: 'Inter', sans-serif;}
#st-app-container.st-ml-app button.st-dash-btn-primary { background: #3b82f6; color: #fff; box-shadow: 0 4px 0 #2563eb; }
#st-app-container.st-ml-app button.st-dash-btn-success { background: #10b981; color: #fff; box-shadow: 0 4px 0 #059669; }
#st-app-container.st-ml-app button.st-dash-btn-danger { background: #fee2e2; color: #ef4444; box-shadow: none;}
#st-app-container.st-ml-app button.st-dash-btn-warning { background: #fef3c7; color: #d97706; box-shadow: none;}
#st-app-container.st-ml-app button.st-dash-btn-gray { background: #e2e8f0; color: #475569; box-shadow: none;}
#st-app-container.st-ml-app button.st-dash-btn:active { transform: translateY(4px); box-shadow: none; }

/* 7. ÖĞRENME EKRANI ÜST BAR VE İLERLEME ÇUBUĞU */
#st-app-container.st-ml-app .st-top-bar { display: flex; align-items: center; gap: 15px; margin-bottom: 30px; flex-shrink: 0; }
#st-app-container.st-ml-app button.st-close-btn { background-color: transparent; color: #64748b; border: none; box-shadow: none; width: auto; padding: 0; margin: 0; font-size: 1.8rem; cursor: pointer; line-height: 1; z-index:10; }
#st-app-container.st-ml-app button.st-close-btn:hover { color: #ef4444; }
#st-app-container.st-ml-app .st-progress-bg { flex-grow: 1; background: #e2e8f0; height: 14px; border-radius: 10px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); }
#st-app-container.st-ml-app .st-progress-fill { background: #10b981; height: 100%; width: 0%; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

/* 8. ÖĞRENME KARTLARI (BİLGİ VE SORU) */
#st-app-container.st-ml-app .st-card-area { flex-grow: 1; display: flex; flex-direction: column; justify-content: flex-start; overflow-y: auto; padding-bottom: 20px; }
#st-app-container.st-ml-app .st-card { background-color: #ffffff; padding: 35px; border-radius: 24px; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15); border: 1px solid #e2e8f0; display: none; flex-direction: column; gap: 20px; animation: slideIn 0.4s ease-out; margin: auto 0; flex-shrink: 0; }
#st-app-container.st-ml-app .st-card.active { display: flex; }
@keyframes slideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

#st-app-container.st-ml-app .st-info-icon { font-size: 3rem; text-align: left; margin-bottom: 5px; }
#st-app-container.st-ml-app .st-info-text { font-size: 1.2rem; color: #334155; line-height: 1.7; text-align: left; }
#st-app-container.st-ml-app .st-q-text { font-size: 1.35rem; font-weight: 800; color: #0f172a; line-height: 1.4; margin-bottom: 15px; text-align: left; }

/* ŞIKLAR (SEÇENEK) BUTONLARI */
#st-app-container.st-ml-app button.st-option { display: block; width: 100%; background-color: #f8fafc; border: 2px solid #cbd5e1; color: #1e293b; text-align: left; margin: 0 0 12px 0; padding: 18px 20px; border-radius: 16px; box-shadow: none; box-sizing: border-box; line-height: 1.5; white-space: normal; font-size: 1.1rem; font-family: 'Inter', sans-serif;}
#st-app-container.st-ml-app button.st-option:hover:not(:disabled) { border-color: #3b82f6; background-color: #f0fdfa; transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.05);}
#st-app-container.st-ml-app button.st-option.selected { border-color: #3b82f6; background-color: #eff6ff; color: #1d4ed8; }
#st-app-container.st-ml-app button.st-option.correct { border-color: #10b981; background-color: #ecfdf5; color: #065f46; box-shadow: none; }
#st-app-container.st-ml-app button.st-option.wrong { border-color: #ef4444; background-color: #fef2f2; color: #991b1b; box-shadow: none; }
#st-app-container.st-ml-app button.st-option:disabled { cursor: default; opacity: 0.9; }

/* 9. GERİ BİLDİRİM VE ALT BÖLÜM */
#st-app-container.st-ml-app .st-footer { flex-shrink: 0; padding-top: 15px; }
#st-app-container.st-ml-app .st-feedback-box { display: none; padding: 20px; border-radius: 16px; margin-bottom: 20px; text-align: left; animation: slideUp 0.3s ease-out; max-height: 30vh; overflow-y: auto; }
#st-app-container.st-ml-app .st-feedback-box.correct { background: #ecfdf5; color: #065f46; border: 2px solid #a7f3d0; }
#st-app-container.st-ml-app .st-feedback-box.wrong { background: #fef2f2; color: #991b1b; border: 2px solid #fecaca; }
#st-app-container.st-ml-app .st-feedback-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }

/* 10. ANA AKSİYON BUTONLARI (CONTINUE / CHECK) */
#st-app-container.st-ml-app .st-nav-buttons { display: flex; gap: 15px; width: 100%; }
#st-app-container.st-ml-app button.st-action-btn { display: block; width: 100%; box-sizing: border-box; border-radius: 16px; border: none; padding: 20px; margin: 0; font-size: 1.2rem; font-weight: 900; text-transform: uppercase; cursor: pointer; transition: 0.2s; font-family: 'Inter', sans-serif;}
#st-app-container.st-ml-app button.st-action-btn:active:not(:disabled) { transform: translateY(5px); box-shadow: none; }
#st-app-container.st-ml-app button.st-action-btn-primary { background-color: #3b82f6; color: #fff; box-shadow: 0 5px 0 #2563eb; }
#st-app-container.st-ml-app button.st-action-btn-success { background-color: #10b981; color: #fff; box-shadow: 0 5px 0 #059669; }
#st-app-container.st-ml-app button.st-action-btn-gray { background-color: #e2e8f0; color: #475569; box-shadow: 0 5px 0 #cbd5e1; }
#st-app-container.st-ml-app button.st-action-btn:disabled { background-color: #cbd5e1; color: #f8fafc; box-shadow: 0 5px 0 #94a3b8; cursor: not-allowed; }

/* 11. YÜKLEME EKRANI */
#st-app-container.st-ml-app .st-loader-screen { display: none; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; }
#st-app-container.st-ml-app .st-spinner { width: 60px; height: 60px; border: 6px solid #e2e8f0; border-top: 6px solid #3b82f6; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20px; }

/* 12. MODAL OVERLAY VE İÇERİK (BODY SEVİYESİNDE - TEMAYI EZER) */
body > .st-modal-overlay, 
body > .bank-modal-overlay, 
body > .st-src-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15,23,42,0.85);
    z-index: 999999999; 
    backdrop-filter: blur(4px);
    display: none; 
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

body > .st-modal-overlay .st-modal-content { background: #fff; width: 100%; max-width: 600px; border-radius: 20px; padding: 30px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); max-height: 90vh; overflow-y:auto; position: relative;}

/* 13. MODAL KAPATMA BUTONLARI */
body > .st-modal-overlay button.st-modal-close, 
body > .bank-modal-overlay button.bank-modal-close, 
body > .st-src-modal button.st-src-close {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 2rem;
    padding: 0;
    min-width: 0;
    min-height: 0;
    box-shadow: none;
    line-height: 1;
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
}
body > .st-modal-overlay button.st-modal-close:hover, 
body > .bank-modal-overlay button.bank-modal-close:hover, 
body > .st-src-modal button.st-src-close:hover {
    color: #ef4444;
    background: transparent;
}

/* 14. MODAL İÇİ FORMLAR VE EDİTÖR KARTLARI */
body > .st-modal-overlay .st-input-group { margin-bottom: 15px; }
body > .st-modal-overlay .st-input-group label { display: block; font-weight: bold; margin-bottom: 5px; color: #475569; }
body > .st-modal-overlay .st-input-group input, 
body > .st-modal-overlay .st-input-group select, 
body > .st-modal-overlay .st-input-group textarea { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid #cbd5e1; font-family: inherit; box-sizing:border-box; }
body > .st-modal-overlay .st-editor-card { background:#f8fafc; border:1px solid #e2e8f0; padding:15px; border-radius:12px; margin-bottom:15px; display:flex; justify-content:space-between; align-items:center; gap:10px; }

/* MOBİL DÜZELTMELER */
@media (max-width: 768px) {
    #st-app-container.st-ml-app .st-top-bar { margin-bottom: 15px; }
    #st-app-container.st-ml-app .st-progress-bg { height: 8px; }
    #st-app-container.st-ml-app button.st-close-btn { font-size: 1.5rem; }
    #st-app-container.st-ml-app .st-card { padding: 15px; margin: auto 0; }
    #st-app-container.st-ml-app button.st-action-btn { padding: 14px; font-size: 1.05rem; }
    #st-app-container.st-ml-app .st-q-text { font-size: 1.15rem; margin-bottom: 10px; }
    #st-app-container.st-ml-app button.st-option { padding: 12px 15px; font-size: 1rem; margin-bottom: 8px; }
    #st-app-container.st-ml-app .st-card-area { justify-content: flex-start; padding-top: 10px; }
    #st-learn-screen { padding: 10px 10px 90px 10px; padding-bottom: max(90px, env(safe-area-inset-bottom)); }
}