/* Custom styles for PixelGlow GridCraft */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
}

.pixel {
    aspect-ratio: 1;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pixel:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px currentColor;
    z-index: 10;
}

.pixel.active {
    box-shadow: 0 0 20px currentColor, 0 0 30px currentColor;
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
    }
    to {
        box-shadow: 0 0 20px currentColor, 0 0 30px currentColor, 0 0 40px currentColor;
    }
}

.color-swatch {
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.color-swatch:hover {
    transform: scale(1.05);
    border-color: white;
}

.color-swatch.active {
    border-color: white;
    box-shadow: 0 0 15px currentColor;
}

#previewGrid .pixel {
    border-radius: 2px;
}

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

::-webkit-scrollbar-track {
    background: #1f2937;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}

/* Responsive design enhancements */
@media (max-width: 768px) {
    .pixel {
        border-radius: 2px;
    }
    
    #gridContainer {
        padding: 2px;
    }
}

/* Loading animation */
.loading {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}