* {
    -webkit-tap-highlight-color: transparent;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Transitions */
.sidebar-transition {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Category Sidebar Custom Scrollbar */
#category-sidebar::-webkit-scrollbar {
    width: 4px;
}

#category-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

#category-sidebar::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}

.dark #category-sidebar::-webkit-scrollbar-thumb {
    background: #27272a;
}

/* Grid Animation */
#pfp-grid > div {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom States */
.sidebar-open #category-sidebar {
    transform: translateX(0);
}

.sidebar-open #sidebar-overlay {
    display: block;
    opacity: 1;
}

.details-open #details-sidebar {
    transform: translateX(0);
}

.details-open #details-overlay {
    display: block;
    opacity: 1;
}

/* Utility for aspect ratio if not supported */
@supports not (aspect-ratio: 1 / 1) {
    .aspect-square {
        position: relative;
        padding-bottom: 100%;
    }
    .aspect-square > * {
        position: absolute;
        height: 100%;
        width: 100%;
        top: 0;
        left: 0;
    }
}
