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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

/* Electron-specific: Scale down and add padding for desktop app */
body.electron-app {
    overflow: hidden;
    padding:0;
}

body.electron-app .container {
    width:100%;
    max-width:none;
    margin: 0 auto;
    transform-origin: top center;
    padding:0;
}

/* Only apply fullscreen mode on web for very large screens */
@media (min-width: 1200px) and (min-height: 1000px) {
    body:not(.electron-app) {
        padding: 0;
        overflow: hidden;
    }
    body:not(.electron-app) .slider-input-group {
        flex-grow: 1;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #0f1419;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Only apply fullscreen mode on web for very large screens */
@media (min-width: 1200px) and (min-height: 1000px) {
    body:not(.electron-app) .container {
        max-width: 100vw;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #2a2a3e;
    position: relative;
}

.help-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.help-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

h1 {
    font-size: 2.5em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-header {
    height: 80px;
    width: auto;
}

.subtitle {
    color: #8a8a9f;
    font-size: 0.9em;
}

.import-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
    width:100%;
}

.electron-app .import-section {
   padding: 20px 20px 0 20px;
}

.file-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #1a1f2e;
    border-radius: 8px;
    border: 1px solid #2a2a3e;
    flex-grow: 1;
    position: relative;
    transition: border-color 0.3s, background 0.3s;
}

.file-input-group.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.file-input-group::before {
    content: 'Drop audio file here';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.file-input-group.drag-over::before {
    opacity: 1;
}

.file-label {
    font-weight: 600;
    color: #667eea;
    min-width: 60px;
}

.import-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.import-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.import-btn:active {
    transform: translateY(0);
}

.file-name {
    color: #8a8a9f;
    font-size: 0.9em;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.waveform-container {
    position: relative;
    margin-bottom: 20px;
    background: #0a0e27;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #2a2a3e;
}

.waveform-wrapper {
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease, border 0.3s ease;
    border: 1px solid transparent;
    position: relative;
}

.waveform-wrapper:last-of-type {
    margin-bottom: 0;
}

.waveform-wrapper.active {
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.waveform-wrapper.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.waveform-wrapper::before {
    content: 'Drop audio file here';
    position: absolute;
    inset: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 5;
}

.waveform-wrapper.drag-over::before {
    opacity: 1;
}

.track-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #1a1f2e;
    border-radius: 6px;
}

.track-label {
    font-weight: 600;
    color: #667eea;
    font-size: 0.95em;
}

.lufs-display {
    font-family: 'Courier New', monospace;
    color: #4ade80;
    font-weight: 600;
}

.adjustment-group {
    color: #fbbf24;
    font-size: 0.85em;
    font-family: 'Courier New', monospace;
}

.waveform {
    width: 100%;
    height: 120px;
    background: #000;
    border-radius: 4px;
    display: block;
    cursor: crosshair;
}

.playhead {
    position: absolute;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: #f43f5e;
    pointer-events: none;
    z-index: 10;
    left: 20px;
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.6);
}

.controls-section {
    display: grid;
    gap: 20px;
}

.transport-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    position: relative;
}

.transport-controls::after {
    content: 'First, load 2 tracks';
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.transport-controls.show-hint:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.control-btn {
    padding: 12px 30px;
    background: #1a1f2e;
    border: 1px solid #2a2a3e;
    border-radius: 6px;
    color: #e0e0e0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background: #2a2f3e;
    border-color: #667eea;
}

.control-btn:active {
    transform: scale(0.98);
}

.control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.ab-switch-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 12px;
    background: #1a1f2e;
    border-radius: 8px;
    min-height:67.5px;
}

.switch-label {
    font-weight: 600;
    color: #8a8a9f;
}

.ab-switch {
    display: flex;
    gap: 0;
    background: #0a0e14;
    border-radius: 6px;
    padding: 4px;
}

.ab-btn {
    padding: 10px 30px;
    background: transparent;
    border: none;
    color: #8a8a9f;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.ab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.match-section {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: #1a1f2e;
    border-radius: 8px;
    min-height:67.5px;
}

.action-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

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

.volume-adj-input label {
    color: #8a8a9f;
    font-size: 0.9em;
}

.volume-adj-input input {
    width: 100px;
    padding: 8px 12px;
    background: #0a0e14;
    border: 1px solid #2a2a3e;
    border-radius: 4px;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
}

.sample-adjust-section {
    padding: 15px;
    background: #1a1f2e;
    border-radius: 8px;
    width:100%;
}

.sample-adjust-section > label {
    display: block;
    margin-bottom: 10px;
    color: #8a8a9f;
    font-weight: 600;
}

.slider-input-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-input-group input[type="range"] {
    flex: 1;
    height: 6px;
    background: #0a0e14;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider-input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
}

.slider-input-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.slider-input-group input[type="number"] {
    width: 100px;
    padding: 8px 12px;
    background: #0a0e14;
    border: 1px solid #2a2a3e;
    border-radius: 4px;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
}

.unit {
    color: #8a8a9f;
    font-size: 0.9em;
}

.volume-section {
    padding: 15px;
    background: #1a1f2e;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.volume-section label {
    color: #8a8a9f;
    font-weight: 600;
    min-width: 120px;
}

.volume-section input[type="range"] {
    flex: 1;
    height: 6px;
    background: #0a0e14;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.volume-section input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
}

.volume-section input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#volumeDisplay {
    min-width: 50px;
    text-align: right;
    font-family: 'Courier New', monospace;
    color: #e0e0e0;
}

.audio-device-section {
    padding: 15px;
    background: #1a1f2e;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;

    min-height:67.5px;
}

.audio-device-section label {
    color: #8a8a9f;
    font-weight: 600;
}

.audio-device-section select {
    flex: 1;
    padding: 10px 15px;
    background: #0a0e14;
    border: 1px solid #2a2a3e;
    border-radius: 4px;
    color: #e0e0e0;
    cursor: pointer;
}

.status-bar {
    margin-top: 20px;
    padding: 15px;
    background: #0a0e14;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    border: 1px solid #2a2a3e;
    gap: 15px;
}

#status {
    color: #4ade80;
}

