/* Global Player Widget - Professional & Clean */
.global-player-widget {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3000;
    background: linear-gradient(135deg, rgba(26, 10, 46, 0.98), rgba(42, 26, 62, 0.98));
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    height: 64px;
}

.global-player-widget.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.global-player-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
}

/* Track Info - Professional */
.global-player-info {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 240px;
}

.global-player-artwork {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.global-player-artwork-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
    background: rgba(0, 0, 0, 0.1);
}

.global-player-artwork-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
}

.global-player-artwork-placeholder i,
.global-player-artwork-placeholder svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.global-player-track-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.global-player-track-title {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.global-player-track-artist {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Controls - Professional Icons */
.global-player-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.global-player-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.global-player-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.global-player-btn:hover::before {
    width: 100%;
    height: 100%;
}

.global-player-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.global-player-btn i,
.global-player-btn svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
    position: relative;
    z-index: 1;
    stroke-width: 2.5;
}

.global-player-btn.global-player-play {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    border-color: rgba(102, 126, 234, 0.6);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.global-player-btn.global-player-play:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.5), rgba(118, 75, 162, 0.5));
    border-color: rgba(102, 126, 234, 0.7);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px) scale(1.05);
}

.global-player-btn.global-player-play.playing {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.4), rgba(255, 142, 83, 0.4));
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

.global-player-btn.global-player-play.playing:hover {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.5), rgba(255, 142, 83, 0.5));
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 4px 24px rgba(255, 107, 107, 0.5);
    }
}

/* Progress Section - Clean */
.global-player-progress-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
    max-width: 400px;
}

.global-player-time {
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    min-width: 38px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.global-player-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: height 0.2s;
}

.global-player-progress-bar:hover {
    height: 5px;
}

.global-player-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
}

.global-player-progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(102, 126, 234, 0.3);
    opacity: 0;
    transition: opacity 0.2s;
}

.global-player-progress-bar:hover .global-player-progress-fill::after {
    opacity: 1;
}

/* Close Button */
.global-player-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.global-player-close:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
    transform: rotate(90deg);
}

.global-player-close i,
.global-player-close svg {
    width: 16px;
    height: 16px;
    pointer-events: none;
    stroke-width: 2.5;
}

/* Adjust nav when player is visible */
body:has(.global-player-widget.visible) .main-nav {
    top: 64px;
}

/* Responsive */
@media (max-width: 968px) {
    .global-player-content {
        gap: 1rem;
        padding: 0 1.25rem;
    }
    
    .global-player-info {
        max-width: 180px;
    }
    
    .global-player-track-title {
        font-size: 0.85rem;
    }
    
    .global-player-track-artist {
        font-size: 0.7rem;
    }
    
    .global-player-progress-section {
        display: none;
    }
}

@media (max-width: 640px) {
    .global-player-widget {
        height: 60px;
    }
    
    .global-player-content {
        gap: 0.75rem;
        padding: 0 1rem;
    }
    
    .global-player-artwork {
        width: 40px;
        height: 40px;
    }
    
    .global-player-controls {
        gap: 0.35rem;
    }
    
    .global-player-btn {
        width: 32px;
        height: 32px;
    }
    
    .global-player-btn.global-player-play {
        width: 38px;
        height: 38px;
    }
    
    .global-player-btn i,
    .global-player-btn svg {
        width: 16px;
        height: 16px;
    }
    
    body:has(.global-player-widget.visible) .main-nav {
        top: 60px;
    }
}
