.scrollbar-thin::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: rgba(51, 65, 85, 0.3);
    border-radius: 4px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

.scrollbar-thin::-webkit-scrollbar-corner {
    background: rgba(51, 65, 85, 0.3);
}

/* Firefox scrollbar */
.scrollbar-thin {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.5) rgba(51, 65, 85, 0.3);
}

/* Professional preloader styles */
#preloader {
    background: #0f172a;
}

#preloader .animate-spin {
    animation: spin 1s linear infinite;
}

/* Performance optimizations for mobile */

/* Optimize animations for mobile */
.animate-spin,
.animate-pulse,
.animate-bounce {
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* Reduce motion for better performance */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Optimize table rendering */
.table-container {
    /* Optimize scrolling */
    -webkit-overflow-scrolling: touch;
}

/* Optimize sticky elements */
.sticky {
    will-change: transform;
}

/* Disable hover effects on mobile for better performance */
@media (max-width: 768px) {
    .hover\:bg-dark-accent\/20:hover {
        background-color: transparent !important;
    }
    
    .hover\:border-neon-blue\/40:hover {
        border-color: inherit !important;
    }
    
    .hover\:shadow-neon-green\/25:hover {
        box-shadow: inherit !important;
    }
    
    .hover\:shadow-neon-blue\/25:hover {
        box-shadow: inherit !important;
    }
    
    .hover\:scale-105:hover {
        transform: none !important;
    }
}

/* Stylowanie godzin w tabeli */
.time-cell {
    line-height: 1.2;
    font-size: 0.75rem;
}

.time-cell .start-time {
    font-weight: 600;
    color: #8b5cf6;
}

.time-cell .end-time {
    font-weight: 500;
    color: #a855f7;
}

/* Subtelne animowane tło */
body {
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 60% 40%, rgba(236, 72, 153, 0.05) 0%, transparent 50%),
        linear-gradient(-45deg, #0f172a, #1e293b, #334155, #475569);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 400% 400%;
    animation: gradientShift 12s ease infinite;
    position: relative;
    overflow-x: hidden;
}

/* Gradient animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}





/* Subtelne świecące punkty */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 30% 40%, rgba(59, 130, 246, 0.4), transparent),
        radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 70% 30%, rgba(139, 92, 246, 0.3), transparent),
        radial-gradient(1px 1px at 90% 50%, rgba(255,255,255,0.25), transparent),
        radial-gradient(1px 1px at 15% 70%, rgba(16, 185, 129, 0.3), transparent),
        radial-gradient(1px 1px at 35% 80%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 55% 60%, rgba(236, 72, 153, 0.3), transparent),
        radial-gradient(1px 1px at 75% 90%, rgba(255,255,255,0.25), transparent),
        radial-gradient(1px 1px at 95% 70%, rgba(59, 130, 246, 0.3), transparent);
    background-size: 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px;
    animation: subtleTwinkle 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes subtleTwinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Naprawa scrollowania na urządzeniach mobilnych */
@media (max-width: 768px) {
    /* Na telefonach - pozwól na naturalny scroll strony */
    .table-container {
        /* Usuń wszystkie ograniczenia wysokości na telefonach */
        max-height: none !important;
        height: auto !important;
        overflow-y: visible !important;
        /* Pozwól na horizontal scroll tabeli */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* Dodaj padding na dole, żeby tabela nie była przyklejona do końca */
        padding-bottom: 20px;
        position: relative;
    }
    
    /* Na telefonach - tabela może być szersza niż ekran */
    .table-container table {
        min-width: 100%;
        width: max-content;
    }
    
    /* Na telefonach - włącz sticky positioning dla nagłówka i godzin */
    .table-container thead {
        position: sticky !important;
        top: 0 !important;
        z-index: 15 !important;
        background-color: rgba(51, 65, 85, 1) !important;
        backdrop-filter: blur(8px);
    }
    
    .table-container th.sticky,
    .table-container td.sticky {
        position: sticky !important;
        left: -1px !important;
        z-index: 20 !important;
        background-color: rgba(51, 65, 85, 1) !important;
        backdrop-filter: blur(8px);
        /* Dodatkowe zabezpieczenie przed prześwitywaniem tekstu */
        box-shadow: 6px 0 12px rgba(0, 0, 0, 0.7);
        /* Dodatkowe tło dla pewności - rozszerzone w lewo */
        background-image: linear-gradient(to right, rgba(51, 65, 85, 1) 0%, rgba(51, 65, 85, 1) 100%);
        /* Usuń wszystkie marginesy i paddingi z lewej strony */
        margin-left: 0 !important;
        padding-left: 0 !important;
        /* Upewnij się, że szerokość jest wystarczająca */
        width: 100px !important;
        min-width: 100px !important;
        /* Usuń border z lewej strony */
        border-left: none !important;
    }
    
    /* Upewnij się, że pierwsza kolumna nagłówka ma odpowiednie tło */
    .table-container thead th:first-child {
        background-color: rgba(51, 65, 85, 0.98) !important;
        backdrop-filter: blur(8px);
        box-shadow: 2px 0 4px rgba(0, 0, 0, 0.3);
    }
}

/* Desktop - przywróć sticky positioning */
@media (min-width: 769px) {
    .table-container {
        position: relative;
    }
    
    .table-container thead {
        position: sticky !important;
        top: 0 !important;
        z-index: 15 !important;
        background-color: rgba(51, 65, 85, 1) !important;
        backdrop-filter: blur(8px);
    }
    
    .table-container th.sticky,
    .table-container td.sticky {
        position: sticky !important;
        left: -1px !important;
        z-index: 20 !important;
    }
}

/* Desktop - zachowaj obecne zachowanie */
@media (min-width: 769px) {
    .overflow-x-auto {
        overflow-x: auto;
        overflow-y: auto;
    }
    
    /* Upewnij się, że tabela ma odpowiednie tło dla sticky elementów */
    .table-container th.sticky,
    .table-container td.sticky {
        background-color: rgba(51, 65, 85, 1) !important;
        backdrop-filter: blur(8px);
        /* Dodatkowe zabezpieczenie przed prześwitywaniem tekstu */
        box-shadow: 6px 0 12px rgba(0, 0, 0, 0.7);
        /* Dodatkowe tło dla pewności - rozszerzone w lewo */
        background-image: linear-gradient(to right, rgba(51, 65, 85, 1) 0%, rgba(51, 65, 85, 1) 100%);
        /* Usuń wszystkie marginesy i paddingi z lewej strony */
        margin-left: 0 !important;
        padding-left: 0 !important;
        /* Upewnij się, że szerokość jest wystarczająca */
        width: 120px !important;
        min-width: 120px !important;
        /* Usuń border z lewej strony */
        border-left: none !important;
    }
    
    /* Upewnij się, że pierwsza kolumna nagłówka ma odpowiednie tło */
    .table-container thead th:first-child {
        background-color: rgba(51, 65, 85, 0.98) !important;
        backdrop-filter: blur(8px);
        box-shadow: 2px 0 4px rgba(0, 0, 0, 0.3);
    }
}

