:root {
    --pink: #ff2d75;
    --teal: #00f2ea;
    --lime: #a2ff00;
}

body {
    font-family: 'Quicksand', sans-serif;
    background-color: #f8fafc;
    /* overflow: hidden; Removed to allow scrolling if needed */
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.arcade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2.5rem;
}

.perspective-container {
    perspective: 2000px;
    transform-style: preserve-3d;
}

.cartridge {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    background: white;
    border: 4px solid #1a1a1a;
    box-shadow: 8px 8px 0px #1a1a1a;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
}

.cartridge:not(.locked):hover {
    /* transform is handled by JS for tilt, this is fallback */
    box-shadow: 12px 12px 0px rgba(0, 0, 0, 0.15);
    z-index: 50;
    cursor: pointer;
}

.holographic-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    pointer-events: none;
    z-index: 20;
    mix-blend-mode: overlay;
    transition: opacity 0.3s ease;
}

.cartridge:hover .holographic-glare {
    opacity: 1;
}

.cartridge-pink {
    border-color: var(--pink);
    box-shadow: 8px 8px 0px var(--pink);
}

.cartridge-teal {
    border-color: var(--teal);
    box-shadow: 8px 8px 0px var(--teal);
}

.cartridge-lime {
    border-color: var(--lime);
    box-shadow: 8px 8px 0px var(--lime);
}

/* Overlaps - subtle initial rotations */
.overlap-1 {
    transform: rotate(-2deg);
    margin-right: -5px;
}

.overlap-2 {
    transform: rotate(3deg);
    margin-left: -5px;
}

.overlap-3 {
    transform: rotate(-1deg);
    margin-top: -5px;
}

.sidebar-item {
    @apply flex items-center gap-3 px-4 py-3 rounded-full transition-all duration-200;
}

.sidebar-item.active {
    background-color: var(--pink);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 45, 117, 0.3);
}

.sidebar-item:not(.active):hover {
    background-color: rgba(0, 242, 234, 0.1);
    color: var(--teal);
    transform: translateX(4px);
}

.locked-cartridge {
    /* filter: grayscale(1); managed by JS/Tailwind */
    /* opacity: 0.6; */
    border-style: dashed;
    transform: scale(0.98);
}

/* Animations */
@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0) rotate(5deg);
    }

    50% {
        transform: translateY(-20px) rotate(-5deg);
    }
}

.animate-float-slow {
    animation: float-slow 8s infinite ease-in-out;
}

@keyframes pop-in {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-pop-in {
    animation: pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slide-in-left 0.6s ease-out forwards;
}

@keyframes pulse-width {

    0%,
    100% {
        width: 100%;
    }

    50% {
        width: 95%;
    }
}

.animate-pulse-width {
    animation: pulse-width 2s infinite ease-in-out;
}

@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

/* FLIP animation target classes */
.badge-unlocking {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(1.5) !important;
    z-index: 9999 !important;
    margin: 0 !important;
    pointer-events: none;
    /* Disable interaction during animation */
}

/* Unlock Flash */
@keyframes unlock-flash {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(2);
    }

    100% {
        filter: brightness(1);
    }
}

.unlock-flash {
    animation: unlock-flash 0.5s ease-out;
}