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

body {
    background: #0a0a0a;
    color: #f0f0f0;
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(45deg, #0a0a0a, #1a1a1a);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    box-shadow: 0 2px 20px rgba(0, 255, 255, 0.1);
}

.title {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.3));
}

.glitch {
    position: relative;
    animation: glitch 2s infinite;
}

@keyframes glitch {
    0%, 100% {
        text-shadow: 0 0 5px #00ffff;
    }
    25% {
        text-shadow: -2px 0 #ff00ff, 2px 0 #00ffff;
    }
    50% {
        text-shadow: 0 0 5px #ffff00;
    }
    75% {
        text-shadow: 2px 0 #ff00ff, -2px 0 #ffff00;
    }
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.fps-counter {
    background: rgba(0, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 1px solid #00ffff;
    font-size: 0.8rem;
    color: #00ffff;
}

.neon-btn {
    background: transparent;
    border: 1px solid #00ffff;
    color: #00ffff;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.neon-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    transform: scale(1.05);
}

.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.canvas-container {
    flex: 1;
    position: relative;
    background: #000;
}

#canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.overlay-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

.overlay-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #00ffff;
    color: #00ffff;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.overlay-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.editor-panel {
    width: 400px;
    background: #1a1a1a;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
}

.editor-header {
    padding: 1rem;
    background: #222;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-dropdown {
    background: #333;
    border: 1px solid #00ffff;
    color: #f0f0f0;
    padding: 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.char-counter {
    font-size: 0.8rem;
    color: #00ffff;
}

.editor-container {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.shader-editor {
    flex: 1;
    background: #1a1a1a;
    color: #f0f0f0;
    border: none;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    resize: none;
    outline: none;
    tab-size: 4;
}

.shader-editor:focus {
    background: #222;
}

.error-display {
    display: none;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 0.5rem;
    margin: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: pre-wrap;
}

.controls-strip {
    background: #1a1a1a;
    border-top: 1px solid #333;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    overflow-x: auto;
}

.control-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: max-content;
}

.control-section label {
    font-size: 0.8rem;
    color: #aaa;
    min-width: 60px;
}

.neon-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
}

.neon-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.neon-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.color-picker {
    width: 40px;
    height: 30px;
    border: 1px solid #00ffff;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.control-section span {
    font-size: 0.8rem;
    color: #00ffff;
    min-width: 30px;
    text-align: center;
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .editor-panel {
        width: 100%;
        height: 300px;
    }
    
    .controls-strip {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0.5rem 1rem;
    }
    
    .title {
        font-size: 1.2rem;
    }
    
    .controls-strip {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .control-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
    
    .control-section label {
        min-width: auto;
        font-size: 0.7rem;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #ff00ff;
}

/* Syntax highlighting for GLSL keywords */
.shader-editor {
    background-image: 
        linear-gradient(transparent 0px, transparent 19px, rgba(0, 255, 255, 0.04) 20px, rgba(0, 255, 255, 0.04) 21px, transparent 22px);
    background-size: 100% 22px;
    background-position: 0 1px;
}