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

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

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

.canvas-container {
    box-shadow: 
        0 0 0 5px rgba(139, 92, 246, 0.15),
        0 0 60px rgba(139, 92, 246, 0.25),
        0 30px 60px -15px rgba(0, 0, 0, 0.3);
}

.element-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    min-height: 160px;
}

.element-card:hover {
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25);
}

.element-card svg {
    max-height: 80px;
    width: auto;
}

/* Toast notification */
.toast-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #8B5CF6, #A855F7);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
    z-index: 1000;
    animation: toast-in 0.3s ease-out;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 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: 12px;
    height: 12px;
    top: -12px;
    border-radius: 2px;
    animation: confetti-fall 3s ease-in-out forwards;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c4b5fd, #a78bfa);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a78bfa, #8B5CF6);
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .canvas-container {
        aspect-ratio: 4/3;
    }
    
    .element-card {
        min-height: 130px;
    }
    
    .element-card svg {
        max-height: 60px;
    }
}

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

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

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

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

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:disabled:active {
    transform: none;
}

/* Animate pulse for huge button */
@keyframes huge-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(249, 115, 22, 0);
    }
}

.animate-pulse {
    animation: huge-pulse 2s ease-in-out infinite;
}

/* Character hover effects */
.group:hover > div:first-child {
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4)) !important;
}

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

.group:hover > div:nth-child(2) {
    animation: tooltip-appear 0.2s ease;
}

/* SVG improvements */
svg {
    overflow: visible;
}

/* Gradient text */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}