/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

/* Line clamp utility */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animation for cards */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#appsGrid > div {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Stagger animation */
#appsGrid > div:nth-child(1) { animation-delay: 0.05s; }
#appsGrid > div:nth-child(2) { animation-delay: 0.1s; }
#appsGrid > div:nth-child(3) { animation-delay: 0.15s; }
#appsGrid > div:nth-child(4) { animation-delay: 0.2s; }
#appsGrid > div:nth-child(5) { animation-delay: 0.25s; }
#appsGrid > div:nth-child(6) { animation-delay: 0.3s; }
#appsGrid > div:nth-child(7) { animation-delay: 0.35s; }
#appsGrid > div:nth-child(8) { animation-delay: 0.4s; }

/* Focus visible for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading state for download button */
.download-btn:active {
    transform: scale(0.95);
}

/* Glass effect enhancement */
.glass {
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Gradient text animation */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bg-gradient-to-r {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}