@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    font-family: 'Inter', sans-serif;
}

.canvas-glow {
    box-shadow: inset 0 0 60px rgba(139, 92, 246, 0.3);
    border: 4px solid transparent;
    background: linear-gradient(rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.1)) padding-box,
                linear-gradient(135deg, #8B5CF6, #A855F7, #EC4899) border-box;
    border-radius: 1rem;
}

.canvas-container {
    box-shadow: 
        0 0 0 4px rgba(139, 92, 246, 0.2),
        0 0 40px rgba(139, 92, 246, 0.3),
        0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.element-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.element-card:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

/* Confetti animation */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confetti-fall 3s ease-in-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8B5CF6;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .canvas-container {
        aspect-ratio: 4/3;
    }
    
    .element-card span:first-child {
        font-size: 1.5rem;
    }
}

/* Drag ghost styling */
[draggable="true"] {
    -webkit-user-drag: element;
}

/* Pulse animation for empty canvas */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2),
                    0 0 40px rgba(139, 92, 246, 0.2);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.4),
                    0 0 60px rgba(139, 92, 246, 0.4);
    }
}

.canvas-container:empty {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Button hover effects */
button {
    transition: all 0.2s ease;
}

button:active {
    transform: scale(0.95);
}

/* Tooltip styling */
.group:hover > div:last-child {
    animation: tooltip-appear 0.2s ease;
}

@keyframes tooltip-appear {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}