/* ==========================================================================
   Music DJ Platform - Pro Dark Studio UI
   Version: 1.1.0
   ========================================================================== */

:root {
    --bg-primary: #090b10;
    --bg-panel: #121621;
    --bg-panel-alt: #181d2c;
    --bg-input: #0d1018;
    --border-color: #252d42;
    --border-highlight: #374362;
    --text-main: #edf2f7;
    --text-muted: #8b98b8;
    --deck-a: #00e5ff;
    --deck-a-dim: rgba(0, 229, 255, 0.15);
    --deck-b: #ff3d71;
    --deck-b-dim: rgba(255, 61, 113, 0.15);
    --accent-ai: #a855f7;
    --accent-ai-dim: rgba(168, 85, 247, 0.18);
    --accent-green: #10b981;
    --accent-amber: #f59e0b;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 6px;
    --shadow-panel: 0 10px 28px rgba(0, 0, 0, 0.45);
}

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

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 12% 15%, rgba(0, 229, 255, 0.06) 0%, transparent 35%),
        radial-gradient(circle at 88% 15%, rgba(255, 61, 113, 0.06) 0%, transparent 35%),
        radial-gradient(circle at 50% 85%, rgba(168, 85, 247, 0.05) 0%, transparent 45%);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-wrapper {
    max-width: 1560px;
    margin: 0 auto;
    padding: 14px 18px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Top Header Bar */
.top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px 18px;
    box-shadow: var(--shadow-panel);
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--deck-a), var(--accent-ai), var(--deck-b));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    letter-spacing: 0.5px;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
}

.brand-title h1 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--accent-ai-dim);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.brand-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.status-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-panel-alt);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.badge-dot.green {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.badge-dot.purple {
    background: var(--accent-ai);
    box-shadow: 0 0 8px var(--accent-ai);
}

.badge-dot.cyan {
    background: var(--deck-a);
    box-shadow: 0 0 8px var(--deck-a);
}

.autodj-master-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    cursor: pointer;
    border: 1px solid var(--border-highlight);
    background: var(--bg-panel-alt);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.18s ease;
    user-select: none;
}

.btn:hover {
    border-color: var(--deck-a);
    background: rgba(255, 255, 255, 0.06);
}

.btn:active {
    transform: translateY(1px);
}

.btn-autodj {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(0, 229, 255, 0.2));
    border-color: var(--accent-ai);
    padding: 9px 18px;
    font-size: 13.5px;
}

.btn-autodj.active {
    background: linear-gradient(135deg, #9333ea, #0284c7);
    border-color: #e9d5ff;
    color: #fff;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.55);
}

.btn-mix-now {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.5);
    color: #fcd34d;
}

.btn-mix-now:hover {
    background: rgba(245, 158, 11, 0.28);
    border-color: var(--accent-amber);
}

/* Visualizer Expansion Slot & Master Output Bar */
.visualizer-slot-bar {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px 16px;
    display: grid;
    grid-template-columns: 260px 1fr 280px;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-panel);
}

.visualizer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.visualizer-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--deck-a);
    display: flex;
    align-items: center;
    gap: 6px;
}

.visualizer-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.visualizer-canvas-wrap {
    width: 100%;
    height: 52px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

#masterVisualizerCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.transition-live-banner {
    background: var(--bg-panel-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transition-status-head {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 600;
}

.transition-progress-bg {
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border-radius: 99px;
    overflow: hidden;
}

.transition-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--deck-a), var(--accent-ai), var(--deck-b));
    transition: width 0.1s linear;
}

/* Main Console Grid: Deck A | Central Mixer | Deck B */
.dj-console-grid {
    display: grid;
    grid-template-columns: 1fr 340px 1fr;
    gap: 14px;
    align-items: stretch;
}

.deck-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-panel);
    position: relative;
    overflow: hidden;
}

.deck-card.deck-a {
    border-top: 3px solid var(--deck-a);
}