#position {
    font-family: 'Courier New', monospace;
    color: #8a8a9f;
}

.db-meter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.db-label {
    color: #8a8a9f;
    font-size: 0.85em;
    font-weight: 600;
}

.db-meter-bar {
    width: 100px;
    height: 16px;
    background: #1a1f2e;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    border: 1px solid #2a2a3e;
}

.db-meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #4ade80 0%, #fbbf24 70%, #ef4444 90%);
    transition: width 0.05s ease-out;
    position: relative;
}

.db-meter-fill.clipping {
    background: #ef4444;
    animation: clipBlink 0.3s ease-in-out;
}

@keyframes clipBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.db-value {
    font-family: 'Courier New', monospace;
    color: #e0e0e0;
    font-size: 0.85em;
    min-width: 55px;
    text-align: right;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s;
}

.db-value:hover {
    opacity: 0.7;
}

.db-value.clipping {
    color: #ef4444;
    font-weight: bold;
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input.warning {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
    animation: warningPulse 0.5s ease-out;
}

@keyframes warningPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    100% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #0f1419;
    border-radius: 16px;
    padding: 60px 40px 40px 40px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid #2a2a3e;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: #0a0e14;
    border-radius: 5px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Firefox scrollbar */
.modal-content {
    scrollbar-width: thin;
    scrollbar-color: #667eea #0a0e14;
}

.modal-close {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a1f2e;
    border: 1px solid #2a2a3e;
    color: #e0e0e0;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1001;
}

.modal-close:hover {
    background: #2a2f3e;
    border-color: #667eea;
}

.modal-content h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    font-size: 1.8em;
}

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

.help-section h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.help-section p, .help-section li {
    color: #c0c0cf;
    line-height: 1.6;
    margin-bottom: 8px;
}

.help-section ol, .help-section ul {
    margin-left: 20px;
}

