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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #0a0a2e, #16213e, #1a1a3e);
    color: #ffffff;
    min-height: 100vh;
}

.header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.3);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 0 20px #00ffff;
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

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

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 150px;
}

.control-group label {
    font-weight: bold;
    color: #00ffff;
    font-size: 0.9em;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #00ffff, #0080ff);
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
}

.mic-btn.recording {
    background: linear-gradient(135deg, #ff0080, #ff4040);
    color: white;
    animation: pulse 1s infinite;
}

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

.demo-btn {
    background: linear-gradient(135deg, #ff8000, #ffff00);
    color: #000;
    font-size: 0.9em;
    padding: 8px 12px;
}

select, input[type="range"] {
    padding: 8px;
    border: 1px solid #00ffff;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    font-family: inherit;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    border-radius: 5px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00ffff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.main-area {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

#spectrogramCanvas {
    border: 2px solid #00ffff;
    border-radius: 10px;
    background: #000011;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    cursor: crosshair;
}

.info-panel {
    min-width: 200px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    height: fit-content;
}

.stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.label {
    color: #00ffff;
    font-weight: bold;
}

.value {
    color: #ffffff;
    font-family: monospace;
}

.frequency-display {
    margin-bottom: 20px;
}

#frequencyCanvas {
    width: 100%;
    border: 2px solid #00ffaa;
    border-radius: 10px;
    background: #000011;
    box-shadow: 0 0 20px rgba(0, 255, 170, 0.3);
}

.footer {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 255, 255, 0.3);
}

.footer p {
    margin: 5px 0;
}

.footer a {
    color: #00ffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    text-shadow: 0 0 10px #00ffff;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-area {
        flex-direction: column;
    }
    
    #spectrogramCanvas {
        width: 100%;
        height: 300px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .control-group {
        min-width: auto;
    }
}

/* Neon glow effects */
.header {
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Canvas hover effects */
#spectrogramCanvas:hover {
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
}

#frequencyCanvas:hover {
    box-shadow: 0 0 30px rgba(0, 255, 170, 0.5);
}