.deck-card.deck-b {
    border-top: 3px solid var(--deck-b);
}

.deck-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.deck-id-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.deck-letter {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.deck-a .deck-letter {
    background: var(--deck-a-dim);
    color: var(--deck-a);
    border: 1px solid var(--deck-a);
}

.deck-b .deck-letter {
    background: var(--deck-b-dim);
    color: var(--deck-b);
    border: 1px solid var(--deck-b);
}

.deck-track-meta {
    min-width: 0;
}

.deck-track-title {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

.deck-track-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.deck-state-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 99px;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    white-space: nowrap;
}

.deck-state-pill.playing {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.5);
}

.deck-state-pill.transitioning {
    background: rgba(168, 85, 247, 0.22);
    color: #e9d5ff;
    border-color: var(--accent-ai);
}

/* Telemetry Metrics Row */
.deck-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.metric-box {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    text-align: center;
}

.metric-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.metric-val {
    font-size: 13.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-top: 1px;
}

/* Waveform Display */
.waveform-container {
    position: relative;
    height: 86px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
}

.waveform-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.waveform-legend {
    position: absolute;
    bottom: 4px;
    right: 8px;
    display: flex;
    gap: 10px;
    font-size: 10px;
    color: var(--text-muted);
    pointer-events: none;
    background: rgba(9, 11, 16, 0.75);
    padding: 2px 6px;
    border-radius: 4px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.legend-swatch {
    width: 7px;
    height: 7px;
    border-radius: 2px;
}

/* Time Bar */
.deck-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

.deck-time-row strong {
    color: var(--text-main);
}

/* Deck Controls */
.deck-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.transport-btns {
    display: flex;
    gap: 8px;
}

.btn-play-deck-a:hover,
.btn-play-deck-a.playing {
    background: var(--deck-a-dim);
    border-color: var(--deck-a);
    color: var(--deck-a);
}

.btn-play-deck-b:hover,
.btn-play-deck-b.playing {
    background: var(--deck-b-dim);
    border-color: var(--deck-b);
    color: var(--deck-b);
}

.fader-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 140px;
}

.fader-inline label {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-main);
    border: 2px solid var(--accent-ai);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
}

/* Central Mixer Card */
.mixer-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--shadow-panel);
}

