/* Custom animations and styles */

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 165, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 165, 0, 0.8);
    }
}

input:focus {
    animation: glow 2s ease-in-out infinite;
}

canvas {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

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

::-webkit-scrollbar-thumb {
    background: #ffa500;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00ff00;
}

/* Loading spinner animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    canvas {
        height: 150px !important;
    }
}

/* Button press effect */
button:active {
    transform: scale(0.98);
}

button {
    transition: all 0.2s ease;
}

/* Range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
    background: #1a1a1a;
    height: 8px;
    border-radius: 4px;
    border: 1px solid #00ff00;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -4px;
    background-color: #ffa500;
    height: 16px;
    width: 16px;
    border-radius: 50%;
}

input[type="range"]::-moz-range-track {
    background: #1a1a1a;
    height: 8px;
    border-radius: 4px;
    border: 1px solid #00ff00;
}

input[type="range"]::-moz-range-thumb {
    background-color: #ffa500;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    border: none;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main > div {
    animation: fadeIn 0.5s ease-out;
}