@tailwind base;
@tailwind components;
@tailwind utilities;

.font-fredoka {
    font-family: 'Fredoka', sans-serif;
}

/* Custom Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-pop {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* ========================
   2D Shapes
======================== */
.shape-2d {
    width: 80px;
    height: 80px;
    transition: transform 0.2s, filter 0.2s;
    filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.2));
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.shape-2d:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.shape-square {
    background-color: #ef4444;
    border-radius: 12px;
}

.shape-circle {
    background-color: #3b82f6;
    border-radius: 50%;
}

.shape-rectangle {
    width: 100px;
    height: 60px;
    background-color: #22c55e;
    border-radius: 8px;
}

.shape-triangle {
    width: 0;
    height: 0;
    background-color: transparent;
    border-left: 45px solid transparent;
    border-right: 45px solid transparent;
    border-bottom: 80px solid #eab308;
    filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.2));
}

.shape-pentagon {
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    background-color: #a855f7;
    width: 85px;
    height: 85px;
}

.shape-hexagon {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background-color: #ec4899;
    width: 90px;
    height: 80px;
}

/* ========================
   Conveyor Belt
======================== */
#conveyor-belt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 16px;
}

/* ========================
   Bins
======================== */
.bin {
    height: 200px;
    border-width: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 1rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.bin-top {
    width: 80%;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 100%;
    margin-bottom: 1rem;
}

.bin:hover {
    transform: translateY(-5px);
}

.bin.highlight {
    background-color: #f0fdf4;
    border-color: #4ade80;
    transform: scale(1.05);
}

.bin-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: none;
}

/* ========================
   Utils
======================== */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

.bg-dots {
    background-image: radial-gradient(#ffffff 2px, transparent 2px);
    background-size: 30px 30px;
}