/* ── FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

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

:root {
    --bg:           #e8e4dd;
    --surface:      #ffffff;
    --surface-2:    #f0ece6;
    --border:       rgba(0,0,0,0.08);
    --border-mid:   rgba(0,0,0,0.12);
    --text-1:       #111111;
    --text-2:       #666666;
    --text-3:       #aaaaaa;
    --accent:       #52d97a;
    --accent-bg:    rgba(82,217,122,0.12);
    --mixer-bg:     #181818;
    --mixer-surface:#202020;
    --mixer-border: rgba(255,255,255,0.06);
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text-1);
}

/* ─────────────────────────────────────────
   HEADER
───────────────────────────────────────── */

.app-header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 10;
}

.wordmark {
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-1);
    line-height: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dj-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-3);
}

.changelog-btn {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-2);
    background: transparent;
    border: 1px solid var(--border-mid);
    border-radius: 6px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.15s;
}
.changelog-btn:hover {
    background: var(--surface-2);
    color: var(--text-1);
}

/* ─────────────────────────────────────────
   APP BODY LAYOUT
───────────────────────────────────────── */

.app-body {
    display: flex;
    height: calc(100vh - 56px);
    overflow: hidden;
}

/* ─────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────── */

.app-sidebar {
    width: 68px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    gap: 4px;
    z-index: 5;
}

.nav-item {
    width: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 6px;
    border-radius: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-3);
    transition: all 0.15s;
}
.nav-item span {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.nav-item:hover {
    background: var(--surface-2);
    color: var(--text-2);
}
.nav-item-active {
    background: var(--accent-bg);
    color: var(--accent) !important;
}
.nav-item-active:hover { background: var(--accent-bg); }

/* ─────────────────────────────────────────
   DECKS AREA
───────────────────────────────────────── */

.decks-area {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-width: 0;
}

/* ─────────────────────────────────────────
   VIEW PANELS (match / library / …)
───────────────────────────────────────── */

.view-panel {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.view-panel.hidden { display: none !important; }

/* ─────────────────────────────────────────
   LIBRARY EMPTY STATE
───────────────────────────────────────── */

#view-library {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.library-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    user-select: none;
}

.library-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    margin-bottom: 4px;
}

.library-empty-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.01em;
}

.library-empty-sub {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 400;
}

/* ─────────────────────────────────────────
   DECK PANEL
───────────────────────────────────────── */

.deck-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: var(--bg);
}

.deck-panel-left  { border-right: 1px solid var(--border); }
.deck-panel-right { border-left:  1px solid var(--border); }

/* ─── Platter zone ─── */

.platter-zone {
    flex: 1;
    min-height: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.deck-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 8px;
    flex-shrink: 0;
    z-index: 3;
    position: relative;
}

.deck-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    animation: dotPulse 3s ease-in-out infinite;
}
@keyframes dotPulse { 0%,100% { opacity:1; } 50% { opacity:0.35; } }

.deck-label-text {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--text-3);
}

.deck-tab-row {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.deck-tab {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-3);
    background: transparent;
    border: none;
    border-bottom: 1.5px solid transparent;
    padding: 1px 0 4px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.deck-tab:hover { color: var(--text-2); }
.deck-tab-active,
.deck-tab.modal-tab-active {
    color: var(--text-1) !important;
    border-bottom-color: var(--text-1);
}

/* ─── Search panel ─── */

.deck-search-panel {
    padding: 0 16px 10px;
    flex: 0 0 46px;
    position: relative;
    z-index: 3;
    overflow: hidden;
}

.deck-action-panel {
    flex: 0 0 46px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-row {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border-mid);
    border-radius: 999px;
    padding: 6px 8px 6px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.search-icon-svg {
    color: var(--text-3);
    flex-shrink: 0;
}

.deck-search-input {
    flex: 1;
    min-width: 0;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-1);
    background: transparent;
    border: none;
    outline: none;
}
.deck-search-input::placeholder { color: var(--text-3); }

.deck-search-input + .deck-search-input {
    border-left: 1px solid var(--border);
    padding-left: 8px;
    margin-left: 2px;
}

.deck-search-btn {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--surface);
    background: var(--text-1);
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s;
}
.deck-search-btn:hover { opacity: 0.75; }

/* ─── Vinyl platter circle ─── */

.platter-circle-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* clips vinyl's box-shadow at deck boundaries */
}

