/**
 * FUNKSOCIAL - Player Styles
 * Arquivo: player/player.css
 */

:root {
    --player-bg: #0a0a0a;
    --player-border: rgba(255, 255, 255, 0.1);
    --primary-color: #FF006E;
    --secondary-color: #8338EC;
}

/* Global Player */
.global-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--player-bg);
    border-top: 1px solid var(--player-border);
    z-index: 9999;
    backdrop-filter: blur(20px);
}

.player-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
}

/* Progress Bar */
.player-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.time-current,
.time-total {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    min-width: 40px;
}

.time-total {
    text-align: right;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-input {
    position: absolute;
    top: -8px;
    left: 0;
    width: 100%;
    height: 20px;
    opacity: 0;
    cursor: pointer;
}

/* Player Controls */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Player Info */
.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.player-cover {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.player-details {
    min-width: 0;
}

.player-details h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.player-details p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.btn-like {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
}

.btn-like:hover,
.btn-like.active {
    color: var(--primary-color);
}

.btn-like.active i {
    font-weight: 900;
}

/* Main Controls */
.main-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-controls .btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-controls .btn:hover {
    color: #fff;
}

.main-controls .btn.active {
    color: var(--primary-color);
}

.main-controls .btn-play-pause {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    color: #fff;
    font-size: 1.3rem;
}

.main-controls .btn-play-pause:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 0, 110, 0.4);
}

.btn-repeat.repeat-one::after {
    content: '1';
    position: absolute;
    font-size: 0.6rem;
    font-weight: bold;
    margin-left: 2px;
}

/* Extra Controls */
.extra-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: flex-end;
}

.extra-controls .btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.extra-controls .btn:hover {
    color: #fff;
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    width: 100px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.volume-slider input {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.volume-slider input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider input::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Playlist Panel */
.playlist-panel {
    position: absolute;
    bottom: 100%;
    right: 20px;
    width: 350px;
    max-height: 400px;
    background: #1a1a1a;
    border: 1px solid var(--player-border);
    border-radius: 15px 15px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.playlist-panel.show {
    transform: translateY(0);
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--player-border);
}

.playlist-header h6 {
    margin: 0;
    font-weight: 600;
}

.playlist-header h6 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.btn-close-playlist {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 5px;
}

.playlist-items {
    overflow-y: auto;
    flex: 1;
    padding: 10px;
}

.playlist-empty {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.5);
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.playlist-item.active {
    background: rgba(255, 0, 110, 0.1);
}

.playlist-item img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

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

.playlist-item-info h6 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item-info p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item .btn-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 5px;
    opacity: 0;
    transition: all 0.3s ease;
}

.playlist-item:hover .btn-remove {
    opacity: 1;
}

.playlist-item .btn-remove:hover {
    color: #EF4444;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .player-container {
        padding: 10px;
    }
    
    .player-details h6,
    .player-details p {
        max-width: 120px;
    }
    
    .main-controls {
        gap: 10px;
    }
    
    .main-controls .btn {
        font-size: 1rem;
        padding: 5px;
    }
    
    .main-controls .btn-play-pause {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .extra-controls .btn-playlist,
    .extra-controls .btn-download {
        display: none;
    }
    
    .volume-control {
        display: none;
    }
    
    .playlist-panel {
        width: 100%;
        right: 0;
        border-radius: 15px 15px 0 0;
    }
}

/* Animation for playing state */
.global-player.playing .player-cover {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 110, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 0, 110, 0);
    }
}

/* Custom scrollbar for playlist */
.playlist-items::-webkit-scrollbar {
    width: 6px;
}

.playlist-items::-webkit-scrollbar-track {
    background: transparent;
}

.playlist-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.playlist-items::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
