/* Spotify Clone - Player Styles */

.now-playing-bar {
    grid-area: player;
    background: var(--bg-elevated-base);
    border-radius: var(--border-radius-l);
    padding: var(--spacing-m) var(--spacing-l);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-subdued);
}

/* Player Left Section */
.player-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-m);
    flex: 1;
    min-width: 0;
    max-width: 300px;
}

.player-cover {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-s);
    object-fit: cover;
    flex-shrink: 0;
}

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

.track-name {
    font-size: var(--font-size-m);
    font-weight: var(--font-weight-medium);
    color: var(--text-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    cursor: pointer;
}

.track-name:hover {
    text-decoration: underline;
}

.artist-name {
    font-size: var(--font-size-s);
    color: var(--text-subdued);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.artist-name:hover {
    color: var(--text-base);
    text-decoration: underline;
}

.player-heart {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-subdued);
    transition: var(--transition-base);
}

.player-heart:hover {
    color: var(--text-base);
    background: var(--bg-elevated-highlight);
}

.player-heart.liked {
    color: var(--essential-positive);
}

.player-heart svg {
    width: 16px;
    height: 16px;
}

/* Player Center Section */
.player-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-s);
    flex: 2;
    max-width: 700px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-m);
}

.control-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-subdued);
    transition: var(--transition-base);
}

.control-btn:hover {
    color: var(--text-base);
    background: var(--bg-elevated-highlight);
}

.control-btn svg {
    width: 16px;
    height: 16px;
}

.play-pause-btn {
    width: 40px;
    height: 40px;
    background: var(--essential-bright-accent);
    color: var(--bg-base);
}

.play-pause-btn:hover {
    background: var(--spotify-green-hover);
    transform: scale(1.04);
}

.play-pause-btn svg {
    width: 18px;
    height: 18px;
}

/* Playback Bar */
.playback-bar {
    display: flex;
    align-items: center;
    gap: var(--spacing-m);
    width: 100%;
    max-width: 500px;
}

.progress-time {
    font-size: var(--font-size-xs);
    color: var(--text-subdued);
    font-weight: var(--font-weight-medium);
    width: 40px;
    text-align: center;
}

.progress-bar-container {
    flex: 1;
    height: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--misc-non-text-subdued);
    border-radius: 2px;
}

.progress-bar-fg {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--essential-bright-accent);
    border-radius: 2px;
    width: 30%;
    transition: width 0.1s linear;
}

.progress-bar-handle {
    position: absolute;
    top: 50%;
    left: 30%;
    width: 12px;
    height: 12px;
    background: var(--essential-bright-accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: var(--transition-base);
}

.progress-bar-container:hover .progress-bar {
    height: 6px;
}

.progress-bar-container:hover .progress-bar-handle {
    opacity: 1;
}

/* Player Right Section */
.player-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-s);
    flex: 1;
    justify-content: flex-end;
    max-width: 300px;
}

.player-right .control-btn {
    width: 32px;
    height: 32px;
}

.player-right .control-btn svg {
    width: 16px;
    height: 16px;
}

/* Volume Controls */
.volume-bar {
    display: flex;
    align-items: center;
    width: 93px;
    height: 12px;
    cursor: pointer;
    position: relative;
}

.volume-slider {
    width: 100%;
    height: 4px;
    background: var(--misc-non-text-subdued);
    border-radius: 2px;
    position: relative;
}

.volume-slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    height: 100%;
    background: var(--essential-bright-accent);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.volume-slider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 70%;
    width: 12px;
    height: 12px;
    background: var(--essential-bright-accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: var(--transition-base);
}

.volume-bar:hover .volume-slider {
    height: 6px;
}

.volume-bar:hover .volume-slider::after {
    opacity: 1;
}

/* Player States */
.control-btn.active {
    color: var(--essential-bright-accent);
}

.control-btn.shuffle.active {
    position: relative;
}

.control-btn.shuffle.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--essential-bright-accent);
    border-radius: 50%;
}

.control-btn.repeat.active {
    position: relative;
}

.control-btn.repeat.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--essential-bright-accent);
    border-radius: 50%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .now-playing-bar {
        position: fixed;
        bottom: 60px;
        left: 0;
        right: 0;
        border-radius: 0;
        padding: var(--spacing-s) var(--spacing-m);
        z-index: var(--z-index-elevated);
        grid-area: none;
    }
    
    .player-left {
        max-width: none;
        flex: 1;
    }
    
    .player-center {
        flex: 0;
        order: 3;
        width: 100%;
        margin-top: var(--spacing-s);
    }
    
    .player-right {
        max-width: none;
        flex: 0;
        gap: var(--spacing-xs);
    }
    
    .player-controls {
        gap: var(--spacing-s);
    }
    
    .control-btn:not(.play-pause-btn) {
        display: none;
    }
    
    .volume-bar {
        display: none;
    }
    
    .player-cover {
        width: 48px;
        height: 48px;
    }
    
    .track-name {
        font-size: var(--font-size-s);
    }
    
    .artist-name {
        font-size: var(--font-size-xs);
    }
    
    .progress-time {
        display: none;
    }
    
    .playback-bar {
        gap: var(--spacing-s);
        max-width: none;
    }
}

@media (max-width: 480px) {
    .player-left {
        gap: var(--spacing-s);
    }
    
    .player-heart {
        display: none;
    }
}