.help-section a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.help-section a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.donate-section {
    background: rgba(102, 126, 234, 0.1);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.donate-section h3 {
    color: #4ade80;
}

@media (min-width: 1200px) and (min-height: 1000px) {
    .file-name {
        width: 10px;
    }
    .waveform-container {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .controls-section {
        flex-shrink: 0;
    }

    header {
        text-align: left;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        flex-shrink: 0;
        padding-right: 30px;
    }

    .import-section {
        display: grid;
        gap: 20px;
        grid-template-rows: 1fr 1fr;
    }

    .container > header,
    .container > .import-section {
        display: inline-flex;
        vertical-align: top;
        justify-content: space-between;
    }

    .container > header {
        width: auto;
    }

    /* Create a wrapper for header + import section */
    .container::before {
        content: '';
        display: table;
        clear: both;
    }

    .controls-row-1 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: center;
        position: relative;
    }

    .controls-row-1::after {
        content: 'First, load 2 tracks';
        position: absolute;
        top: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%) translateY(5px);
        background: rgba(102, 126, 234, 0.95);
        color: white;
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 400;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s, transform 0.3s;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .controls-row-1.show-hint:hover::after {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    .controls-row-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: center;
    }

    .controls-row-1 .transport-controls {
        margin: 0;
        margin-bottom: 0;
    }

    .controls-row-1 .ab-switch-container {
        margin: 0;
    }

    .controls-row-1 .match-section {
        flex: 1;
    }

    .sample-adjust-section {
        display: inline-flex;
        flex: 1;

        justify-content: space-between;
        align-items: center;
        min-height:67.5px;
    }

    .volume-section {
        display: inline-flex;
        flex: 1;

    min-height:67.5px;
    }

    .controls-row-2 {
        display: flex;
        gap: 20px;
        align-items: center;
        margin-top: 0;
    }

    .controls-row-2 .audio-device-section {
        margin: 0;
        width: auto;
    }

    .controls-row-2 .status-bar {
        flex: 1;
        margin: 0;
    }
}


@media (max-width: 700px) {
    body {
        padding:0px;
    }
    .container {
        padding:5px;
    }
    .match-compare {
        
        flex-direction: column;
        align-items: stretch;
    }
    .volume-adj-input {
        flex-direction: column;
        align-items: stretch;
    }
    .slider-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    .volume-section {
        flex-direction: column;
        align-items: stretch;
    }
    .match-section {
        flex-direction: column;
        align-items: stretch;
    }
    .audio-device-section {
        flex-direction: column;
        align-items: stretch;
    }
    .status-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    #volumeAdjInput, #sampleInput {
        width: 100%;
    }
    .sampleinput-wrapper {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .db-meter-bar {
        flex-grow: 1;
    }
}

@media (max-width: 350px) {
    .file-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    .transport-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Helper Popover Styles */
.helper-popover {
    position: relative;
}

.helper-popover::after {
    content: attr(data-helper-text);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.helper-popover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    border: 6px solid transparent;
    border-top-color: rgba(102, 126, 234, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
}

.helper-popover:hover::after,
.helper-popover:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #0f1419;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 15px 40px 15px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    max-width: 300px;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-banner p {
    color: #e0e0e0;
    margin: 0;
    font-size: 0.9em;
    line-height: 1.4;
}

.cookie-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1a1f2e;
    border: 1px solid #2a2a3e;
    color: #e0e0e0;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-close:hover {
    background: #2a2f3e;
    border-color: #667eea;
}

/* Key press feedback animations */
@keyframes keyPress {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        transform: scale(0.95);
        box-shadow: 0 0 0 8px rgba(102, 126, 234, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

.key-pressed {
    animation: keyPress 0.3s ease-out;
}

/* Pro Features Row (Presets + Audio Device) */
.pro-features-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.preset-section {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    background: #1a1f2e;
    border-radius: 8px;
    padding: 15px 20px;
    border: 1px solid #2a2a3e;
}

.preset-section label {
    font-weight: 600;
    color: #a0a0b0;
    font-size: 0.85em;
    white-space: nowrap;
}

#presetSelect {
    flex: 1;
    min-width: 150px;
    padding: 8px 12px;
    background: #0f1419;
    border: 1px solid #2a2a3e;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
}

#presetSelect:hover {
    border-color: #667eea;
}

#presetSelect:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.preset-section .action-btn {
    padding: 8px 16px;
    font-size: 0.85em;
}

#deletePresetBtn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#deletePresetBtn:disabled:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: none;
}

/* Audio Device Selection (Pro Feature) */
.audio-device-section {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 15px 20px;
    background: #1a1f2e;
    border-radius: 8px;
    border: 1px solid #2a2a3e;
    justify-content: space-around;
}

.audio-device-section label {
    font-weight: 600;
    color: #a0a0b0;
    font-size: 0.85em;
    white-space: nowrap;
}

.audio-device-section select {
    padding: 8px 12px;
    background: #0f1419;
    border: 1px solid #2a2a3e;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
}

.audio-device-section select:hover {
    border-color: #667eea;
}

.audio-device-section select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#audioDeviceSelect {
    flex: 1;
    min-width: 80px;
    max-width: 250px;
}

#channelLeftSelect,
#channelRightSelect {
    min-width: 40px;
    max-width: 80px;
}