/* ROM-Database - Custom Styles */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for dark theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1d27;
}

::-webkit-scrollbar-thumb {
    background: #3d4456;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4f5567;
}

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Rarity color utilities (for dynamic classes) */
.bg-rarity-common\/10 { background-color: rgba(154, 160, 176, 0.1); }
.bg-rarity-uncommon\/10 { background-color: rgba(34, 197, 94, 0.1); }
.bg-rarity-rare\/10 { background-color: rgba(59, 130, 246, 0.1); }
.bg-rarity-epic\/10 { background-color: rgba(168, 85, 247, 0.1); }
.bg-rarity-legendary\/10 { background-color: rgba(245, 158, 11, 0.1); }

.text-rarity-common { color: #9aa0b0; }
.text-rarity-uncommon { color: #22c55e; }
.text-rarity-rare { color: #3b82f6; }
.text-rarity-epic { color: #a855f7; }
.text-rarity-legendary { color: #f59e0b; }

.bg-rarity-common { background-color: #9aa0b0; }
.bg-rarity-uncommon { background-color: #22c55e; }
.bg-rarity-rare { background-color: #3b82f6; }
.bg-rarity-epic { background-color: #a855f7; }
.bg-rarity-legendary { background-color: #f59e0b; }

/* Transition utilities */
.transition-colors {
    transition-property: color, background-color, border-color;
    transition-duration: 150ms;
    transition-timing-function: ease-in-out;
}

/* Loading spinner animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Model viewer container */
#model-viewer-container canvas {
    cursor: grab;
    touch-action: none;
}

#model-viewer-container canvas:active {
    cursor: grabbing;
}
