/* File: styles/styles.css */

/* Reset default margins and paddings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    background-color: #111;
    color: #fff;
    font-family: 'Arial', 'Helvetica', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

/* Title Styling */
h1 {
    margin-bottom: 20px;
    text-align: center;
}

/* Controls Container */
#controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* Toggle Button Styling */
#startButton {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #28a745;
    border: none;
    color: #fff;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#startButton:hover {
    background-color: #218838;
}

/* Status Displays */
#status, #frequencyDisplay {
    font-size: 14px;
    color: #ccc;
}

/* Frequency Display Styling */
#frequencyDisplay {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Analyzer Container */
#analyzerContainer {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
}

/* Spectrogram and Marker Canvases */
#container {
    position: relative;
    width: 800px;
    height: 400px;
}

#spectrogramCanvas, #markerCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 800px;
    height: 400px;
    pointer-events: none; /* Allows clicks to pass through */
}

#spectrogramCanvas {
    z-index: 1;
}

#markerCanvas {
    z-index: 3;
}

/* VU Meter Styling */
#vuCanvas {
    background-color: #000;
    border: 1px solid #444;
    width: 20px;
    height: 400px;
    display: inline-block;
    vertical-align: top;
}

/* Footer Styling */
footer {
    margin-top: 40px;
    font-size: 12px;
    color: #555;
}

/* Responsive Design */
@media (max-width: 900px) {
    #analyzerContainer {
        flex-direction: column;
        align-items: center;
    }

    #container {
        width: 100%;
        max-width: 800px;
        height: 400px;
    }

    #spectrogramCanvas, #markerCanvas {
        width: 100%;
        height: 400px;
    }

    #vuCanvas {
        margin-left: 0;
        margin-top: 20px;
    }
}

.control-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px; /* Space between status and gain controls */
}

/* Gain Control Styling */
#gainControl {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

#gainSelect {
    padding: 5px;
    font-size: 14px;
    border: none;
    border-radius: 3px;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#gainSelect:hover {
    background-color: #444;
}

#gainControl label {
    font-size: 14px;
    color: #ccc;
}