/* Settings window (Spotify-style): section list on the left, options on the right. */
body #settingsModal.st-overlay {
    align-items: center; justify-content: center; padding: 32px;
    background: rgba(0, 0, 0, 0.6) !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
body .st-window {
    display: grid; grid-template-columns: 240px 1fr; width: min(980px, 100%); height: min(720px, calc(100vh - 64px));
    background: #121212; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6); color: #fff; font-family: Inter, "Segoe UI", system-ui, sans-serif;
    animation: stIn 0.25s cubic-bezier(.2, .8, .2, 1);
}
@keyframes stIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

body .st-nav { display: flex; flex-direction: column; gap: 2px; padding: 24px 12px; background: #0a0a0a; border-right: 1px solid rgba(255, 255, 255, 0.06); }
body .st-nav-title { margin: 0 12px 16px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
body .st-nav-item {
    text-align: left; padding: 10px 12px; border: 0; border-radius: 6px; background: none; cursor: pointer;
    color: #b3b3b3; font: 600 14px Inter, "Segoe UI", sans-serif; transition: background 0.15s, color 0.15s;
}
body .st-nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
body .st-nav-item.active { color: #fff; background: rgba(255, 255, 255, 0.1); }
body .st-logout {
    margin-top: auto; padding: 10px 12px; border-radius: 500px; cursor: pointer; background: none;
    border: 1px solid rgba(255, 255, 255, 0.25); color: #fff; font: 700 13px Inter, "Segoe UI", sans-serif;
}
body .st-logout:hover { border-color: #fff; transform: scale(1.03); }

body .st-body { position: relative; overflow-y: auto; padding: 28px 32px 40px; scrollbar-width: thin; }
body .st-close {
    position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, 0.07); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
body .st-close:hover { background: rgba(255, 255, 255, 0.15); }
body .st-section { display: none; }
body .st-section.active { display: block; animation: stIn 0.2s ease; }
body .st-section h3 { margin: 0 0 20px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }

body .st-card { background: #1a1a1a; border-radius: 10px; padding: 4px 20px; margin-bottom: 16px; border: 0 !important; box-shadow: none !important; }
body .st-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); margin: 0; }
body .st-row:last-child { border-bottom: 0; }
body .st-info { min-width: 0; flex: 1; }
body .st-info strong { display: block; font-size: 15px; font-weight: 700; color: #fff; }
body .st-info p { margin: 4px 0 0; font-size: 13px; color: #a7a7a7; line-height: 1.4; }
body .st-info-icon { display: flex; align-items: center; gap: 14px; }
body .st-inline { display: flex; align-items: center; gap: 10px; }

body .st-btn {
    flex-shrink: 0; height: 34px; padding: 0 18px; border-radius: 500px; cursor: pointer; background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important; color: #fff !important; font: 700 13px Inter, "Segoe UI", sans-serif !important;
    transition: transform 0.15s, border-color 0.15s; box-shadow: none !important; min-height: 0 !important; width: auto !important;
}
body .st-btn:hover { border-color: #fff !important; transform: scale(1.04); }
body .spotify-connect-panel:not(.is-connected) .st-btn { background: #1ed760 !important; color: #000 !important; border-color: #1ed760 !important; }
body .st-input {
    height: 36px; width: 220px; padding: 0 12px; border-radius: 4px; background: #2a2a2a; border: 1px solid transparent;
    color: #fff; font: 500 14px Inter, "Segoe UI", sans-serif; outline: none;
}
body .st-input:focus { border-color: #fff; }

/* Segmented choices */
body .st-segment { display: inline-flex; flex-shrink: 0; padding: 3px; gap: 2px; border-radius: 500px; background: #2a2a2a; }
body .st-segment button {
    height: 30px; padding: 0 14px; border: 0; border-radius: 500px; background: none; cursor: pointer;
    color: #b3b3b3; font: 700 12.5px Inter, "Segoe UI", sans-serif; white-space: nowrap; transition: background 0.15s, color 0.15s;
}
body .st-segment button:hover { color: #fff; }
body .st-segment button.active { background: #fff; color: #000; }

body .st-range { width: 200px; accent-color: #5b9aff; }
body .st-value { min-width: 34px; text-align: right; font-weight: 700; font-size: 13px; }
body #crossfadeSliderRow { transition: opacity 0.2s; }

body .st-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; padding: 8px 0 14px; }
body .st-keys div { display: flex; align-items: center; gap: 6px; padding: 9px 0; font-size: 13.5px; color: #d0d0d0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
body .st-keys span { flex: 1; }
body .st-keys kbd {
    min-width: 26px; padding: 3px 8px; border-radius: 5px; background: #2a2a2a; border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom-width: 2px; font: 600 12px Inter, "Segoe UI", sans-serif; color: #fff; text-align: center;
}

@media (max-width: 760px) {
    body .st-window { grid-template-columns: 1fr; height: calc(100vh - 32px); }
    body .st-nav { flex-direction: row; flex-wrap: wrap; padding: 12px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
    body .st-nav-title { width: 100%; margin-bottom: 8px; }
    body .st-logout { margin-top: 0; }
    body .st-row { flex-wrap: wrap; }
    body .st-keys { grid-template-columns: 1fr; }
}

/* ── Effects of the options ── */
body[data-lyrics-size="small"] .sl-root { --sl-scale: 0.8; }
body[data-lyrics-size="large"] .sl-root { --sl-scale: 1.22; }
body[data-lyrics-size="small"] .sl-line, body[data-lyrics-size="large"] .sl-line { font-size: calc(var(--sl-size) * var(--sl-scale, 1)) !important; }
body[data-lyrics-size="small"] .sl-line.sl-bg, body[data-lyrics-size="large"] .sl-line.sl-bg { font-size: calc(var(--sl-size) * var(--sl-scale, 1) * 0.72) !important; }
body.nw-no-lyrics-blur .sl-line { filter: none !important; }
body.nw-hide-backing .sl-line.sl-bg { display: none !important; }
body.nw-no-animated-bg .spl-kawarp, body.nw-no-animated-bg .nw-kawarp { display: none !important; }
body.nw-no-animated-bg .spl-bg-blob { animation: none !important; }
body.nw-no-canvas .spl-video { display: none !important; }
body.nw-reduce-motion *, body.nw-reduce-motion *::before, body.nw-reduce-motion *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important;
}
body #settingsModal .st-card.spotify-connect-panel, body #settingsModal .st-card.playback-panel {
    display: block; padding: 4px 20px; background: #1a1a1a !important; background-image: none !important; border: 0 !important; margin: 0 0 16px;
}
body #settingsModal .playback-row, body #settingsModal .playback-slider-row { padding: 16px 0; margin: 0; }
/* Spotify toggle */
body #settingsModal .nw-switch { width: 42px; height: 24px; }
body #settingsModal .nw-switch-track { position: absolute; inset: 0; border-radius: 500px; background: #535353 !important; cursor: pointer; transition: background 0.2s; }
body #settingsModal .nw-switch-track::before { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #000 !important; transition: transform 0.2s; }
body #settingsModal .nw-switch input:checked + .nw-switch-track { background: #5b9aff !important; }
body #settingsModal .nw-switch input:checked + .nw-switch-track::before { transform: translateX(18px); }
body #settingsModal .nw-switch:hover .nw-switch-track { filter: brightness(1.15); }

/* Qualité sonore: Spotify-style selects + equalizer */
body .st-select { appearance: none; background: rgba(255,255,255,.07) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23fff' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center; color: #fff; border: 0; border-radius: 4px; padding: 8px 34px 8px 14px; font: inherit; font-size: 14px; cursor: pointer; min-width: 150px; }
body .st-select option { background: #1f1f1f; }
.eq-panel { margin: 4px 0 8px; padding: 20px 24px; border-radius: 8px; background: rgba(255,255,255,.04); transition: opacity .2s; }
.eq-panel.is-off { opacity: .45; }
.eq-panel.is-off .eq-dot { cursor: default; }
.eq-head { display: flex; align-items: center; gap: 16px; font-size: 14px; color: rgba(255,255,255,.75); margin-bottom: 16px; }
.eq-graph { position: relative; padding-left: 64px; }
.eq-scale { position: absolute; left: 0; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: #fff; }
.eq-graph svg { display: block; width: 100%; height: 200px; touch-action: none; }
.eq-grid { stroke: rgba(255,255,255,.12); stroke-width: 1; vector-effect: non-scaling-stroke; }
.eq-line { fill: none; stroke: var(--accent, #1ed760); stroke-width: 3; vector-effect: non-scaling-stroke; }
.eq-dot { fill: #fff; cursor: ns-resize; }
.eq-freqs { display: flex; justify-content: space-between; padding-left: 64px; margin-top: 8px; font-size: 12px; font-weight: 700; color: #fff; }
.eq-foot { display: flex; justify-content: flex-end; margin-top: 16px; }
