/* Enhanced Visual Styles - Glassmorphism & Animations */

/* Mini Player - Glassmorphism Effect */
.mini-player {
    animation: slideUpFadeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUpFadeIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Progress Ring Animation */
.progress-ring-fill {
    filter: drop-shadow(0 0 8px rgba(29, 185, 84, 0.6));
}

.player-artwork-wrapper:hover .progress-ring-fill {
    filter: drop-shadow(0 0 12px rgba(29, 185, 84, 0.9));
}

/* Artwork Hover Effect */
.player-artwork {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.player-artwork:hover {
    transform: translate(-50%,-50%) scale(1.05) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6) !important;
}

/* Mini Player - jPlayer button control (only show one at a time) */
#mini_player_container .jp-play {
    display: inline-block !important;
}

#mini_player_container .jp-pause {
    display: none !important;
}

/* When playing, hide play and show pause */
#mini_player_container.jp-state-playing .jp-play {
    display: none !important;
}

#mini_player_container.jp-state-playing .jp-pause {
    display: inline-block !important;
}

#mini_player_container .jp-controls li {
    display: inline-block !important;
    float: none !important;
}

/* Main play/pause button styling - Enhanced with ripple effect */
.button_player {
    display: inline-block;
    vertical-align: middle;
    position: relative;
}

.mini-player-btn-main {
    text-decoration: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.mini-player-btn-main::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(29, 185, 84, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.mini-player-btn-main:active::before {
    width: 100px;
    height: 100px;
}

.mini-player-btn-main:hover {
    background: rgba(29, 185, 84, 0.15) !important;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
}

.mini-player-btn-main:active {
    transform: scale(1.05);
}

.mini-player-btn-main:focus {
    outline: none;
}

/* Queue panel active state - Enhanced */
.queue-panel {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.queue-panel.active {
    transform: translateX(0) !important;
    animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Toast show state */
.queue-toast.show {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* Button hover states - Enhanced with ripple */
.mini-player-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.mini-player-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.mini-player-btn:active::before {
    width: 60px;
    height: 60px;
}

.mini-player-btn:hover {
    background: rgba(255,255,255,0.15) !important;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}

.mini-player-btn.active {
    color: #1db954 !important;
    background: rgba(29,185,84,0.25) !important;
    box-shadow: 0 0 16px rgba(29,185,84,0.4);
}

.mini-player-btn svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: filter 0.3s ease;
}

.mini-player-btn:hover svg {
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
}

/* Live Waveform container - Enhanced - Dark Theme with Light Blue */
.mini-player-waveform {
    background: linear-gradient(90deg, rgba(135,206,250,0.06) 0%, rgba(135,206,250,0.02) 100%);
    box-shadow: inset 0 0 12px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 1px solid rgba(135,206,250,0.15);
    background-color: rgba(12,12,12,0.6);
}

.mini-player-waveform::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(135,206,250,0.05) 50%, transparent 100%);
    animation: waveformShimmer 3s infinite;
    pointer-events: none;
}

@keyframes waveformShimmer {
    0%, 100% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
}

.mini-player-waveform canvas {
    filter: drop-shadow(0 0 4px rgba(135,206,250,0.4));
    transition: filter 0.4s ease;
}

.mini-player-waveform:hover {
    box-shadow: inset 0 0 16px rgba(135,206,250,0.25), 0 4px 16px rgba(135,206,250,0.2);
    background: linear-gradient(90deg, rgba(135,206,250,0.15) 0%, rgba(135,206,250,0.08) 100%);
    transform: scale(1.02);
    border: 1px solid rgba(135,206,250,0.3);
}

.mini-player-waveform:hover canvas {
    filter: drop-shadow(0 0 8px rgba(135,206,250,0.7));
}

/* Progress Waveform container - Enhanced - Transparent */
.progress-waveform-container {
    box-shadow: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none;
    position: relative;
    overflow: hidden;
    background: transparent !important;
}

.progress-waveform-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}

.progress-waveform-container:hover {
    box-shadow: none;
    background: transparent !important;
    transform: scaleY(1.05);
    border: none;
}

.progress-waveform-container canvas {
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    transition: transform 0.3s ease;
}

.progress-waveform-container:hover canvas {
    transform: scaleY(1.1);
}

/* Queue item styles - Enhanced */
.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 6px;
    margin: 4px 8px;
    position: relative;
    overflow: hidden;
}

.queue-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #1db954, #1ed760);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.queue-item:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.queue-item:hover::before {
    transform: scaleY(1);
}

.queue-item.playing {
    background: linear-gradient(90deg, rgba(29,185,84,0.12) 0%, rgba(29,185,84,0.04) 100%);
    border: 1px solid rgba(29,185,84,0.25);
    box-shadow: 0 2px 12px rgba(29,185,84,0.3);
}

.queue-item.playing::before {
    transform: scaleY(1);
    box-shadow: 0 0 8px rgba(29,185,84,0.6);
}

.queue-item-artwork {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
    transition: all 0.3s ease;
}

.queue-item:hover .queue-item-artwork {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.queue-item-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.queue-item:hover .queue-item-artwork img {
    transform: scale(1.1);
}

.queue-item-info {
    flex: 1;
    min-width: 0;
}

.queue-item-title {
    font-size: 14px;
    color: #fff;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    transition: color 0.3s ease;
}

.queue-item:hover .queue-item-title {
    color: #1ed760;
}

.queue-item-artist {
    font-size: 12px;
    color: #b3b3b3;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.queue-item-remove {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #b3b3b3;
    cursor: pointer;
    padding: 6px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.queue-item:hover .queue-item-remove {
    opacity: 1;
    transform: rotate(90deg);
}

.queue-item-remove:hover {
    color: #fff;
    background: rgba(220,53,69,0.8);
    border-color: rgba(220,53,69,1);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 12px rgba(220,53,69,0.5);
}

/* Volume Slider - Enhanced */
#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.1);
    height: 4px;
    border-radius: 2px;
    outline: none;
    transition: all 0.3s ease;
}

#volume-slider:hover {
    background: rgba(255,255,255,0.15);
    height: 6px;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(29,185,84,0.6);
    background: #1db954;
}

#volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#volume-slider::-moz-range-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(29,185,84,0.6);
    background: #1db954;
}

/* Time Display - Enhanced */
.mini-player-time {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Add to queue button added state */
.add-to-queue-btn.added {
    background: linear-gradient(135deg, #1db954, #1ed760) !important;
    border-color: #1db954 !important;
    color: #fff !important;
    animation: addedPulse 0.6s ease;
    box-shadow: 0 0 20px rgba(29,185,84,0.6);
}

@keyframes addedPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Queue panel header - Enhanced */
.queue-header {
    background: linear-gradient(180deg, rgba(29,185,84,0.1) 0%, transparent 100%);
}

.queue-close-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.queue-close-btn:hover {
    color: #1db954 !important;
    transform: rotate(90deg) scale(1.2);
}

/* Queue footer buttons - Enhanced */
.queue-clear-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.queue-clear-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(220,53,69,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.queue-clear-btn:hover {
    background: rgba(220,53,69,0.8) !important;
    border-color: #dc3545 !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220,53,69,0.4);
}

.queue-clear-btn:active::before {
    width: 200px;
    height: 200px;
}

/* Loading animation for mini player */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.mini-player.loading .player-artwork {
    animation: pulse 1.5s ease-in-out infinite;
}
