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

body {
    font-family: 'Space Mono', monospace;
    background: #000;
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(120, 255, 120, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 120, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 120, 255, 0.1) 0%, transparent 50%);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #00ff88, #00aaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.5)); }
    to { filter: drop-shadow(0 0 20px rgba(0, 170, 255, 0.8)); }
}

header p {
    font-size: 1.1rem;
    opacity: 0.8;
}

.controls {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.formula-section {
    margin-bottom: 25px;
}

.formula-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #00ff88;
}

#formula {
    width: 100%;
    height: 80px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#formula:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

.presets {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.preset-btn {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    transform: translateY(-2px);
}

.playback-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

button {
    background: linear-gradient(45deg, #00ff88, #00aaff);
    border: none;
    color: #000;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.3);
}

button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-control label {
    font-size: 14px;
    color: #00ff88;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 120px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #00ff88;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.parameters {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.param-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.param-group label {
    font-size: 14px;
    color: #00ff88;
    white-space: nowrap;
}

.param-group select {
    min-width: 140px;
}

select {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
}

.visualizer {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    text-align: center;
}

#waveform {
    width: 100%;
    max-width: 800px;
    height: 200px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.info h3 {
    color: #00ff88;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info p {
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 10px;
}

#volumeValue,
#speedValue {
    font-size: 12px;
    color: #00aaff;
    min-width: 30px;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .controls {
        padding: 20px;
    }
    
    .playback-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .parameters {
        flex-direction: column;
    }
    
    .presets {
        justify-content: center;
    }
    
    #waveform {
        height: 150px;
    }
}