@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --neon-cyan: #00FFFF;
    --neon-magenta: #FF1493;
    --neon-green: #32FF32;
    --deep-void: #000000;
    --toxic-yellow: #FFFF00;
}

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

body {
    font-family: 'JetBrains Mono', 'Orbitron', monospace;
    background: var(--deep-void);
    color: var(--neon-cyan);
    overflow-x: hidden;
    user-select: none;
    line-height: 1.6;
}

.glitch-text {
    animation: glitch-flicker 0.15s infinite;
}

@keyframes glitch-flicker {
    0%, 90% { 
        opacity: 1; 
        filter: hue-rotate(0deg);
    }
    5% { 
        opacity: 0.8;
        filter: hue-rotate(90deg);
        transform: translate(-1px, 1px);
    }
    10% { 
        opacity: 0.9;
        filter: hue-rotate(180deg);
        transform: translate(1px, -1px);
    }
    15% { 
        opacity: 1;
        filter: hue-rotate(270deg);
        transform: translate(-1px, -1px);
    }
    95% { 
        opacity: 0.9;
        transform: translate(1px, 1px);
    }
}

.rgb-glitch {
    position: relative;
    display: inline-block;
}

.rgb-glitch::before {
    content: attr(data-text);
    position: absolute;
    left: -2px;
    top: 0;
    width: 100%;
    height: 100%;
    color: #ff0080;
    clip: rect(0, 900px, 0, 0);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.rgb-glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 2px;
    top: 0;
    width: 100%;
    height: 100%;
    color: #00ff80;
    clip: rect(0, 900px, 0, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(42px, 9999px, 44px, 0); }
    20% { clip: rect(12px, 9999px, 59px, 0); }
    40% { clip: rect(63px, 9999px, 34px, 0); }
    60% { clip: rect(84px, 9999px, 91px, 0); }
    80% { clip: rect(37px, 9999px, 18px, 0); }
    100% { clip: rect(91px, 9999px, 72px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(65px, 9999px, 119px, 0); }
    20% { clip: rect(36px, 9999px, 39px, 0); }
    40% { clip: rect(115px, 9999px, 133px, 0); }
    60% { clip: rect(79px, 9999px, 20px, 0); }
    80% { clip: rect(155px, 9999px, 195px, 0); }
    100% { clip: rect(76px, 9999px, 78px, 0); }
}

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

::-webkit-scrollbar-track {
    background: var(--deep-void);
    border: 1px solid var(--neon-cyan);
}

::-webkit-scrollbar-thumb {
    background: var(--neon-magenta);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-green);
}

/* Button hover effects */
button:hover {
    box-shadow: 0 0 15px currentColor;
    animation: button-pulse 0.5s infinite alternate;
}

@keyframes button-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.02); }
}

/* Input styling */
input[type="text"], input[type="file"] {
    font-family: 'JetBrains Mono', monospace;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--deep-void);
    border: 1px solid var(--neon-cyan);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--neon-magenta);
    cursor: pointer;
    border-radius: 50%;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--neon-magenta);
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

/* Static noise animation */
@keyframes static-noise {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

.static-noise {
    animation: static-noise 0.1s infinite;
}

/* Scan lines effect */
.scan-lines::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        transparent 50%, 
        rgba(0, 255, 255, 0.03) 50%
    );
    background-size: 100% 4px;
    animation: scan-lines-move 0.1s linear infinite;
    pointer-events: none;
}

@keyframes scan-lines-move {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* Performance optimizations */
* {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

canvas {
    will-change: transform;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
    .glitch-text {
        animation-duration: 0.3s;
    }
    
    button:hover {
        animation: none;
        transform: none;
    }
}

/* Custom Tailwind color extensions */
.text-magenta-400 { color: var(--neon-magenta); }
.text-magenta-500 { color: var(--neon-magenta); }
.border-magenta-500 { border-color: var(--neon-magenta); }
.bg-magenta-500 { background-color: var(--neon-magenta); }
.bg-magenta-600 { background-color: #CC1177; }
.bg-magenta-700 { background-color: #AA0F66; }