@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* HSL Tailored Dark Theme */
    --font-heading: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
    
    --bg-base: 224 71% 4%;            /* Deep navy black */
    --bg-surface: 223 47% 7%;         /* Slate dark grey */
    --bg-card: 222 47% 11%;           /* Card background */
    --bg-card-hover: 221 39% 15%;
    
    --primary: 199 89% 48%;           /* Premium Sky Blue */
    --primary-hover: 199 95% 40%;
    --primary-rgb: 14, 165, 233;
    
    --gold: 38 92% 50%;               /* Gold Accent */
    --gold-hover: 38 92% 43%;
    --gold-rgb: 217, 119, 6;
    
    --text-main: 210 40% 98%;         /* Bright off-white */
    --text-muted: 215 20% 65%;        /* Slate grey-blue */
    
    --border: 217 32% 17%;
    --border-light: 217 32% 26%;
    
    --success: 150 84% 37%;
    --warning: 38 92% 50%;
    --danger: 350 89% 60%;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 15px rgba(14, 165, 233, 0.15);
    
    /* Layout heights */
    --sidebar-width: 280px;
    --navbar-height: 70px;
}

/* Base Styles */
body {
    background-color: hsl(var(--bg-base));
    color: hsl(var(--text-main));
    font-family: var(--font-body);
    font-size: 15px;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #ffffff;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: hsl(var(--bg-base));
}
::-webkit-scrollbar-thumb {
    background: hsl(var(--border-light));
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--primary));
}

/* Glassmorphism Elements */
.glass-panel {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

.glass-card {
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid hsl(var(--border));
    border-radius: 16px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-soft);
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: var(--shadow-glow), var(--shadow-soft);
    background: rgba(30, 41, 59, 0.65);
}

/* App Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Navigation Sidebar Styles */
.sidebar-nav {
    width: var(--sidebar-width);
    background-color: hsl(var(--bg-surface));
    border-right: 1px solid hsl(var(--border));
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    transition: var(--transition-smooth);
}

.sidebar-brand {
    height: var(--navbar-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid hsl(var(--border));
}

.sidebar-brand .logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #ffffff 30%, hsl(var(--primary)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
    list-style: none;
    margin: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: hsl(var(--text-muted));
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 6px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.sidebar-link i {
    font-size: 1.2rem;
    margin-right: 14px;
    transition: var(--transition-smooth);
}

.sidebar-link:hover, .sidebar-link.active {
    color: #ffffff;
    background: rgba(14, 165, 233, 0.1);
}

.sidebar-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18) 0%, rgba(14, 165, 233, 0.05) 100%);
    border-left: 4px solid hsl(var(--primary));
    padding-left: 12px; /* compensate border width */
}

.sidebar-link.active i {
    color: hsl(var(--primary));
}

.sidebar-user {
    padding: 16px 24px;
    border-top: 1px solid hsl(var(--border));
    background-color: rgba(15, 23, 42, 0.2);
}

/* Content Container */
.content-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    padding: 40px;
    transition: var(--transition-smooth);
}

/* Global Navbar Override (Mobile Only) */
.mobile-navbar {
    display: none;
    height: var(--navbar-height);
    background-color: hsl(var(--bg-surface));
    border-bottom: 1px solid hsl(var(--border));
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1020;
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
}

/* Login Page Glassmorphism Template */
.login-body {
    background-image: radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.05) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(217, 119, 6, 0.05) 0%, transparent 40%);
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 100%;
    max-width: 450px;
    padding: 40px;
}

/* Custom UI Form Controls */
.form-control, .form-select {
    background-color: hsl(var(--bg-surface));
    border: 1px solid hsl(var(--border));
    color: #ffffff !important;
    border-radius: 12px;
    padding: 12px 16px;
    transition: var(--transition-smooth);
}

.form-control:focus, .form-select:focus {
    background-color: hsl(var(--bg-card));
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.form-label {
    font-weight: 500;
    color: hsl(var(--text-muted));
    margin-bottom: 8px;
}

/* Custom Button Styling */
.btn {
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, #0284c7 100%);
    border: none;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.btn-gold {
    background: linear-gradient(135deg, hsl(var(--gold)) 0%, #b45309 100%);
    color: #ffffff;
    border: none;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #b45309 0%, #78350f 100%);
    color: #ffffff;
    transform: translateY(-1px);
}

/* File Upload drag-n-drop Area */
.upload-dropzone {
    border: 2px dashed hsl(var(--border-light));
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    background: rgba(30, 41, 59, 0.2);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: hsl(var(--primary));
    background: rgba(14, 165, 233, 0.05);
}

.upload-dropzone i {
    font-size: 3rem;
    color: hsl(var(--primary));
    margin-bottom: 16px;
}

/* Metric Stats Cards */
.stat-card-val {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 2px;
    background: linear-gradient(135deg, #ffffff 40%, hsl(var(--primary)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Category Badge Styling */
.badge-category {
    background-color: rgba(14, 165, 233, 0.15);
    color: hsl(var(--primary));
    border: 1px solid rgba(14, 165, 233, 0.2);
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
}

/* Video Player Container styling */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid hsl(var(--border));
}

.video-container iframe, .video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Dynamic Interactive Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Custom Responsive Styles */
@media (max-width: 991.98px) {
    .sidebar-nav {
        transform: translateX(-100%);
    }
    
    .sidebar-nav.show {
        transform: translateX(0);
    }
    
    .content-wrapper {
        margin-left: 0;
        padding: 100px 20px 40px 20px;
    }
    
    .mobile-navbar {
        display: flex;
    }
}