.mixer-title {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.eq-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.eq-col {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eq-col-title {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.eq-col-title.col-a { color: var(--deck-a); }
.eq-col-title.col-b { color: var(--deck-b); }

.eq-band {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.eq-band-top {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    color: var(--text-muted);
}

/* Crossfader Box */
.crossfader-box {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.crossfader-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
}

.crossfader-labels .lbl-a { color: var(--deck-a); }
.crossfader-labels .lbl-b { color: var(--deck-b); }

/* Bottom Section: Auto-DJ AI Settings & Local Playlist */
.bottom-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 14px;
    align-items: start;
}

.panel-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-panel);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.panel-header h2 {
    font-size: 14.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.setting-row-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.setting-label {
    font-size: 12.5px;
    font-weight: 600;
}

.setting-desc {
    font-size: 11px;
    color: var(--text-muted);
}

select.dj-select {
    background: var(--bg-input);
    color: var(--text-main);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-size: 12.5px;
    outline: none;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--bg-input);
    border: 1px solid var(--border-highlight);
    transition: .2s;
    border-radius: 22px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .2s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: rgba(168, 85, 247, 0.35);
    border-color: var(--accent-ai);
}

input:checked + .slider:before {
    transform: translateX(18px);
    background-color: #fff;
}

.ai-advice-box {
    background: var(--bg-input);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-advice-title {
    color: #d8b4fe;
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dropzone & Playlist */
.dropzone-bar {
    border: 2px dashed var(--border-highlight);
    background: rgba(255, 255, 255, 0.015);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.2s ease;
}

.dropzone-bar.dragover {
    border-color: var(--deck-a);
    background: var(--deck-a-dim);
}

.dropzone-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropzone-text strong {
    font-size: 13.5px;
}

.dropzone-text span {
    font-size: 11.5px;
    color: var(--text-muted);
}

.loader-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.playlist-table-wrap {
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-input);
}

table.playlist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

table.playlist-table th {
    position: sticky;
    top: 0;
    background: var(--bg-panel-alt);
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    padding: 9px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid var(--border-color);
    z-index: 2;
}

table.playlist-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

table.playlist-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

table.playlist-table tr.active-deck-a {
    background: rgba(0, 229, 255, 0.09);
}

table.playlist-table tr.active-deck-b {
    background: rgba(255, 61, 113, 0.09);
}

.ai-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 600;
}

.ai-tag.memorized {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.ai-tag.analyzing {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
}

.empty-playlist {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
}

/* ==========================================================================
   BPM Analyzer & Next-Track Matchmaker Section (v1.1.0)
   ========================================================================== */

.bpm-analyzer-section {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--accent-ai);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-panel);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bpm-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.btn-tap-bpm {
    background: rgba(168, 85, 247, 0.16);
    border-color: rgba(168, 85, 247, 0.5);
    color: #e9d5ff;
}

.btn-tap-bpm:active {
    background: var(--accent-ai);
    color: #fff;
    transform: scale(0.96);
}

.btn-sync-bpm {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

.btn-sync-bpm:hover {
    background: rgba(16, 185, 129, 0.28);
    border-color: var(--accent-green);
}

.bpm-analyzer-grid {
    display: grid;
    grid-template-columns: 310px 340px 1fr;
    gap: 14px;
    align-items: stretch;
}

.bpm-box {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.bpm-box-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bpm-radar-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bpm-big-number {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    color: var(--deck-a);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}

.bpm-big-unit {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.beat-pulse-ring {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 229, 255, 0.15);
    border: 2px solid var(--deck-a);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.beat-pulse-ring.pulse-hit {
    transform: scale(1.28);
    background: var(--deck-a);
    box-shadow: 0 0 16px var(--deck-a);
}

.bpm-zone-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border-highlight);
    color: #e2e8f0;
    width: fit-content;
}

.bpm-compare-decks {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
}

.bpm-comp-deck-val {
    font-size: 18px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.bpm-comp-deck-val.val-a { color: var(--deck-a); }
.bpm-comp-deck-val.val-b { color: var(--deck-b); }

.bpm-comp-delta {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 99px;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border-highlight);
}

.bpm-recommendations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
    gap: 8px;
    max-height: 155px;
    overflow-y: auto;
}

.bpm-rec-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    transition: border-color 0.15s ease;
}

.bpm-rec-card:hover {
    border-color: var(--deck-a);
}

.bpm-rec-title {
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bpm-rec-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 11px;
}

/* Compatibility Pill Colors */
.bpm-match-pill {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.bpm-match-pill.perfect {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.bpm-match-pill.good {
    background: rgba(0, 229, 255, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(0, 229, 255, 0.35);
}

.bpm-match-pill.harmonic {
    background: rgba(168, 85, 247, 0.18);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.bpm-match-pill.wide {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Playlist BPM Filter & Sort Toolbar */
.playlist-bpm-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
}

.bpm-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-pill {
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 99px;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    transition: all 0.15s ease;
}

.filter-pill:hover {
    color: var(--text-main);
    border-color: var(--border-highlight);
}

.filter-pill.active {
    background: var(--accent-ai-dim);
    color: #e9d5ff;
    border-color: var(--accent-ai);
}

@media (max-width: 1180px) {
    .dj-console-grid {
        grid-template-columns: 1fr;
    }
    .bottom-grid {
        grid-template-columns: 1fr;
    }
    .visualizer-slot-bar {
        grid-template-columns: 1fr;
    }
    .bpm-analyzer-grid {
        grid-template-columns: 1fr;
    }
}

