:root {
    /* Premium Slate Dark Mode Palette for Professional EdTech */
    --bg-dark: #0f172a;   /* slate-900 */
    --bg-panel: #1e293b;  /* slate-800 */
    --text-main: #f8fafc; /* slate-50 */
    --text-muted: #94a3b8;/* slate-400 */
    --primary: #4f46e5;   /* indigo-600 */
    --primary-hover: #4338ca; /* indigo-700 */
    --border: #334155;    /* slate-700 */
}

body { 
    background-color: var(--bg-dark); 
    color: var(--text-main); 
    font-family: 'Inter', sans-serif; 
    -webkit-font-smoothing: antialiased;
}

/* Utility Classes */
.bg-panel { background-color: var(--bg-panel); }
.border-custom { border-color: var(--border); }
.text-muted { color: var(--text-muted); }
.btn-primary { background-color: var(--primary); color: white; transition: all 0.2s ease-in-out; border-radius: 0.75rem; font-weight: 600; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 8px 16px rgba(79, 70, 229, 0.25); }

/* Sleek Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 8px; border: 2px solid var(--bg-dark); }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Video Player Shield and Wrapper */
.video-wrapper { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; overflow: hidden; }
@media (min-width: 1024px) { .video-wrapper { border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6); } }
.shield { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; cursor: pointer; }

/* Modals and Overlays */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.85); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(8px); }

/* Table Styling for Admin */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { background-color: var(--bg-panel); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; color: var(--text-muted); }
tr:hover { background-color: #334155; transition: background-color 0.2s; }

/* Custom Range Slider for Timeline */
input[type=range] { -webkit-appearance: none; background: transparent; width: 100%; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 18px; width: 18px; border-radius: 50%; background: var(--primary); cursor: pointer; margin-top: -7px; box-shadow: 0 0 10px rgba(79, 70, 229, 0.6); transition: transform 0.1s; }
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 4px; cursor: pointer; background: rgba(255,255,255,0.2); border-radius: 4px; }
input[type=range]:focus { outline: none; }

.controls-overlay { transition: opacity 0.3s ease-in-out; }

/* Chat Animations */
@keyframes slideIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg { animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* Glassmorphism utilities */
.glass-panel { background: rgba(30, 41, 59, 0.75); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }

/* Dashboard Card Hover Effects */
.course-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.course-card:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3); border-color: rgba(79, 70, 229, 0.5); }

/* Active Nav Link Styling */
.nav-link.active { background-color: rgba(79, 70, 229, 0.15); color: #818cf8; border-right: 3px solid #818cf8; }
@media (max-width: 768px) {
    .nav-link.active { border-right: none; border-top: 3px solid #818cf8; background-color: transparent; }
    .nav-link.active svg { color: #818cf8; }
}

/* Toast Notifications */
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100%) translateY(-10px); }
    to { opacity: 1; transform: translateX(0) translateY(0); }
}
@keyframes toastFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); }
}
.toast-slide-in { animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.toast-fade-out { animation: toastFadeOut 0.3s ease-in forwards; }