.platter-glow {
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,0,0,0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ─────────────────────────────────────────
   PLATTER CLIP — circular clipping wrapper
───────────────────────────────────────── */

.platter-clip {
    position: relative;
    width: min(520px, 100%);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    z-index: 1;
}

/* ─── Left deck: bottom-arc song overlay ─── */

.platter-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    z-index: 5;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    background: rgba(232,228,220,0.80);
    border-top: 1px solid rgba(255,255,255,0.70);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 36px;
    pointer-events: none;
}

.platter-empty-hint {
    font-size: 10px;
    font-weight: 500;
    color: rgba(0,0,0,0.28);
    letter-spacing: 0.05em;
    text-align: center;
}

.platter-song-loaded { width: 100%; }

.platter-song-title {
    font-size: 14px;
    font-weight: 700;
    color: rgba(0,0,0,0.82);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.platter-song-artist {
    font-size: 10px;
    color: rgba(0,0,0,0.42);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.platter-song-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
    flex-wrap: wrap;
    pointer-events: all;
}

.platter-stat-pill {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.55);
    background: rgba(255,255,255,0.60);
    border: 1px solid rgba(255,255,255,0.85);
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    transition: background 0.12s;
}
.platter-stat-pill:hover {
    background: rgba(255,255,255,0.90);
    color: rgba(0,0,0,0.72);
}

/* ─── Right deck: full-disc scrollable overlay ─── */

.platter-overlay-full {
    position: absolute;
    inset: 0;
    z-index: 5;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: rgba(232,228,220,0.84);
    display: flex;
    flex-direction: column;
    padding: 20px 18px 18px;
    gap: 10px;
}

.platter-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.platter-overlay-title {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: rgba(0,0,0,0.40);
}

.platter-matches-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.platter-matches-scroll::-webkit-scrollbar { width: 3px; }
.platter-matches-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 999px; }

/* ─── Deck B inline action button ─── */

.deck-action-btn {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-1);
    background: var(--surface);
    border: 1px solid var(--border-mid);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.deck-action-btn:hover {
    background: var(--surface-2);
}

.vinyl {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 50% 50%, #030303 0%, #050505 1.5%, transparent 2%),
        radial-gradient(circle at 50% 50%, #0d0d0d 0%, #080808 22%, #060606 24%, transparent 24.5%),
        repeating-radial-gradient(
            circle at 50% 50%,
            #050505 0px,
            #050505 1px,
            #121212 1.5px,
            #090909 3px,
            #050505 4px
        );
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.4),
        0 12px 60px rgba(0,0,0,0.35),
        0 4px 20px rgba(0,0,0,0.25),
        inset 0 0 60px rgba(0,0,0,0.8);
}

.vinyl-label {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-mask-image: radial-gradient(circle, black 0%, black 22%, transparent 23%);
    mask-image: radial-gradient(circle, black 0%, black 22%, transparent 23%);
}

.vinyl-label-a,
.vinyl-label-b {
    background: radial-gradient(circle at 42% 40%, #1e1e1e 0%, #0e0e0e 50%, #080808 100%);
}

.vinyl-letter {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.15);
    letter-spacing: 0.06em;
}

.vinyl-spindle {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 8px; height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 32%, #282828, #080808);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 1px 4px rgba(0,0,0,0.9);
    z-index: 3;
}

@keyframes spinRecord { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.record-spin         { animation: spinRecord 9s linear infinite; }
.record-spin-reverse { animation: spinRecord 9s linear infinite reverse; }

/* ─── Key picker overlay ─── */

.deck-key-overlay {
    position: absolute;
    inset: 56px 0 0 0;
    background: rgba(232,228,221,0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 4;
    padding: 16px;
    overflow-y: auto;
}

.key-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.key-section-label {
    grid-column: 1 / -1;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-3);
    padding-top: 4px;
}

.key-btn {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-2);
    background: var(--surface);
    border: 1px solid var(--border-mid);
    border-radius: 7px;
    padding: 9px 4px;
    cursor: pointer;
    text-align: center;
    transition: all 0.12s;
}
.key-btn:hover {
    background: var(--surface-2);
    color: var(--text-1);
    border-color: rgba(0,0,0,0.18);
}
.key-btn-active {
    background: var(--text-1) !important;
    color: var(--surface) !important;
    border-color: var(--text-1) !important;
}

