.jukebox-container {
    position: fixed;
    bottom: 20px;
    right: 0;
    width: 300px;
    background: rgba(25, 25, 25, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    color: white;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.jukebox-toggle {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 24px;
}

.jukebox-controls {
    display: block;
    padding: 15px;
}

.jukebox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #fff;
    position: relative;
    cursor: default !important;
}

.jukebox-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.jukebox-header:active {
    background: rgba(255, 255, 255, 0.1);
}

.jukebox-title {
    font-weight: bold;
    display: flex;
    align-items: center;
    cursor: default !important;
}

.jukebox-title .fa-music {
    margin-right: 5px;
}

.jukebox-track-info {
    color: #fff;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
}

.jukebox-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.jukebox-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 16px;
    transition: color 0.2s;
}

.jukebox-btn:hover {
    color: #00ff9d;
}

.jukebox-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.jukebox-volume-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: #333;
    border-radius: 2px;
    outline: none;
}

.jukebox-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #00ff9d;
    border-radius: 50%;
    cursor: pointer;
}

.jukebox-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #00ff9d;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#close-player {
    cursor: pointer;
    transition: color 0.2s;
}

#close-player:hover {
    color: #00ff9d;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .jukebox-container {
        bottom: 10px;
        right: 10px;
        width: 250px;
    }

    .jukebox-volume-slider {
        width: 60px;
    }

    .jukebox-track-info {
        max-width: 200px;
    }
}

/* Auto-play toggle styles */
.auto-play-toggle {
    text-align: center;
    margin: 0 auto 10px;
    display: block;
}

.auto-play-label {
    display: flex;
    align-items: center;
    font-size: 12px;
    cursor: pointer;
    justify-content: center;
}

.auto-play-label input {
    margin-right: 5px;
}

.auto-play-label span {
    opacity: 0.8;
}

/* Page music controls */
.page-music-controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
}

#page-play-pause {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(25, 25, 25, 0.8);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

#page-play-pause:hover {
    background: rgba(40, 40, 40, 0.9);
    transform: scale(1.05);
}

/* --- MINIMIZED PLAYER STYLES (FINAL, NO DRAG, ALWAYS SHOW TITLE) --- */
.jukebox-container.minimized {
    height: 38px !important;
    width: 220px !important;
    min-width: 120px;
    max-width: 300px;
    overflow: visible;
    opacity: 0.98;
    transition: opacity 0.2s, width 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 1000;
}
.jukebox-container.minimized .jukebox-header {
    border-radius: 10px;
    background: rgba(30, 34, 42, 0.98);
    min-height: 32px;
    padding: 8px 10px;
    cursor: default !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100%;
    opacity: 1 !important;
    visibility: visible !important;
}
.jukebox-container.minimized .jukebox-title {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    letter-spacing: 1px;
    margin: 0;
    display: inline !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.jukebox-container.minimized .jukebox-maximize-btn {
    display: inline-block !important;
    margin-left: auto;
    opacity: 1 !important;
    visibility: visible !important;
    font-size: 18px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}
.jukebox-container.minimized .jukebox-minimize-btn {
    display: none !important;
}
.jukebox-container.minimized .jukebox-controls,
.jukebox-container.minimized .jukebox-track-info,
.jukebox-container.minimized .jukebox-buttons,
.jukebox-container.minimized .jukebox-volume,
.jukebox-container.minimized .auto-play-toggle,
.jukebox-container.minimized .jukebox-helper {
    display: none !important;
}

/* Helper text always small */
.jukebox-helper {
    font-size: 11px;
    color: #ccc;
    margin-left: 10px;
    font-family: 'Courier New', monospace;
    opacity: 0.7;
}
