﻿/* --- Cards --- */
.music-card h2{ margin-top:4px; }
.soft-card{
    background: var(--paper); border-radius:14px; padding:18px;
    box-shadow:inset 0 0 0 1px var(--brand-border);
}

/* --- Inputs --- */
.form-group{ margin-top:16px; text-align:left; }
.form-group label{ display:block; margin-bottom:6px; font-weight:600; }
.form-group input{
    width:100%; padding:12px; border:1px solid #dcdcdc; border-radius:10px;
    transition:border-color .2s ease, box-shadow .2s ease;
}
.form-group input:focus{
    outline:none; border-color:var(--brand-focus);
    box-shadow:0 0 0 3px color-mix(in srgb, var(--brand-focus) 40%, transparent);
}


/* --- Spotify results --- */
.results-list{
    margin-top:8px; background:#fff; border-radius:12px; border:1px solid #eee;
    box-shadow:0 10px 24px rgba(0,0,0,.08); overflow:hidden;
}
.result-row{
    display:flex; gap:12px; align-items:center; padding:10px 12px; cursor:pointer;
    transition:background .15s ease;
}
.result-row:hover{ background:var(--upload-bg-hover); }
.result-row img{ width:44px; height:44px; border-radius:8px; object-fit:cover; }
.result-row .title{ font-weight:600; }
.result-row .artist{ font-size:.9rem; color:#666; }

/* --- Selected preview --- */
.track-preview{
    display:flex; align-items:center; gap:12px; margin-top:14px; padding:10px 12px;
    border:2px dashed var(--upload-border); border-radius:12px; background:var(--upload-bg);
}
.track-preview img{ width:56px; height:56px; border-radius:10px; object-fit:cover; }
.track-preview .meta .t{ font-weight:700; }
.track-preview .meta .a{ color:#666; font-size:.92rem; }
.link-reset{ margin-left:auto; border:0; background:transparent; font-size:18px; cursor:pointer; }

/* --- Buttons --- */
.upload-btn.wide{ width:100%; }
.upload-btn{
    margin-top:16px; padding:12px 18px; border:0; border-radius:10px; font-size:1rem; cursor:pointer;
    background:var(--brand-secondary); color:var(--brand-secondary-ink); transition:background .2s ease;
}
.upload-btn:hover{ background:var(--brand-secondary-hover); }

/* Mobile */
@media (max-width:560px){
    .result-row img{ width:40px; height:40px; }
    .track-preview img{ width:50px; height:50px; }
}

/* =========================================
   Advanced Search Filter Bar
   ========================================= */

#toggle-advanced-search {
    transition: all 0.2s ease;
}

#toggle-advanced-search.active {
    background-color: var(--brand-primary, #1db954);
    border-color: var(--brand-primary, #1db954);
    color: white;
}

#toggle-advanced-search svg {
    vertical-align: -0.125em;
}

.search-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-filter-bar .filter-label {
    font-size: 0.875rem;
    color: var(--text-muted, #666);
    font-weight: 500;
}

.search-filter-bar .btn-group {
    flex-wrap: wrap;
}

.search-filter-bar .btn-check:checked + .btn-outline-primary {
    background-color: var(--brand-primary, #1db954);
    border-color: var(--brand-primary, #1db954);
    color: white;
}

.search-filter-bar .btn-outline-primary {
    border-color: var(--brand-border, #dee2e6);
    color: var(--text-primary, #333);
}

.search-filter-bar .btn-outline-primary:hover {
    background-color: var(--upload-bg-hover, #f0f0f0);
    border-color: var(--brand-primary, #1db954);
}

@media (max-width: 560px) {
    .search-filter-bar {
        gap: 8px;
    }
    
    .search-filter-bar .filter-label {
        font-size: 0.8rem;
    }
    
    .search-filter-bar .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* =========================================
   Advanced Search Results
   ========================================= */

.search-results-container {
    background: var(--paper, #fff);
    border-radius: 12px;
    border: 1px solid var(--brand-border, #e5e5e5);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    overflow: hidden;
    max-height: 60vh;
    overflow-y: auto;
}

.search-results-header {
    padding: 10px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #666);
    background: var(--upload-bg, #f8f9fa);
    border-bottom: 1px solid var(--brand-border, #e5e5e5);
}

.search-results-section {
    background: var(--paper, #fff);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background .15s ease;
    border-bottom: 1px solid var(--brand-border, #eee);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--upload-bg-hover, #f0f0f0);
}

.search-result-item:focus {
    outline: none;
    background: var(--upload-bg-hover, #f0f0f0);
    box-shadow: inset 0 0 0 2px var(--brand-focus, #007bff);
}

.search-result-image {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--upload-bg, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #999);
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-image svg {
    width: 24px;
    height: 24px;
}

.search-result-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-artist {
    font-size: 0.85rem;
    color: var(--text-muted, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-album {
    font-size: 0.8rem;
    color: var(--text-muted, #888);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Highlighted match */
.search-result-title mark,
.search-result-artist mark,
.search-result-album mark {
    background: rgba(29, 185, 84, 0.25);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* Source badges */
.search-result-badge {
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-queue {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.badge-spotify {
    background: rgba(29, 185, 84, 0.15);
    color: #1db954;
}

/* From queue item styling */
.search-result-item.from-queue {
    background: rgba(40, 167, 69, 0.03);
}

.search-result-item.from-queue:hover {
    background: rgba(40, 167, 69, 0.08);
}

/* No results message */
.search-no-results {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted, #666);
    font-size: 0.9rem;
}

/* Loading indicator */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    color: var(--text-muted, #666);
    font-size: 0.9rem;
}

.search-loading .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--brand-border, #e5e5e5);
    border-top-color: var(--brand-primary, #1db954);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile responsive */
@media (max-width: 560px) {
    .search-results-container {
        max-height: 50vh;
    }
    
    .search-result-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .search-result-image {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }
    
    .search-result-title {
        font-size: 0.9rem;
    }
    
    .search-result-artist {
        font-size: 0.8rem;
    }
    
    .search-result-album {
        font-size: 0.75rem;
    }
    
    .search-result-badge {
        padding: 3px 6px;
        font-size: 0.65rem;
    }
}

/* Dark mode support for search */
@media (prefers-color-scheme: dark) {
    .search-results-container {
        background: var(--paper, #1a1a1a);
        border-color: var(--brand-border, #333);
        box-shadow: 0 8px 24px rgba(0,0,0,.4);
    }
    
    .search-results-header {
        background: rgba(255,255,255,0.05);
        border-color: var(--brand-border, #333);
    }
    
    .search-result-item {
        border-color: var(--brand-border, #333);
    }
    
    .search-result-item:hover,
    .search-result-item:focus {
        background: rgba(255,255,255,0.08);
    }
    
    .search-result-title mark,
    .search-result-artist mark,
    .search-result-album mark {
        background: rgba(29, 185, 84, 0.35);
    }
}

/* =========================================
   Queue List - Consistent with Search Results
   ========================================= */

.queue-list-section {
    margin-top: 0;
    min-height: 100px; /* Reserve space to prevent layout jumps */
}

.queue-header {
    padding: 8px 0;
}

.queue-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary, #1a1a1a);
}

.queue-count {
    font-size: 0.75rem;
}

.queue-empty {
    background: var(--upload-bg, #f8f9fa);
    border-radius: 12px;
    padding: 32px 16px;
}

.queue-list {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--brand-border, #e5e5e5);
}

.queue-item {
    padding: 0;
    border-left: none;
    border-right: none;
    border-radius: 0;
}

.queue-item:first-child {
    border-top: none;
}

.queue-item:last-child {
    border-bottom: none;
}

.queue-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.queue-item-image {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--upload-bg, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #999);
}

.queue-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.queue-item-image svg {
    width: 24px;
    height: 24px;
}

.queue-item-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.queue-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-artist {
    font-size: 0.85rem;
    color: var(--text-muted, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-status {
    font-size: 0.75rem;
    color: var(--text-muted, #888);
}

.queue-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.queue-item-badge {
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    white-space: nowrap;
}

.badge-mine {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.badge-guest {
    background: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
}

.badge-external {
    background: rgba(108, 117, 125, 0.15);
    color: #6c757d;
}

.queue-vote-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-primary, #1db954);
    background: rgba(29, 185, 84, 0.1);
    border: 1px solid rgba(29, 185, 84, 0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.queue-vote-btn:hover:not(:disabled) {
    background: rgba(29, 185, 84, 0.2);
    border-color: rgba(29, 185, 84, 0.5);
}

.queue-vote-btn.voted {
    color: var(--text-muted, #888);
    background: rgba(108, 117, 125, 0.1);
    border-color: rgba(108, 117, 125, 0.3);
    cursor: default;
}

.queue-votes-display {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    color: var(--text-muted, #666);
}

/* Mobile responsive for queue */
@media (max-width: 560px) {
    .queue-item-content {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .queue-item-image {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }
    
    .queue-item-title {
        font-size: 0.9rem;
    }
    
    .queue-item-artist {
        font-size: 0.8rem;
    }
    
    .queue-item-badge {
        padding: 3px 6px;
        font-size: 0.65rem;
    }
    
    .queue-vote-btn {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
}

/* Dark mode for queue */
@media (prefers-color-scheme: dark) {
    .queue-list {
        border-color: var(--brand-border, #333);
    }
    
    .queue-empty {
        background: rgba(255,255,255,0.05);
    }
}

/* Now playing bar */
.np-row .np-time { min-width: 42px; text-align: center; font-family: monospace; }
.np-bar {
    position: relative;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    overflow: hidden;
}
.np-bar .np-fill {
    height: 100%;
    width: 0%;
    background: #1db954; /* Spotify green */
    border-radius: 999px;
    transition: width .15s linear;
}
@media (prefers-color-scheme: dark) {
    .np-bar { background: rgba(255,255,255,0.18); }
    .np-bar .np-fill { background: #fff; }
}


.np-row .np-time { min-width: 42px; text-align: center; font-family: monospace; }
.np-bar {
    position: relative;
    height: 6px;
    background: rgba(0,0,0,0.15);
    border-radius: 999px;
    overflow: hidden;
}
.np-bar .np-fill {
    height: 100%;
    width: 0%;
    background: var(--brand-primary);
    border-radius: 999px;
    transition: width .15s linear;
}

/* ===========================================
   MINI PLAYER - Fixed bottom now playing bar
   =========================================== */

/* Container for player and show button */
#mini-player-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    pointer-events: none;
}

/* Show button when player is hidden */
.mini-player-show-btn {
    position: fixed;
    bottom: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--brand-primary, #1db954);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    pointer-events: auto;
    z-index: 1001;
}

.mini-player-show-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.mini-player-show-btn:active {
    transform: translateY(0);
}

/* Main mini player bar */
.mini-player {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--paper, #fff);
    border-top: 1px solid var(--brand-border, #e5e5e5);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, opacity 0.25s ease;
    pointer-events: auto;
}

.mini-player.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* Content row */
.mini-player-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    min-height: 68px;
}

/* Album cover */
.mini-player-cover {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--upload-bg, #f5f5f5);
}

/* Metadata container */
.mini-player-meta {
    flex: 1;
    min-width: 0; /* Enable text truncation */
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Title and artist with ellipsis */
.mini-player-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-player-artist {
    font-size: 0.85rem;
    color: var(--text-muted, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Progress bar row */
.mini-player-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.mini-player-time {
    font-size: 0.75rem;
    font-family: monospace;
    color: var(--text-muted, #666);
    min-width: 36px;
}

.mini-player-time:last-child {
    text-align: right;
}

.mini-player-bar {
    flex: 1;
    height: 4px;
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.mini-player-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--brand-primary, #1db954);
    border-radius: 2px;
    transition: width 0.2s linear;
}

/* Controls */
.mini-player-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.mini-player-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-primary, #333);
    cursor: pointer;
    transition: background 0.15s ease;
}

.mini-player-btn:hover {
    background: rgba(0,0,0,0.08);
}

.mini-player-btn:active {
    background: rgba(0,0,0,0.12);
}

.mini-player-hide-btn {
    color: var(--text-muted, #888);
}

/* No track state */
.mini-player-no-track {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-muted, #666);
    font-size: 0.9rem;
}

/* Responsive: Mobile */
@media (max-width: 560px) {
    .mini-player-content {
        padding: 8px 12px;
        gap: 10px;
    }
    
    .mini-player-cover {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }
    
    .mini-player-title {
        font-size: 0.9rem;
    }
    
    .mini-player-artist {
        font-size: 0.8rem;
    }
    
    .mini-player-btn {
        width: 32px;
        height: 32px;
    }
    
    .mini-player-controls {
        gap: 2px;
    }
    
    .mini-player-show-btn span {
        display: none;
    }
    
    .mini-player-show-btn {
        padding: 12px;
        border-radius: 50%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mini-player {
        background: var(--paper, #1a1a1a);
        border-top-color: var(--brand-border, #333);
        box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
    }
    
    .mini-player-bar {
        background: rgba(255,255,255,0.15);
    }
    
    .mini-player-btn:hover {
        background: rgba(255,255,255,0.1);
    }
    
    .mini-player-btn:active {
        background: rgba(255,255,255,0.15);
    }
}

/* Reserve space for mini player to prevent layout jumps */
body.has-mini-player {
    padding-bottom: 80px;
}

/* =========================================
   DJ Badge
   ========================================= */
.dj-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #1db954 0%, #1ed760 100%);
    color: #fff;
    border-radius: 12px;
    margin-right: 8px;
    box-shadow: 0 2px 4px rgba(29, 185, 84, 0.3);
    flex-shrink: 0;
}

/* =========================================
   Spotify Link Button
   ========================================= */
.spotify-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.spotify-link-btn:hover {
    background-color: #1db954;
    border-color: #1db954;
    color: #fff;
}

.spotify-link-btn svg {
    vertical-align: -0.125em;
}

/* =========================================
   Results Count Selector
   ========================================= */
.results-count-selector {
    display: flex;
    align-items: center;
}

.results-count-selector .form-select {
    min-width: 70px;
}

@media (max-width: 560px) {
    .results-count-selector {
        width: 100%;
        margin-top: 8px;
        justify-content: flex-end;
    }
}

/* =========================================
   DJ Queue Controls
   ========================================= */
.queue-item-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 48px;
    color: var(--text-muted, #999);
    cursor: grab;
    touch-action: none;
    flex-shrink: 0;
}

.queue-item-drag-handle:active {
    cursor: grabbing;
}

.queue-item-drag-handle:hover {
    color: var(--text-primary, #333);
}

.queue-dj-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.queue-move-btn,
.queue-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted, #666);
    cursor: pointer;
    transition: all 0.15s ease;
}

.queue-move-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.08);
    color: var(--brand-primary, #1db954);
}

.queue-move-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.queue-remove-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Queue item being dragged */
.queue-item.dragging {
    opacity: 0.5;
    background: var(--upload-bg, #f8f9fa);
}

.queue-item.drag-over {
    border-top: 2px solid var(--brand-primary, #1db954);
}

/* Visual dimming for paused guest requests (Later Bucket) */
.queue-item.later-bucket-dimmed {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.queue-item.later-bucket-dimmed .queue-item-content {
    filter: grayscale(20%);
}

/* Mobile responsive for DJ controls */
@media (max-width: 560px) {
    .queue-item-drag-handle {
        width: 20px;
        height: 42px;
    }
    
    .queue-dj-controls {
        gap: 2px;
        margin-left: 4px;
    }
    
    .queue-move-btn,
    .queue-remove-btn {
        width: 24px;
        height: 24px;
    }
}

/* =========================================
   Voters Button and Modal
   ========================================= */

.queue-voters-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    color: var(--text-muted, #666);
    background: transparent;
    border: 1px solid var(--brand-border, #dee2e6);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.queue-voters-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--brand-primary, #1db954);
    color: var(--brand-primary, #1db954);
}

/* Voters Modal */
.voters-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.voters-modal-content {
    background: var(--paper, #fff);
    border-radius: 12px;
    width: 100%;
    max-width: 320px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.voters-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--brand-border, #e5e5e5);
}

.voters-modal-title {
    font-weight: 600;
    font-size: 1rem;
}

.voters-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted, #666);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.voters-modal-close:hover {
    color: var(--text-primary, #333);
}

.voters-modal-body {
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.voter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.voter-item:not(:last-child) {
    border-bottom: 1px solid var(--brand-border, #eee);
}

.voter-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

.voter-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.voter-name {
    font-size: 0.9rem;
    color: var(--text-primary, #333);
}

.voters-loading,
.voters-empty,
.voters-error {
    text-align: center;
    color: var(--text-muted, #666);
    padding: 24px 16px;
}

.voters-error {
    color: #dc3545;
}

/* Dark mode for voters modal */
@media (prefers-color-scheme: dark) {
    .voters-modal-content {
        background: var(--paper, #1a1a1a);
    }
    
    .voters-modal-header {
        border-color: var(--brand-border, #333);
    }
    
    .voter-item:not(:last-child) {
        border-color: var(--brand-border, #333);
    }
}

@media (max-width: 560px) {
    .voters-modal {
        padding: 8px;
    }
    
    .voters-modal-content {
        max-width: 100%;
    }
    
    .queue-voters-btn {
        padding: 3px 6px;
        font-size: 0.75rem;
    }
}

/* =========================================
   Spotify Share Link Modal
   ========================================= */

.spotify-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.spotify-share-modal-content {
    background: var(--paper, #fff);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.spotify-share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1db954 0%, #1ed760 100%);
    color: #fff;
}

.spotify-share-modal-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.spotify-share-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    padding: 4px 10px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.spotify-share-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.spotify-share-modal-body {
    padding: 20px;
}

.spotify-share-instructions {
    margin-bottom: 20px;
}

.spotify-share-steps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.spotify-share-steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    flex-wrap: wrap;
}

.spotify-share-steps li:not(:last-child) {
    border-bottom: 1px solid var(--brand-border, #eee);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--brand-primary, #1db954);
    color: #fff;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.spotify-share-input-group {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.spotify-share-input-group .form-control {
    flex: 1;
}

.spotify-link-status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.spotify-link-status.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.spotify-link-status.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.spotify-link-preview {
    margin-top: 16px;
    padding: 12px;
    background: var(--upload-bg, #f8f9fa);
    border-radius: 12px;
}

.spotify-preview-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spotify-preview-image {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
}

.spotify-preview-meta {
    flex: 1;
    min-width: 0;
}

.spotify-preview-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-preview-artist {
    font-size: 0.85rem;
    color: var(--text-muted, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-preview-add {
    flex-shrink: 0;
}

@media (max-width: 560px) {
    .spotify-share-modal {
        padding: 8px;
    }
    
    .spotify-share-modal-content {
        max-width: 100%;
    }
    
    .spotify-share-input-group {
        flex-direction: column;
    }
    
    .spotify-share-steps li {
        font-size: 0.9rem;
    }
    
    .step-number {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
}

@media (prefers-color-scheme: dark) {
    .spotify-share-modal-content {
        background: var(--paper, #1a1a1a);
    }
    
    .spotify-share-steps li:not(:last-child) {
        border-color: var(--brand-border, #333);
    }
    
    .spotify-link-preview {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* =========================================
   DJ Controls Extended Drawer
   ========================================= */

.dj-controls-drawer {
    background: var(--paper, #fff);
    border-top: 1px solid var(--brand-border, #e5e5e5);
    padding: 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.dj-controls-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dj-controls-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary, #1a1a1a);
}

.dj-controls-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted, #666);
    cursor: pointer;
    transition: background 0.15s ease;
}

.dj-controls-close-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.dj-control-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--brand-border, #eee);
}

.dj-control-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.dj-control-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #666);
    margin-bottom: 8px;
}

.dj-queue-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.dj-queue-status-text {
    font-size: 0.9rem;
    color: var(--text-primary, #333);
}

.dj-queue-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dj-pause-btn {
    font-size: 0.8rem;
}

.dj-song-source {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dj-playlists {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dj-playlists-loading {
    font-size: 0.85rem;
    color: var(--text-muted, #666);
    padding: 8px 0;
}

.dj-playlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--upload-bg, #f8f9fa);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.dj-playlist-item:hover {
    background: var(--upload-bg-hover, #f0f0f0);
}

.dj-playlist-item.active {
    background: rgba(29, 185, 84, 0.1);
    border: 1px solid rgba(29, 185, 84, 0.3);
}

.dj-playlist-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.dj-playlist-info {
    font-size: 0.75rem;
    color: var(--text-muted, #666);
}

.dj-playlist-activate-btn {
    font-size: 0.75rem;
    padding: 4px 8px;
}

/* Queue paused message styling */
.queue-paused-message {
    background: rgba(13, 202, 240, 0.1) !important;
    border: 1px solid rgba(13, 202, 240, 0.3) !important;
    border-radius: 8px;
}

.queue-paused-message svg {
    color: #0dcaf0;
    flex-shrink: 0;
}

/* Mobile responsive for DJ drawer */
@media (max-width: 560px) {
    .dj-controls-drawer {
        padding: 12px;
        max-height: 50vh;
    }
    
    .dj-queue-actions {
        flex-direction: column;
    }
    
    .dj-pause-btn {
        width: 100%;
    }
    
    .dj-playlist-item {
        padding: 8px 10px;
    }
}

/* Dark mode for DJ drawer */
@media (prefers-color-scheme: dark) {
    .dj-controls-drawer {
        background: var(--paper, #1a1a1a);
        border-top-color: var(--brand-border, #333);
    }
    
    .dj-control-section {
        border-bottom-color: var(--brand-border, #333);
    }
    
    .dj-controls-close-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .dj-playlist-item {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .dj-playlist-item:hover {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* =========================================

/* =========================================
   DJ Decks UI - Mixer Console Style
   ========================================= */

.dj-decks-container {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dj-decks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dj-decks-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dj-decks-title svg {
    color: #1db954;
}

.dj-decks-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dj-decks-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dj-decks-toggle-btn.collapsed {
    transform: rotate(180deg);
}

.dj-decks-content {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.dj-decks-content.collapsed {
    max-height: 0 !important;
    opacity: 0;
    padding: 0;
}

/* Crossfader */
.dj-crossfader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0;
    margin-bottom: 16px;
}

.crossfader-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.crossfader-track {
    position: relative;
    width: 160px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.crossfader-slider {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 18px;
    background: linear-gradient(135deg, #1db954 0%, #1ed760 100%);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(29, 185, 84, 0.4);
    /* Transition duration set dynamically by JavaScript based on crossover duration */
    /* Using ease-in-out for smooth, gradual movement */
    transition: left var(--crossfade-duration, 1s) ease-in-out;
}

/* Decks Row - Responsive Layout */
.dj-decks-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .dj-decks-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Individual Deck */
.dj-deck {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: box-shadow 0.3s ease;
}

.dj-deck.crossfading {
    box-shadow: 0 0 20px rgba(29, 185, 84, 0.3);
}

.deck-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
}

.deck-a .deck-label {
    color: #1db954;
}

.deck-b .deck-label {
    color: #ff6b6b;
}

.deck-status {
    padding: 2px 8px;
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.deck-a .deck-status {
    background: rgba(29, 185, 84, 0.2);
    color: #1db954;
}

.deck-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Rotating Disc */
.disc-container {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

@media (min-width: 769px) {
    .disc-container {
        width: 120px;
        height: 120px;
    }
}

/* Progress Ring */
.disc-progress-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    z-index: 1;
}

.progress-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 3;
}

.progress-bar {
    fill: none;
    stroke: #1db954;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 289;
    stroke-dashoffset: 289;
    transition: stroke-dashoffset 0.3s linear;
    filter: drop-shadow(0 0 4px rgba(29, 185, 84, 0.5));
}

.progress-bar-next {
    stroke: #ff6b6b;
    filter: drop-shadow(0 0 4px rgba(255, 107, 107, 0.5));
}

/* Vinyl Disc */
.disc {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center,
        #1a1a1a 0%,
        #0a0a0a 40%,
        #1a1a1a 41%,
        #0a0a0a 100%
    );
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.disc.spinning {
    animation: spin 2s linear infinite;
}

.disc.stopping {
    animation: spinStop 1s ease-out forwards;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spinStop {
    from { transform: rotate(var(--current-rotation, 0deg)); }
    to { transform: rotate(calc(var(--current-rotation, 0deg) + 45deg)); }
}

/* Vinyl Grooves */
.disc-grooves {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle at center,
        transparent 0px,
        transparent 1px,
        rgba(255, 255, 255, 0.03) 2px,
        transparent 3px
    );
}

/* Album Artwork (cropped circle) */
.disc-artwork {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 50%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.disc-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Center Hole */
.disc-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15%;
    height: 15%;
    border-radius: 50%;
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.disc-hole {
    width: 30%;
    height: 30%;
    border-radius: 50%;
    background: #0a0a0a;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Track Info */
.deck-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.deck-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deck-artist {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deck-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.deck-origin {
    font-size: 0.65rem !important;
    padding: 2px 8px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deck-origin.origin-guest {
    background: rgba(29, 185, 84, 0.2) !important;
    color: #1db954 !important;
}

.deck-origin.origin-dj {
    background: rgba(255, 193, 7, 0.2) !important;
    color: #ffc107 !important;
}

.deck-votes {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #1db954;
}

.deck-votes svg {
    color: #1db954;
}

.deck-time {
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.deck-time-separator {
    margin: 0 4px;
    color: rgba(255, 255, 255, 0.3);
}

.deck-eta {
    color: rgba(255, 255, 255, 0.4);
}

/* Deck Controls */
.deck-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.deck-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.deck-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

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

.deck-btn-play {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #1db954 0%, #1ed760 100%);
    box-shadow: 0 4px 16px rgba(29, 185, 84, 0.4);
}

.deck-btn-play:hover {
    background: linear-gradient(135deg, #1ed760 0%, #1db954 100%);
    box-shadow: 0 6px 20px rgba(29, 185, 84, 0.5);
}

.deck-btn-skip {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

.deck-btn-switch {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.deck-btn-switch:hover {
    background: rgba(255, 193, 7, 0.25);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .dj-decks-container {
        padding: 12px;
        border-radius: 12px;
    }
    
    .deck-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .disc-container {
        width: 90px;
        height: 90px;
    }
    
    .deck-info {
        align-items: center;
    }
    
    .deck-title {
        font-size: 0.9rem;
    }
    
    .deck-artist {
        font-size: 0.8rem;
    }
    
    .deck-controls {
        justify-content: center;
    }
}

/* Neon Glow Effects */
.deck-a.playing .disc-container::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 0 30px rgba(29, 185, 84, 0.3);
    animation: pulse 2s ease-in-out infinite;
    pointer-events: none;
}

.deck-b.crossfading .disc-container::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
    animation: pulse 2s ease-in-out infinite;
    pointer-events: none;
}

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

/* Light mode override - force dark theme for DJ decks */
@media (prefers-color-scheme: light) {
    .dj-decks-container {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    }
}

/* DJ Decks Header Actions */
.dj-decks-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dj-fullscreen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(29, 185, 84, 0.2);
    color: #1db954;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dj-fullscreen-btn:hover {
    background: rgba(29, 185, 84, 0.35);
    color: #1ed760;
    transform: scale(1.05);
}