/* ─────────────────────────────────────────
   SONG CARD ZONE  (below platter)
───────────────────────────────────────── */

.song-card-zone {
    flex: 0 0 auto;
    padding: 0 14px 14px;
}

.song-card-empty {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    font-size: 11px;
    color: var(--text-3);
    font-weight: 500;
    text-align: center;
}

/* Loaded song card */
.song-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: relative;
}

.song-card-art {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.song-card-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.song-card-art-placeholder {
    font-size: 22px;
    color: var(--text-3);
}

.song-card-body {
    flex: 1;
    min-width: 0;
}

.song-card-badge {
    display: inline-block;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #1a7a3a;
    background: rgba(82,217,122,0.14);
    border: 1px solid rgba(82,217,122,0.3);
    border-radius: 999px;
    padding: 2px 8px;
    margin-bottom: 5px;
}

.song-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.song-card-artist {
    font-size: 11px;
    color: var(--text-2);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card-stats {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.song-stat-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.song-stat-label {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
}

.song-stat-value {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
}

.song-card-spotify {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--text-3);
    text-decoration: none;
    flex-shrink: 0;
    transition: color 0.15s;
}
.song-card-spotify:hover { color: var(--text-1); }

/* ─────────────────────────────────────────
   DECK B BOTTOM
───────────────────────────────────────── */

.deck-b-zone {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 0 310px;
}

.find-matches-btn {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--surface);
    background: var(--text-1);
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.15s;
    flex-shrink: 0;
}
.find-matches-btn:hover { opacity: 0.75; }

.matches-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px;
    flex-shrink: 0;
}

.match-count-badge {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0.06em;
}

.matches-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}
.matches-list::-webkit-scrollbar { width: 3px; }
.matches-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 999px; }

/* Match card */
.match-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.match-card:hover {
    border-color: var(--border-mid);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.match-card-art {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-3);
}
.match-card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

.match-card-body { flex: 1; min-width: 0; }

.match-card-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.12s;
}
.match-card:hover .match-card-title { color: #000; }

.match-card-artist {
    font-size: 10px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.match-card-pills {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.stat-pill {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    color: var(--text-2);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 7px;
    white-space: nowrap;
    letter-spacing: 0.04em;
}

/* Keep old stat-badge class working */
.stat-badge { font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 500; border-radius: 999px; padding: 2px 7px; }
.stat-key,.stat-bpm,.stat-genre,.stat-year { color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }

/* ─────────────────────────────────────────
   MIXER PANEL
───────────────────────────────────────── */

.mixer-panel {
    width: 188px;
    flex-shrink: 0;
    background: var(--surface);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 16px;
    gap: 14px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    box-shadow: inset 4px 0 24px rgba(0,0,0,0.04), inset -4px 0 24px rgba(0,0,0,0.04);
}

.mixer-label {
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.30em;
    color: var(--text-3);
}

.mixer-divider {
    width: 100%;
    height: 1px;
    background: var(--border);
    flex-shrink: 0;
}

/* ─── Knobs ─── */

.knob-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
    flex-shrink: 0;
}

.knob-title {
    font-family: 'Inter', sans-serif;
    font-size: 7px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--text-3);
    text-align: center;
}

.knob-value {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    color: var(--text-1);
    text-align: center;
    min-height: 13px;
}

.mixer-knob {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    position: relative;
    cursor: ns-resize;
    background: radial-gradient(circle at 34% 28%, #2e2e2e 0%, #1a1a1a 45%, #0c0c0c 100%);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.25),
        0 4px 14px rgba(0,0,0,0.22),
        0 1px 4px rgba(0,0,0,0.14),
        inset 0 1px 3px rgba(255,255,255,0.08),
        inset 0 -1px 3px rgba(0,0,0,0.6);
    transform: rotate(-135deg);
    will-change: transform;
    user-select: none;
    transition: box-shadow 0.15s;
}
.mixer-knob:hover {
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.30),
        0 4px 18px rgba(0,0,0,0.28),
        inset 0 1px 3px rgba(255,255,255,0.10),
        inset 0 -1px 3px rgba(0,0,0,0.6);
}

.knob-notch {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    border-radius: 1px;
    background: linear-gradient(180deg, #e0e0e0 0%, #888 100%);
}

/* ─── Faders ─── */

.fader-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
    flex-shrink: 0;
}

.fader-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.fader-edge-label {
    font-family: 'DM Mono', monospace;
    font-size: 7px;
    color: var(--text-3);
}

.fader-center-label {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    color: var(--text-1);
}

.bpm-range-wrap {
    position: relative;
    height: 32px;
    display: flex;
    align-items: center;
    width: 100%;
}

.bpm-range-track {
    position: absolute;
    left: 0; right: 0;
    height: 3px;
    border-radius: 2px;
    background: rgba(0,0,0,0.10);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.12);
}

