/* ========================================
   CUSTOM SCROLLBAR STYLES
   ======================================== */

/* Global scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

::-webkit-scrollbar-thumb:active {
    background: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

::-webkit-scrollbar-corner {
    background: var(--background-dark);
}

/* Sidebar specific scrollbar */
.sidebar ::-webkit-scrollbar {
    width: 6px;
}

.sidebar ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.sidebar ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(0, 255, 136, 0.6), 
        rgba(0, 204, 255, 0.6)
    );
    border-radius: 3px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.sidebar ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        rgba(0, 255, 136, 0.8), 
        rgba(0, 204, 255, 0.8)
    );
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

/* Dashboard cards scrollbar */
.dashboard-card ::-webkit-scrollbar,
.card ::-webkit-scrollbar {
    width: 6px;
}

.dashboard-card ::-webkit-scrollbar-track,
.card ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.dashboard-card ::-webkit-scrollbar-thumb,
.card ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(0, 255, 136, 0.4), 
        rgba(0, 204, 255, 0.4)
    );
    border-radius: 3px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.dashboard-card ::-webkit-scrollbar-thumb:hover,
.card ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        rgba(0, 255, 136, 0.6), 
        rgba(0, 204, 255, 0.6)
    );
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 0 0 6px rgba(0, 255, 136, 0.3);
}

/* Modal scrollbar */
.ai-modal ::-webkit-scrollbar,
.modal ::-webkit-scrollbar {
    width: 8px;
}

.ai-modal ::-webkit-scrollbar-track,
.modal ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.ai-modal ::-webkit-scrollbar-thumb,
.modal ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(0, 255, 136, 0.7), 
        rgba(0, 204, 255, 0.7)
    );
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 136, 0.4);
}

.ai-modal ::-webkit-scrollbar-thumb:hover,
.modal ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        rgba(0, 255, 136, 0.9), 
        rgba(0, 204, 255, 0.9)
    );
    border-color: rgba(0, 255, 136, 0.6);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

/* Firefox scrollbar support */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-dark);
}

.sidebar * {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 136, 0.6) rgba(255, 255, 255, 0.05);
}

.dashboard-card *,
.card * {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 136, 0.4) rgba(255, 255, 255, 0.03);
}

.ai-modal *,
.modal * {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 136, 0.7) rgba(0, 0, 0, 0.3);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for specific elements */
.scrollbar-thin {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.scrollbar-thin::-webkit-scrollbar {
    width: 4px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;  /* Safari and Chrome */
}

/* Animated scrollbar for special elements */
.scrollbar-animated::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        var(--primary-color), 
        var(--accent-color),
        var(--primary-color)
    );
    background-size: 200% 200%;
    animation: scrollbarGradient 3s ease infinite;
}

@keyframes scrollbarGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Dark theme scrollbar variations */
.dark-theme ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.dark-theme .sidebar ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}

.dark-theme .dashboard-card ::-webkit-scrollbar-track,
.dark-theme .card ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

/* Light theme scrollbar variations (if needed) */
.light-theme ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.light-theme ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(0, 255, 136, 0.8), 
        rgba(0, 204, 255, 0.8)
    );
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.light-theme ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        rgba(0, 255, 136, 0.9), 
        rgba(0, 204, 255, 0.9)
    );
    border-color: rgba(0, 255, 136, 0.5);
}

/* Special scrollbar for navigation elements */
.nav-links ::-webkit-scrollbar,
.sidebar-nav ::-webkit-scrollbar {
    width: 4px;
}

.nav-links ::-webkit-scrollbar-track,
.sidebar-nav ::-webkit-scrollbar-track {
    background: transparent;
}

.nav-links ::-webkit-scrollbar-thumb,
.sidebar-nav ::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 2px;
}

.nav-links ::-webkit-scrollbar-thumb:hover,
.sidebar-nav ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.5);
}

/* Scrollbar for form elements */
.form-container ::-webkit-scrollbar,
.auth-container ::-webkit-scrollbar {
    width: 6px;
}

.form-container ::-webkit-scrollbar-track,
.auth-container ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.form-container ::-webkit-scrollbar-thumb,
.auth-container ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(0, 255, 136, 0.5), 
        rgba(0, 204, 255, 0.5)
    );
    border-radius: 3px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.form-container ::-webkit-scrollbar-thumb:hover,
.auth-container ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        rgba(0, 255, 136, 0.7), 
        rgba(0, 204, 255, 0.7)
    );
    border-color: rgba(0, 255, 136, 0.4);
}
