/* ============================================
   CUSTOM SCROLLBAR - oTserverLab Theme
   ============================================ */

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-radius: 10px;
    border: 2px solid rgba(15, 23, 42, 0.4);
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.5);
    transform: scale(1.05);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.6);
}

::-webkit-scrollbar-corner {
    background: rgba(15, 23, 42, 0.4);
}

/* ============================================
   SCROLLBAR PARA CONTAINERS ESPECÍFICOS
   ============================================ */

/* Scrollbar para a tabela de comparação */
.comparison-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.comparison-table-container::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 6px;
}

.comparison-table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-radius: 6px;
    border: 1px solid rgba(15, 23, 42, 0.6);
}

/* Scrollbar para lista de aulas */
.lessons::-webkit-scrollbar {
    width: 6px;
}

.lessons::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.1);
    border-radius: 4px;
}

.lessons::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.6);
    border-radius: 4px;
}

.lessons::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.8);
}

/* ============================================
   FIREFOX SCROLLBAR
   ============================================ */

* {
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 rgba(15, 23, 42, 0.4);
}

/* Para containers específicos no Firefox */
.comparison-table-container {
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 rgba(15, 23, 42, 0.6);
}

/* ============================================
   SCROLLBAR COM ANIMAÇÃO ADICIONAL
   ============================================ */

/* Efeito de glow na scrollbar */
::-webkit-scrollbar-thumb {
    position: relative;
}

::-webkit-scrollbar-thumb:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

::-webkit-scrollbar-thumb:hover:before {
    opacity: 0.3;
}

/* ============================================
   SCROLLBAR RESPONSIVA
   ============================================ */

/* Mobile - scrollbar mais fina */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    ::-webkit-scrollbar-thumb {
        border: 1px solid rgba(15, 23, 42, 0.4);
    }
}

/* Desktop - scrollbar mais robusta */
@media (min-width: 1200px) {
    ::-webkit-scrollbar {
        width: 14px;
        height: 14px;
    }
    
    ::-webkit-scrollbar-thumb {
        border: 3px solid rgba(15, 23, 42, 0.4);
    }
}

/* ============================================
   SCROLLBAR PARA MODO CLARO (OPCIONAL)
   ============================================ */

/* Caso você queira adicionar um modo claro no futuro */
.light-mode ::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.light-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: 2px solid rgba(241, 245, 249, 0.8);
}

/* ============================================
   SMOOTH SCROLLING BEHAVIOR
   ============================================ */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Para compensar o header fixo */
}

/* Smooth scrolling para elementos internos */
.modules-grid,
.preview-grid,
.lessons {
    scroll-behavior: smooth;
}

/* ============================================
   SCROLLBAR INVISÍVEL PARA ELEMENTOS ESPECÍFICOS
   ============================================ */

/* Para ocultar scrollbar em alguns elementos mas manter funcionalidade */
.hide-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}