.bpm-range-fill {
    position: absolute;
    height: 3px;
    border-radius: 2px;
    background: var(--text-1);
    pointer-events: none;
}

.bpm-fader {
    position: absolute;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    height: 3px;
    pointer-events: none;
}

#bpmRangeMin     { z-index: 3; }
#bpmRangeMax     { z-index: 4; }
#streamsRangeMin { z-index: 3; }
#streamsRangeMax { z-index: 4; }

.bpm-fader::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: all;
    width: 16px;
    height: 26px;
    border-radius: 4px;
    background: linear-gradient(180deg, #2a2a2a 0%, #141414 100%);
    border: 1px solid rgba(0,0,0,0.18);
    box-shadow: 0 2px 6px rgba(0,0,0,0.22), inset 0 1px 2px rgba(255,255,255,0.07);
    cursor: pointer;
    transition: box-shadow 0.12s;
}
.bpm-fader::-webkit-slider-thumb:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.28), inset 0 1px 2px rgba(255,255,255,0.10);
}
.bpm-fader::-moz-range-thumb {
    pointer-events: all;
    width: 16px;
    height: 26px;
    border-radius: 4px;
    background: linear-gradient(180deg, #2a2a2a 0%, #141414 100%);
    border: 1px solid rgba(0,0,0,0.18);
    cursor: pointer;
}
.bpm-fader::-moz-range-track { background: transparent; }

/* ─── Crossfader ─── */

.crossfader-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    flex-shrink: 0;
    margin-top: auto;
}

.crossfader-track {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(0,0,0,0.10);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.14);
    position: relative;
}

.crossfader-cap {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(180deg, #2a2a2a 0%, #141414 100%);
    border: 1px solid rgba(0,0,0,0.20);
    box-shadow: 0 2px 6px rgba(0,0,0,0.22), inset 0 1px 2px rgba(255,255,255,0.06);
    cursor: grab;
}

.crossfader-ab {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 2px;
}
.crossfader-ab span {
    font-size: 8px;
    font-weight: 700;
    color: var(--text-3);
}

.mixer-dots {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.mixer-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}
.mixer-dot-green { background: var(--accent); box-shadow: 0 0 6px rgba(82,217,122,0.5); }
.mixer-dot-amber { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.4); }

/* ─────────────────────────────────────────
   MAP / REGIONS BTN
───────────────────────────────────────── */

.map-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-3);
    background: var(--surface);
    border: 1px solid var(--border-mid);
    border-radius: 6px;
    padding: 4px 9px;
    cursor: pointer;
    transition: all 0.15s;
}
.map-btn:hover {
    color: var(--text-1);
    border-color: rgba(0,0,0,0.2);
    background: var(--surface-2);
}

/* ─────────────────────────────────────────
   MODALS
───────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border-mid);
    box-shadow: 0 32px 80px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.modal-tab {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-3);
    background: transparent;
    border: none;
    border-bottom: 1.5px solid transparent;
    padding: 2px 0 5px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.modal-tab:hover { color: var(--text-2); }
.modal-tab-active {
    color: var(--text-1) !important;
    border-bottom-color: var(--text-1);
}

.modal-close-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-mid);
    background: transparent;
    color: var(--text-2);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    line-height: 1;
    flex-shrink: 0;
}
.modal-close-btn:hover {
    color: var(--text-1);
    background: var(--surface-2);
}

.modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.01em;
}

.modal-subtitle {
    font-size: 9px;
    color: var(--text-3);
    margin-top: 3px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.modal-section-label {
    font-size: 9px;
    color: var(--text-3);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ─── Language pills ─── */

.lang-pill {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-2);
    background: var(--surface-2);
    border: 1px solid var(--border-mid);
    border-radius: 20px;
    padding: 7px 16px;
    cursor: pointer;
    transition: all 0.15s;
}
.lang-pill:hover {
    background: var(--bg);
    color: var(--text-1);
}
.lang-pill-active {
    background: var(--text-1);
    color: var(--surface);
    border-color: var(--text-1);
}

