/* Музыкальный плеер */
.music-player {
    position: fixed;
    top: 20px;
    left: 20px; /* СЛЕВА */
    z-index: 999;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(124, 58, 237, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 0 30px rgba(139, 92, 246, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.music-player:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), 0 0 40px rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.5);
}

.music-player svg {
    color: #8b5cf6;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
    transition: transform 0.3s ease;
    display: block;
}

.music-player:hover svg {
    transform: scale(1.1);
}

/* Иконка когда музыка играет */
.music-player.playing svg {
    animation: music-pulse 1.5s ease-in-out infinite;
}

@keyframes music-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.8));
    }
}

/* Контент тултипа с плеером */
.music-tooltip-content {
    min-width: 250px;
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}

.tooltip-close-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tooltip-close-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.music-info {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}

.music-title {
    font-weight: 600;
    color: #8b5cf6;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.music-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #a78bfa;
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s ease;
}

.music-link:hover {
    color: #c4b5fd;
    text-decoration: underline;
}

.music-link svg {
    width: 14px;
    height: 14px;
}

/* Селектор треков */
.track-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}

.track-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #d1d5db;
    font-size: 0.8rem;
    width: 100%;
    text-align: left;
}

.track-option:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateX(2px);
}

.track-option.active {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

.track-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.4);
    transition: all 0.2s ease;
}

.track-option.active .track-indicator {
    background: #8b5cf6;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.8);
}

.track-label {
    flex: 1;
    font-weight: 500;
}

.track-option.active .track-label {
    color: #8b5cf6;
}

/* Контроль громкости */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-label {
    font-size: 0.75rem;
    color: #9ca3af;
    min-width: 40px;
}

.volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.1) 100%);
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #8b5cf6;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.8);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #8b5cf6;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
    transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.8);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .music-player {
        top: 10px;
        left: 10px; /* СЛЕВА на мобильных */
        padding: 8px 12px;
    }
    
    .music-player svg {
        width: 20px;
        height: 20px;
    }
    
    .music-tooltip-content {
        min-width: 200px;
    }
}
