/* 
    PERFECT SKILL HUB - UNIFIED DESIGN SYSTEM 
    Consistent Modern SaaS Style
*/

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

:root {
    /* Colors - Modern SaaS Palette */
    --primary: #6366f1;
    --primary-rgb: 99, 102, 241;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Backgrounds & Text */
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.05);
    
    /* Gradients - Purple → Pink → Orange */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #d946ef 50%, #f97316 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    
    /* UI Style */
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Sidebar & Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --navbar-height: 80px;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-light: #0f172a;
    --bg-white: #1e293b;
    --text-dark: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
    --sidebar-bg: #1e293b;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
    background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0, transparent 50%), 
                      radial-gradient(at 50% 0%, rgba(217, 70, 239, 0.05) 0, transparent 50%), 
                      radial-gradient(at 100% 0%, rgba(249, 115, 22, 0.05) 0, transparent 50%);
}

[data-theme="dark"] body {
    background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0, transparent 50%), 
                      radial-gradient(at 50% 0%, rgba(217, 70, 239, 0.1) 0, transparent 50%), 
                      radial-gradient(at 100% 0%, rgba(249, 115, 22, 0.1) 0, transparent 50%);
}

/* Noise Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 9999;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
}

/* Reusable Components */

/* Glassmorphism */
.glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    padding: 2rem;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Modern Buttons */
.btn-primary-custom {
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: white !important;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary-custom:hover {
    background-position: right center;
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.3);
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary) !important;
    padding: 10px 26px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-custom:hover {
    background: var(--primary);
    color: white !important;
}

/* Modern Inputs with Floating Labels Style */
.form-floating-custom {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-control-custom {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.form-floating-custom i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: var(--transition);
    z-index: 10;
}

.form-control-custom:focus + i {
    color: var(--primary);
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.hero-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, rgba(99, 102, 241, 0.1), rgba(217, 70, 239, 0.1), rgba(249, 115, 22, 0.1));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    z-index: -1;
}

/* Trust Badges */
.trust-badge-container {
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.brand-logo {
    filter: grayscale(1);
    opacity: 0.5;
    transition: var(--transition);
    max-height: 40px;
}

.brand-logo:hover {
    filter: grayscale(0);
    opacity: 1;
}

/* Featured Badge */
.popular-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

/* Success Stories */
.success-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.success-card:hover {
    transform: translateY(-10px);
}

.success-card .before-after {
    display: flex;
    gap: 10px;
    padding: 1.5rem;
}

.before-after div {
    flex: 1;
    text-align: center;
}

/* Career Section */
.career-card {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.career-card h3 { color: white; }

/* Instructor Section */
.instructor-card {
    text-align: center;
}

.instructor-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
}

/* Skeleton Loading */
.skeleton {
    background: #e2e8f0;
    background: linear-gradient(90deg, #e2e8f0 25%, #f8fafc 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Navbar Enhancements */
.navbar-custom .nav-link {
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    transition: var(--transition);
}

.navbar-custom .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after {
    transform: scaleX(1);
}

.navbar-blur {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* Sticky Navbar Fixes */
.sticky-top-navbar {
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Navbar */
.navbar-custom {
    height: var(--navbar-height);
    background: transparent;
    transition: var(--transition);
    z-index: 1000;
}

.navbar-custom.scrolled {
    background: var(--glass);
    backdrop-filter: blur(15px);
    box-shadow: var(--shadow-sm);
    height: 70px;
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-dark) !important;
}

.navbar-brand span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Unified Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--bg-white);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    padding: 2rem 0.75rem;
}

.sidebar.collapsed .navbar-brand span:not(.logo-icon),
.sidebar.collapsed .navbar-brand .full-logo-text {
    display: none;
}

.sidebar.collapsed .sidebar-link span {
    display: none;
}

.sidebar.collapsed .sidebar-link i {
    margin-right: 0;
    font-size: 1.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    transition: var(--transition);
    font-weight: 500;
    white-space: nowrap;
}

.sidebar-link i {
    font-size: 1.25rem;
    margin-right: 1rem;
    width: 24px;
    text-align: center;
}

.sidebar-link:hover, .sidebar-link.active {
    background: var(--gradient-primary);
    color: white !important;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: var(--transition);
    min-height: 100vh;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Modern Tables */
.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-white);
}

.premium-table thead th {
    background: var(--bg-light);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.premium-table tbody td {
    padding: 1.25rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}

.premium-table tbody tr:hover {
    background: rgba(var(--primary-rgb), 0.02);
}

/* Action Buttons for Tables */
.btn-action {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: var(--transition);
    background: var(--bg-light);
    color: var(--text-muted);
}

.btn-action:hover {
    transform: scale(1.1);
}

.btn-view:hover { background: var(--info); color: white; }
.btn-edit:hover { background: var(--primary); color: white; }
.btn-delete:hover { background: var(--danger); color: white; }

/* Chart and Advanced Cards */
.chart-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* Dark Mode Overrides for Components */
[data-theme="dark"] .premium-table thead th {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .btn-action {
    background: rgba(255, 255, 255, 0.05);
}

/* Floating Gradient Blobs */
.blob {
    position: fixed;
    width: 500px;
    height: 500px;
    background: var(--gradient-primary);
    filter: blur(100px);
    opacity: 0.08;
    z-index: -1;
    border-radius: 50%;
    animation: blob-float 25s infinite alternate;
}

.blob-1 { top: -100px; right: -100px; }
.blob-2 { bottom: -100px; left: -100px; animation-delay: -5s; }

@keyframes blob-float {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(50px, 80px) rotate(120deg) scale(1.1); }
    66% { transform: translate(-30px, 40px) rotate(240deg) scale(0.9); }
    100% { transform: translate(0, 0) rotate(360deg) scale(1); }
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-up {
    animation: fadeUp 0.8s ease-out forwards;
}

/* Responsive */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}

/* Dashboard Specific Components */
.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Dark Mode Toggle Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 44px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
    border-radius: 50%;
}

input:checked + .slider {
    background: var(--gradient-primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}