/* ─── Map tooltip ─── */

.continent-tooltip {
    background: rgba(10,10,10,0.92);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 4px;
    color: #ddd;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    padding: 4px 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.continent-tooltip::before { display: none; }

/* ─── Changelog ─── */

.commit-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s;
}
.commit-item:last-child { border-bottom: none; }
.commit-msg {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    line-height: 1.4;
    transition: color 0.12s;
}
.commit-item:hover .commit-msg { color: var(--text-1); }
.commit-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.06em;
}
.commit-sha  { color: var(--text-3); font-family: 'DM Mono', monospace; }
.commit-date { color: var(--text-3); }

/* ─────────────────────────────────────────
   DEV BADGE
───────────────────────────────────────── */

.dev-badge {
    position: fixed;
    bottom: 12px;
    right: 14px;
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 6px;
    padding: 3px 8px;
    pointer-events: none;
    z-index: 9999;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.28);
}

/* ─────────────────────────────────────────
   SCROLLBARS (light)
───────────────────────────────────────── */

.matches-list::-webkit-scrollbar { width: 3px; }
.matches-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.10); border-radius: 999px; }

/* ─────────────────────────────────────────
   iOS FROSTED GLASS SONG CARD
───────────────────────────────────────── */

.deck-card-zone {
    flex: 0 0 auto;
    padding: 8px 16px 16px;
}

.ios-card {
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.90);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
    padding: 16px 18px;
    height: 108px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.ios-card-hint {
    font-size: 10px;
    font-weight: 500;
    color: rgba(0,0,0,0.28);
    letter-spacing: 0.05em;
    text-align: center;
}

.ios-card-content {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.ios-card-art {
    width: 68px;
    height: 68px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-3);
}
.ios-card-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ios-card-info {
    flex: 1;
    min-width: 0;
}

.ios-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.ios-card-artist {
    font-size: 11px;
    color: var(--text-2);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ios-card-pills {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.ios-card-pill {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    color: var(--text-2);
    background: rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    transition: background 0.12s;
}
.ios-card-pill:hover {
    background: rgba(0,0,0,0.10);
    color: var(--text-1);
}

/* ── Deck B nav row ── */

.deck-b-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.deck-b-nav .ios-card {
    flex: 1;
    min-width: 0;
}

.deck-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-mid);
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-2);
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
    padding: 0;
    padding-bottom: 1px;
}
.deck-nav-btn:hover {
    background: rgba(255,255,255,0.95);
    color: var(--text-1);
    border-color: rgba(0,0,0,0.20);
}
.deck-nav-btn:disabled {
    opacity: 0.28;
    cursor: default;
}

/* ── Slide animations ── */

@keyframes slideInFromRight {
    from { transform: translateX(20px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideInFromLeft {
    from { transform: translateX(-20px); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

.slide-from-right { animation: slideInFromRight 0.22s ease forwards; }
.slide-from-left  { animation: slideInFromLeft  0.22s ease forwards; }

/* ── Match counter overlay inside right card ── */

/* ─────────────────────────────────────────
   ACCOUNT VIEW
───────────────────────────────────────── */

#view-account {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.account-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.account-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    margin-bottom: 4px;
}

.account-username {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.02em;
}

.account-email {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 400;
}

.account-logout-btn {
    margin-top: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-2);
    background: var(--surface);
    border: 1px solid var(--border-mid);
    border-radius: 8px;
    padding: 9px 22px;
    cursor: pointer;
    transition: all 0.15s;
}
.account-logout-btn:hover {
    background: var(--surface-2);
    color: var(--text-1);
}

.account-auth-links {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.account-auth-btn {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 8px;
    padding: 9px 22px;
    cursor: pointer;
    transition: all 0.15s;
}

.account-auth-btn-primary {
    background: var(--text-1);
    color: var(--surface);
    border: 1px solid var(--text-1);
}
.account-auth-btn-primary:hover { opacity: 0.80; }

.account-auth-btn-secondary {
    background: var(--surface);
    color: var(--text-2);
    border: 1px solid var(--border-mid);
}
.account-auth-btn-secondary:hover {
    background: var(--surface-2);
    color: var(--text-1);
}

.ios-card-counter {
    position: absolute;
    top: 10px;
    right: 14px;
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: rgba(0,0,0,0.30);
    pointer-events: none;
}
