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

body {
    font-family: 'Space Mono', monospace;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, #00ff88, #0088ff);
    border-radius: 1px;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #00ff88, #0088ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    color: #888;
    font-size: 1.1rem;
}

.controls {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group label {
    color: #ccc;
    font-size: 0.9rem;
}

select {
    background: #1a1a1a;
    border: 2px solid #333;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.play-btn, .stop-btn {
    background: linear-gradient(45deg, #00ff88, #0088ff);
    border: none;
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stop-btn {
    background: linear-gradient(45deg, #ff4444, #ff8800);
}

.play-btn:hover, .stop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.3);
}

.stop-btn:hover {
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.3);
}

.play-btn:disabled, .stop-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.editor-section {
    background: #111;
    border: 2px solid #222;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.editor-section:focus-within {
    border-color: #00ff88;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

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

.editor-header span {
    font-weight: 700;
    color: #00ff88;
}

.presets {
    background: #222;
    border: 1px solid #444;
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
}

#codeEditor {
    width: 100%;
    background: #111;
    border: none;
    color: #fff;
    padding: 1.5rem;
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 200px;
}

#codeEditor:focus {
    outline: none;
}

#codeEditor::placeholder {
    color: #666;
}

.visualizer-container {
    background: #111;
    border: 2px solid #222;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

#visualizer {
    width: 100%;
    height: 150px;
    background: #0a0a0a;
    border-radius: 8px;
    display: block;
}

.visualizer-info {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #888;
}

.info-panel {
    background: #111;
    border: 2px solid #222;
    border-radius: 12px;
    padding: 1.5rem;
}

.info-panel h3 {
    color: #00ff88;
    margin-bottom: 0.5rem;
}

.info-panel p {
    color: #ccc;
    line-height: 1.6;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .control-group {
        flex-direction: column;
        text-align: center;
    }
    
    #visualizer {
        height: 100px;
    }
}

/* Animation for active state */
.playing .header h1 {
    animation: pulse 2s ease-in-out infinite;
}

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