.sound-test-component {
    padding: 1%;
    background: var(--container-bg, #f8f9fa);
    border-radius: 8px;
    border: 1px solid var(--container-border, #dee2e6);
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-size: clamp(0.6rem, 1.5vw, 0.9rem);
}
.sound-header {
    text-align: center;
    flex-shrink: 0;
}
.sound-header h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.2em;
    font-weight: 600;
    line-height: 1.2;
    color: #2c3e50;
}
.device-select {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}
.device-select label {
    margin-bottom: 5px;
    font-weight: bold;
}
.audio-device-select {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    min-width: 200px;
}
.freq-control {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}
.freq-control label {
    margin-bottom: 5px;
    font-weight: bold;
}
.frequency-control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 80%;
    max-width: 500px;
}
.freq-control input[type="range"] {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 400px;
}
.frequency-input {
    box-sizing: border-box;
    width: 6.5em;
    padding: 5px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: right;
    font: inherit;
}
.waveform-control {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.waveform-control label {
    margin-bottom: 6px;
    font-weight: bold;
}
.waveform-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 420px;
}
.waveform-btn {
    padding: 6px 12px;
    border: 1px solid #cfd5db;
    border-radius: 16px;
    background: #ffffff;
    color: #2f3b4a;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.waveform-btn:hover {
    background: #eef2f7;
    border-color: #aeb8c2;
}
.waveform-btn.active {
    background: #2f80ed;
    border-color: #2f80ed;
    color: #ffffff;
}
.speaker-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    min-height: 0;
    padding: 10px 0;
}
.speaker-btn {
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: opacity 0.2s;
    touch-action: none;
    user-select: none;
}
.speaker-btn:hover {
    opacity: 0.8;
}
.speaker-btn:active {
    transform: scale(0.98);
}
.speaker-btn.left {
    background: #3498db;
}
.speaker-btn.left:hover {
    background: #3498db;
}
.speaker-btn.right {
    background: #e74c3c;
}
.speaker-btn.right:hover {
    background: #e74c3c;
}
.audio-latency-test {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 0 10px;
}
.latency-test-btn {
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid #2c7a5b;
    border-radius: 4px;
    background: #2c7a5b;
    color: #ffffff;
    cursor: pointer;
}
.latency-test-btn:hover:not(:disabled) {
    background: #24664c;
}
.latency-test-btn:disabled {
    cursor: wait;
    opacity: 0.7;
}
.latency-test-status {
    min-height: 1.2em;
    margin: 0;
    text-align: center;
    font-size: 0.9em;
}